NUBIC/surveyor

View on GitHub
Gemfile.rails_version

Summary

Maintainability
Test Coverage
# For testing against different releases of Rails.  This is in a
# separate fragment so that it can be sourced from the test
# application's Gemfile in addition to the main development Gemfile.

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.12.1'
  gem 'strong_parameters'
when /^4.0/
  gem "rails", "~> #{env_rails_version}"
  # A JS runtime is required for Rails 4.0+
  gem 'therubyracer', platforms: :ruby
else
  fail "Unsupported Rails version #{ENV['RAILS_VERSION']}"
end