From 6da2fdee6d6a58e2f4a2f8285a201dce5f005e23 Mon Sep 17 00:00:00 2001 From: wvengen Date: Wed, 24 Jul 2013 13:21:52 +0200 Subject: [PATCH] add travis-ci configuration --- .travis.yml | 11 +++++++++++ lib/tasks/foodsoft_setup.rake | 9 +++++++++ 2 files changed, 20 insertions(+) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 00000000..7dd5cd81 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,11 @@ +language: ruby +rvm: + - 1.9.3 +services: + - redis-server +before_install: + - "export DISPLAY=:99.0" + - "sh -e /etc/init.d/xvfb start" + - "bundle exec rake foodsoft:setup:stock_config" + - 'printf "test:\r\n adapter:mysql2\r\n database:foodsoft_test\r\n username:travis\r\n encoding:utf8\r\n" >config/database.yml' +script: bundle exec rake spec diff --git a/lib/tasks/foodsoft_setup.rake b/lib/tasks/foodsoft_setup.rake index 6a239c63..5e7ba088 100644 --- a/lib/tasks/foodsoft_setup.rake +++ b/lib/tasks/foodsoft_setup.rake @@ -38,6 +38,15 @@ namespace :foodsoft do puts yellow "All done! Your foodcoft should be running smoothly." start_server end + + namespace :setup do + desc "Initialize stock configuration" + task :stock_config do + setup_app_config + setup_development + setup_secret_token + end + end end def setup_bundler