Skip to content

Commit

Permalink
Fix build by pinning Selenium on Rails 5.2 (#2111)
Browse files Browse the repository at this point in the history
  • Loading branch information
JonRowe committed Apr 19, 2019
1 parent 77419ea commit e10484e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Rakefile
Expand Up @@ -183,7 +183,7 @@ namespace :no_active_record do

# Rails 4 cannot use a `rails` binstub generated by Bundler
sh "rm -f #{bindir}/rails"
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"
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"

in_example_app(:app_dir => example_app_dir) do
sh "./travis_retry_bundle_install.sh 2>&1"
Expand Down
6 changes: 5 additions & 1 deletion example_app_generator/generate_app.rb
Expand Up @@ -32,7 +32,11 @@
append_to_file('Gemfile', "gem 'rails-controller-testing', :git => 'https://github.com/rails/rails-controller-testing'\n")
end

if Rails::VERSION::STRING >= '5.2.0'
if Rails::VERSION::STRING >= "5.1.0"
gsub_file "Gemfile", /.*selenium-webdriver.*/, "gem 'selenium-webdriver', '<= 3.14'"
end

if Rails::VERSION::STRING >= '5.2.0' && Rails::VERSION::STRING < '6'
copy_file sqlite_initializer, 'config/initializers/sqlite3_fix.rb'
end

Expand Down

0 comments on commit e10484e

Please sign in to comment.