|
26 | 26 | gsub_file "Gemfile", /.*gem..sqlite3.*/, "gem 'sqlite3', '~> 1.3.6'"
|
27 | 27 | gsub_file "Gemfile", /.*bootsnap.*/, ""
|
28 | 28 |
|
29 |
| - if Rails::VERSION::STRING >= '5.0.0' |
30 |
| - append_to_file('Gemfile', "gem 'rails-controller-testing'\n") |
31 |
| - end |
| 29 | + append_to_file('Gemfile', "gem 'rails-controller-testing'\n") |
32 | 30 |
|
33 | 31 | if Rails::VERSION::STRING >= '6'
|
34 | 32 | gsub_file "Gemfile", /.*gem..sqlite3.*/, "gem 'sqlite3', '~> 1.4'"
|
35 | 33 | gsub_file "Gemfile", /.*rails-controller-testing.*/, "gem 'rails-controller-testing', git: 'https://github.com/rails/rails-controller-testing'"
|
36 | 34 | end
|
37 | 35 |
|
| 36 | + if RUBY_VERSION < "2.3.0" |
| 37 | + gsub_file "Gemfile", /.*childprocess.*/, "gem 'childprocess', '< 2.0.0'" |
| 38 | + gsub_file "Gemfile", /.*i18n.*/, "gem 'i18n', '< 1.5.2'" |
| 39 | + gsub_file "Gemfile", /.*nio4r.*/, "gem 'nio4r', '< 2.4.0'" |
| 40 | + gsub_file "Gemfile", /.*public_suffix.*/, "gem 'public_suffix', '< 4.0.0'" |
| 41 | + gsub_file "Gemfile", /.*rack.*/, "gem 'rack', '< 2.2.0', '!= 2.1.0'" |
| 42 | + gsub_file "Gemfile", /.*xpath.*/, "gem 'xpath', '< 3.2.0'" |
| 43 | + end |
| 44 | + |
38 | 45 | if Rails::VERSION::STRING >= "5.1.0"
|
39 | 46 | if RUBY_VERSION < "2.3"
|
40 | 47 | gsub_file "Gemfile", /.*capybara.*/, "gem 'capybara', '~> 3.1.0'"
|
41 | 48 | elsif RUBY_VERSION < "2.4"
|
42 | 49 | gsub_file "Gemfile", /.*capybara.*/, "gem 'capybara', '~> 3.15.0'"
|
| 50 | + elsif RUBY_VERSION < "2.5" |
| 51 | + gsub_file "Gemfile", /.*capybara.*/, "gem 'capybara', '~> 3.32.0'" |
43 | 52 | end
|
44 | 53 | if Rails::VERSION::STRING >= "5.2.0"
|
45 | 54 | gsub_file "Gemfile", /.*chromedriver-helper.*/, "gem 'webdrivers', '< 4.0.0'"
|
|
0 commit comments