2017-09-17 19:10:00 -04:00
|
|
|
# Note: All of the dependencies here were obtained by running `rails new` with
|
|
|
|
# various versions of Rails and copying lines from the generated Gemfile. It's
|
|
|
|
# best to keep the gems here in the same order as they're listed there so you
|
|
|
|
# can compare them more easily.
|
|
|
|
|
2020-01-01 15:20:50 -05:00
|
|
|
# Needed for Rails 5+ controller tests
|
|
|
|
controller_test_dependency = proc do
|
|
|
|
gem 'rails-controller-testing', '>= 1.0.1'
|
2017-09-17 19:10:00 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
shared_spring_dependencies = proc do
|
Use same assertion class as Rails, if loaded
Given this scenario:
* Using Rails 4.1
* Gemfile has `gem 'shoulda-matchers', require: false`
* spec_helper has `require 'shoulda/matchers'` following
`require 'rspec/rails'`
* Using Spring to run tests
matchers that delegate to assertions in Rails (e.g. `render_template`
and `route`) will fail in the wrong way if used. They fail because in
order to use these assertions, we expect that the assertions will
raise a specific exception, an exception that corresponds to whichever
test framework that Rails is using. For Rails versions that used
Test::Unit, this is Test::Unit::AssertionFailedError. For current Rails
versions, which now use Minitest, this exception is Minitest::Assertion.
The problem is that instead of asking Rails which exception class it's
using, we are trying to detect this exception class ourselves (for
cases in which Rails is not being used). This leads to the wrong class
being detected: when using a Rails version that uses Minitest, we choose
Test::Unit::AssertionFailedError as the class. This happens using the
exact scenario above because even though shoulda-matchers is loaded
after rspec-rails, rspec-rails itself defines
Test::Unit::AssertionFailedError.
Also add Cucumber tests that confirms this exact scenario works.
2014-06-21 23:24:22 -04:00
|
|
|
gem 'spring'
|
|
|
|
gem 'spring-commands-rspec'
|
|
|
|
end
|
|
|
|
|
2017-09-17 19:10:00 -04:00
|
|
|
shared_test_dependencies = proc do
|
2020-01-01 15:20:50 -05:00
|
|
|
gem 'rspec-rails', '~> 3.9'
|
2017-09-17 19:10:00 -04:00
|
|
|
gem 'shoulda-context', '~> 1.2.0'
|
|
|
|
end
|
|
|
|
|
|
|
|
shared_dependencies = proc do
|
|
|
|
instance_eval(&shared_spring_dependencies)
|
|
|
|
instance_eval(&shared_test_dependencies)
|
|
|
|
end
|
|
|
|
|
2019-03-21 01:47:03 -04:00
|
|
|
appraise 'rails_4_2' do
|
2015-02-05 20:01:20 -05:00
|
|
|
instance_eval(&shared_dependencies)
|
2017-09-17 19:10:00 -04:00
|
|
|
|
2020-01-01 15:20:50 -05:00
|
|
|
gem 'rails', '4.2.11.1'
|
2017-07-05 10:07:34 -04:00
|
|
|
gem 'sass-rails', '~> 5.0'
|
2017-09-17 20:18:50 -04:00
|
|
|
gem 'uglifier', '>= 1.3.0'
|
2017-07-05 10:07:34 -04:00
|
|
|
gem 'coffee-rails', '~> 4.1.0'
|
2017-09-17 20:18:50 -04:00
|
|
|
gem 'jquery-rails'
|
|
|
|
gem 'turbolinks'
|
2017-07-05 10:07:34 -04:00
|
|
|
gem 'jbuilder', '~> 2.0'
|
2017-09-17 20:18:50 -04:00
|
|
|
gem 'sdoc', '~> 0.4.0', group: :doc
|
2017-07-05 10:07:34 -04:00
|
|
|
gem 'bcrypt', '~> 3.1.7'
|
2017-09-17 20:18:50 -04:00
|
|
|
|
2019-03-21 01:24:02 -04:00
|
|
|
# Other dependencies
|
2017-09-17 20:18:50 -04:00
|
|
|
gem 'activeresource', '4.0.0'
|
|
|
|
gem 'json', '~> 1.4'
|
2017-09-17 19:10:00 -04:00
|
|
|
gem 'protected_attributes', '~> 1.0.6'
|
2020-01-01 15:20:50 -05:00
|
|
|
|
|
|
|
# Database adapters
|
|
|
|
gem 'pg', '~> 0.18'
|
|
|
|
gem 'sqlite3', '~> 1.3.6'
|
2017-07-05 10:07:34 -04:00
|
|
|
end
|
|
|
|
|
2019-03-21 01:47:03 -04:00
|
|
|
appraise 'rails_5_0' do
|
2017-07-05 13:27:48 -04:00
|
|
|
instance_eval(&shared_dependencies)
|
2020-01-01 15:20:50 -05:00
|
|
|
instance_eval(&controller_test_dependency)
|
2017-09-17 19:10:00 -04:00
|
|
|
|
2020-01-01 15:20:50 -05:00
|
|
|
gem 'rails', '5.0.7.2'
|
2017-07-25 02:13:17 -04:00
|
|
|
gem 'puma', '~> 3.0'
|
|
|
|
gem 'sass-rails', '~> 5.0'
|
|
|
|
gem 'jquery-rails'
|
|
|
|
gem 'turbolinks', '~> 5'
|
2017-07-05 10:07:34 -04:00
|
|
|
gem 'jbuilder', '~> 2.5'
|
|
|
|
gem 'bcrypt', '~> 3.1.7'
|
|
|
|
gem 'listen', '~> 3.0.5'
|
2017-07-25 02:13:17 -04:00
|
|
|
gem 'spring-watcher-listen', '~> 2.0.0'
|
2019-03-21 01:24:02 -04:00
|
|
|
|
2020-01-01 15:20:50 -05:00
|
|
|
# Database adapters
|
|
|
|
gem 'pg', '~> 0.18'
|
|
|
|
gem 'sqlite3', '~> 1.3.6'
|
2017-09-17 19:10:00 -04:00
|
|
|
end
|
|
|
|
|
2019-03-21 01:47:03 -04:00
|
|
|
appraise 'rails_5_1' do
|
2017-09-17 19:10:00 -04:00
|
|
|
instance_eval(&shared_dependencies)
|
2020-01-01 15:20:50 -05:00
|
|
|
instance_eval(&controller_test_dependency)
|
2017-09-17 19:10:00 -04:00
|
|
|
|
2020-01-01 15:20:50 -05:00
|
|
|
gem 'rails', '5.1.7'
|
2017-09-17 19:10:00 -04:00
|
|
|
gem 'puma', '~> 3.7'
|
|
|
|
gem 'sass-rails', '~> 5.0'
|
|
|
|
gem 'turbolinks', '~> 5'
|
|
|
|
gem 'jbuilder', '~> 2.5'
|
|
|
|
gem 'bcrypt', '~> 3.1.7'
|
2017-09-28 01:50:07 -04:00
|
|
|
gem 'capybara', '~> 2.13'
|
|
|
|
gem 'selenium-webdriver'
|
2017-09-17 19:10:00 -04:00
|
|
|
gem 'listen', '>= 3.0.5', '< 3.2'
|
|
|
|
gem 'spring-watcher-listen', '~> 2.0.0'
|
2019-03-21 01:24:02 -04:00
|
|
|
|
2020-01-01 15:20:50 -05:00
|
|
|
# Database adapters
|
|
|
|
gem 'pg', '~> 0.18'
|
|
|
|
gem 'sqlite3', '~> 1.3.6'
|
2016-09-03 23:31:40 -04:00
|
|
|
end
|
2018-09-03 20:57:20 -04:00
|
|
|
|
2019-03-21 01:47:03 -04:00
|
|
|
appraise 'rails_5_2' do
|
2018-09-03 20:57:20 -04:00
|
|
|
instance_eval(&shared_dependencies)
|
2020-01-01 15:20:50 -05:00
|
|
|
instance_eval(&controller_test_dependency)
|
2018-09-03 20:57:20 -04:00
|
|
|
|
2020-01-01 15:20:50 -05:00
|
|
|
gem 'rails', '5.2.4.1'
|
2018-09-03 20:57:20 -04:00
|
|
|
gem 'puma', '~> 3.11'
|
|
|
|
gem 'bootsnap', '>= 1.1.0', require: false
|
|
|
|
gem 'sass-rails', '~> 5.0'
|
|
|
|
gem 'turbolinks', '~> 5'
|
|
|
|
gem 'jbuilder', '~> 2.5'
|
|
|
|
gem 'bcrypt', '~> 3.1.7'
|
|
|
|
gem 'capybara', '~> 3.1.1'
|
|
|
|
gem 'selenium-webdriver'
|
|
|
|
gem 'chromedriver-helper'
|
|
|
|
gem 'listen', '>= 3.0.5', '< 3.2'
|
|
|
|
gem 'spring-watcher-listen', '~> 2.0.0'
|
2019-03-21 01:24:02 -04:00
|
|
|
|
2020-01-01 15:20:50 -05:00
|
|
|
# Database adapters
|
|
|
|
gem 'pg', '~> 0.18'
|
|
|
|
gem 'sqlite3', '~> 1.3.6'
|
2019-03-21 01:24:02 -04:00
|
|
|
end
|
|
|
|
|
2020-11-03 00:56:49 -05:00
|
|
|
if Gem::Requirement.new('>= 2.5.0').
|
|
|
|
satisfied_by?(Gem::Version.new(RUBY_VERSION))
|
2019-05-31 01:48:30 -04:00
|
|
|
appraise 'rails_6_0' do
|
|
|
|
instance_eval(&shared_dependencies)
|
2020-01-01 15:20:50 -05:00
|
|
|
instance_eval(&controller_test_dependency)
|
2019-05-31 01:48:30 -04:00
|
|
|
|
2020-01-01 15:20:50 -05:00
|
|
|
gem 'rails', '6.0.2.1'
|
|
|
|
gem 'puma', '~> 4.1'
|
|
|
|
gem 'bootsnap', '>= 1.4.2', require: false
|
|
|
|
gem 'sass-rails', '>= 6'
|
2019-05-31 01:48:30 -04:00
|
|
|
gem 'turbolinks', '~> 5'
|
2020-01-01 15:20:50 -05:00
|
|
|
gem 'jbuilder', '~> 2.7'
|
2019-05-31 01:48:30 -04:00
|
|
|
gem 'bcrypt', '~> 3.1.7'
|
|
|
|
gem 'capybara', '>= 2.15'
|
|
|
|
gem 'listen', '>= 3.0.5', '< 3.2'
|
|
|
|
gem 'spring-watcher-listen', '~> 2.0.0'
|
|
|
|
gem 'selenium-webdriver'
|
2020-01-01 15:20:50 -05:00
|
|
|
gem 'webdrivers'
|
2019-05-31 01:48:30 -04:00
|
|
|
|
2020-01-13 17:51:43 -05:00
|
|
|
# Other dependencies
|
|
|
|
gem 'actiontext', '~> 6.0.2.1'
|
|
|
|
|
2020-01-01 15:20:50 -05:00
|
|
|
# Database adapters
|
|
|
|
gem 'pg', '>= 0.18', '< 2.0'
|
|
|
|
gem 'sqlite3', '~> 1.4'
|
2019-05-31 01:48:30 -04:00
|
|
|
end
|
2018-09-03 20:57:20 -04:00
|
|
|
end
|