diff --git a/.travis.yml b/.travis.yml index 640b0b1d..281d1ed4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,8 +2,10 @@ language: ruby rvm: - 2.1.1 env: - - DB=postgresql + - "RAILS_VERSION=3.2.0" + - "RAILS_VERSION=4.0.0" script: - bundle exec rake db:migrate - bundle exec rake db:test:prepare - - bundle exec rake spec \ No newline at end of file + - bundle exec rake spec + - bundle exec rake cucumber \ No newline at end of file diff --git a/Gemfile.rails_version b/Gemfile.rails_version index 9c4f3967..ed3670d4 100644 --- a/Gemfile.rails_version +++ b/Gemfile.rails_version @@ -2,19 +2,23 @@ # separate fragment so that it can be sourced from the test # application's Gemfile in addition to the main development Gemfile. -if ENV['RAILS_VERSION'] - case ENV['RAILS_VERSION'] - when /3.2$/ - gem 'rails', '~> 3.2.0' - # A JS runtime is required for Rails 3.1+ - gem 'therubyracer', '~> 0.10.2' - when /4.0$/ - gem 'rails', '~> 4.0.0' - # A JS runtime is required for Rails 4.0+ - gem 'therubyracer', platforms: :ruby - else - fail "Unsupported Rails version #{ENV['RAILS_VERSION']}" - end +env_rails_version = ENV["RAILS_VERSION"] || "default" + +case env_rails_version +when "master" + {github: "rails/rails"} +when "default" + gem rails, "~> 4.0.0" + # A JS runtime is required for Rails 4.0+ + gem 'therubyracer', platforms: :ruby +when /3.2$/ + gem rails, "~> #{env_rails_version}" + # A JS runtime is required for Rails 3.1+ + gem 'therubyracer', '~> 0.10.2' +when /4.0$/ + gem rails, "~> #{env_rails_version}" + # A JS runtime is required for Rails 4.0+ + gem 'therubyracer', platforms: :ruby else - fail "ENV['RAILS_VERSION'] not set" -end + fail "Unsupported Rails version #{ENV['RAILS_VERSION']}" +end \ No newline at end of file