Skip to content

Commit e10484e

Browse files
authored
Fix build by pinning Selenium on Rails 5.2 (#2111)
1 parent 77419ea commit e10484e

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

Rakefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ namespace :no_active_record do
183183

184184
# Rails 4 cannot use a `rails` binstub generated by Bundler
185185
sh "rm -f #{bindir}/rails"
186-
sh "bundle exec rails new #{example_app_dir} --no-rc --skip-active-record --skip-javascript --skip-sprockets --skip-git --skip-test-unit --skip-listen --skip-bundle --template=example_app_generator/generate_app.rb"
186+
sh "bundle exec rails new #{example_app_dir} --no-rc --skip-active-record --skip-javascript --skip-bootsnap --skip-sprockets --skip-git --skip-test-unit --skip-listen --skip-bundle --template=example_app_generator/generate_app.rb"
187187

188188
in_example_app(:app_dir => example_app_dir) do
189189
sh "./travis_retry_bundle_install.sh 2>&1"

example_app_generator/generate_app.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,11 @@
3232
append_to_file('Gemfile', "gem 'rails-controller-testing', :git => 'https://github.com/rails/rails-controller-testing'\n")
3333
end
3434

35-
if Rails::VERSION::STRING >= '5.2.0'
35+
if Rails::VERSION::STRING >= "5.1.0"
36+
gsub_file "Gemfile", /.*selenium-webdriver.*/, "gem 'selenium-webdriver', '<= 3.14'"
37+
end
38+
39+
if Rails::VERSION::STRING >= '5.2.0' && Rails::VERSION::STRING < '6'
3640
copy_file sqlite_initializer, 'config/initializers/sqlite3_fix.rb'
3741
end
3842

0 commit comments

Comments
 (0)