Skip to content

Commit d2d8a21

Browse files
JonRowebenoittgt
authored andcommitted
Pin webdrivers on older ruby.
Prevent webdrivers from using `&.` method on unsupported ruby.
1 parent 5e2015a commit d2d8a21

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

example_app_generator/generate_app.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,11 @@
4242
if RUBY_VERSION < "2.4"
4343
gsub_file "Gemfile", /.*capybara.*/, "gem 'capybara', '~> 3.15.0'"
4444
end
45-
gsub_file "Gemfile", /.*chromedriver-helper.*/, "gem 'webdrivers'"
45+
if Rails::VERSION::STRING >= "5.2.0" && RUBY_VERSION < '2.3.0'
46+
gsub_file "Gemfile", /.*chromedriver-helper.*/, "gem 'webdrivers', '< 4.0.0'"
47+
else
48+
gsub_file "Gemfile", /.*chromedriver-helper.*/, "gem 'webdrivers'"
49+
end
4650
end
4751

4852
if Rails::VERSION::STRING >= '5.2.0' && Rails::VERSION::STRING < '6'

0 commit comments

Comments
 (0)