|
11 | 11 | 'ci_retry_bundle_install.sh' |
12 | 12 | ) |
13 | 13 | function_script_file = File.join(rspec_rails_repo_path, 'script/functions.sh') |
14 | | -sqlite_initializer = File.join(rspec_rails_repo_path, "example_app_generator/config/initializers/sqlite3_fix.rb") |
15 | 14 |
|
16 | 15 | in_root do |
17 | 16 | prepend_to_file "Rakefile", "require 'active_support/all'" |
|
27 | 26 |
|
28 | 27 | append_to_file 'Gemfile', "gem 'rails-controller-testing'\n" |
29 | 28 |
|
30 | | - if Rails::VERSION::STRING >= '6' |
31 | | - gsub_file "Gemfile", /.*rails-controller-testing.*/, "gem 'rails-controller-testing', git: 'https://github.com/rails/rails-controller-testing'" |
| 29 | + gsub_file "Gemfile", /.*rails-controller-testing.*/, "gem 'rails-controller-testing', git: 'https://github.com/rails/rails-controller-testing'" |
32 | 30 |
|
33 | | - # TODO: To remove when Rails released with https://github.com/rails/rails/pull/40281 |
34 | | - append_to_file 'Gemfile', <<-EOT.gsub(/^ +\|/, '') |
35 | | - |gem 'rexml' |
36 | | - EOT |
37 | | - end |
38 | | - |
39 | | - if Rails::VERSION::STRING >= '6' |
40 | | - # sqlite3 is an optional, unspecified, dependency and Rails 6.0 only supports `~> 1.4` |
41 | | - gsub_file "Gemfile", /.*gem..sqlite3.*/, "gem 'sqlite3', '~> 1.4'" |
42 | | - else |
43 | | - # Similarly, Rails 5.0 only supports '~> 1.3.6'. Rails 5.1-5.2 support '~> 1.3', '>= 1.3.6' |
44 | | - gsub_file "Gemfile", /.*gem..sqlite3.*/, "gem 'sqlite3', '~> 1.3.6'" |
45 | | - end |
| 31 | + # sqlite3 is an optional, unspecified, dependency and Rails 6.0 only supports `~> 1.4` |
| 32 | + gsub_file "Gemfile", /.*gem..sqlite3.*/, "gem 'sqlite3', '~> 1.4'" |
46 | 33 |
|
47 | | - # webdrivers 4 up until 4.3.0 don't specify `required_ruby_version`, but contain |
48 | | - # Ruby 2.2-incompatible syntax (safe navigation). |
49 | | - # That basically means we use pre-4.0 for Ruby 2.2, and 4.3+ for newer Rubies. |
50 | | - gsub_file "Gemfile", /.*chromedriver-helper.*/, "gem 'webdrivers', '!= 4.0.0', '!= 4.0.1', '!= 4.1.0', '!= 4.1.1', '!= 4.1.2', '!= 4.1.3', '!= 4.2.0'" |
51 | | - |
52 | | - if Rails::VERSION::STRING < '6' |
53 | | - copy_file sqlite_initializer, 'config/initializers/sqlite3_fix.rb' |
54 | | - end |
| 34 | + gsub_file "Gemfile", /.*chromedriver-helper.*/, "gem 'webdrivers'" |
55 | 35 |
|
56 | 36 | if RUBY_ENGINE == "jruby" |
57 | 37 | gsub_file "Gemfile", /.*jdbc.*/, '' |
|
0 commit comments