New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Rails 5.2 & Capybara 3 support. #378
Conversation
Maybe @gobijan and @roberts1000 can cooperate on this 😉. |
Sure. I am experimenting on my PR and trying latest gem versions. @roberts1000 you have any findings to share for now? |
cucumber-rails.gemspec
Outdated
s.add_development_dependency('builder', ['>= 3.1.0', '< 4']) | ||
s.add_development_dependency('bundler', '>= 1.3.5') | ||
s.add_development_dependency('selenium-webdriver', '>= 3.4.1') | ||
s.add_development_dependency('database_cleaner', '>= 1.0.0') | ||
s.add_development_dependency('factory_girl', '>= 3.2') | ||
s.add_development_dependency('rake', '>= 0.9.2.2') | ||
s.add_development_dependency('rspec', '~> 3.0') | ||
s.add_development_dependency('rspec', '~> 3') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will allow RSpec 4, which is probably not what you want.
cucumber-rails.gemspec
Outdated
s.add_runtime_dependency('mime-types', ['>= 1.17', '< 4']) | ||
|
||
# Main development dependencies | ||
s.add_development_dependency('ammeter', ['>= 1.0.0', '!= 1.1.3']) | ||
s.add_development_dependency('appraisal', '>= 0.5.1') | ||
s.add_development_dependency('aruba', '~> 0.14.2') | ||
s.add_development_dependency('aruba', '>= 0.14.2') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The latest release of aruba is in the 0.14.x series, so this change has no effect currently.
@@ -12,23 +12,23 @@ Gem::Specification.new do |s| | |||
|
|||
s.license = 'MIT' | |||
|
|||
s.add_runtime_dependency('capybara', ['>= 1.1.2', '< 3']) | |||
s.add_runtime_dependency('capybara', ['>= 1.1.2', '< 4']) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This also resolves @Kosmas' request here: #375 (comment) 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
@gobijan Glad to see someone else is taking a look at this one! I didn't hit the same test failures that you hit. I tried to avoid changing gem/ruby versions if they weren't related to Rails 5.2 so that may the reason for the difference. My PR is failing on a bootsnap loading error. |
.travis.yml
Outdated
@@ -1,8 +1,7 @@ | |||
rvm: | |||
- 2.2.9 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would suggest keeping this, as cucumber-rails still is using Ruby 2.2. If Rails 5.2 requires higher, then I suggest excluding it below in .travis.yml
.
cucumber-rails.gemspec
Outdated
s.add_runtime_dependency('mime-types', ['>= 1.17', '< 4']) | ||
|
||
# Main development dependencies | ||
s.add_development_dependency('ammeter', ['>= 1.0.0', '!= 1.1.3']) | ||
s.add_development_dependency('appraisal', '>= 0.5.1') | ||
s.add_development_dependency('aruba', '~> 0.14.2') | ||
s.add_development_dependency('aruba', '>= 0.14.2') | ||
s.add_development_dependency('builder', ['>= 3.1.0', '< 4']) | ||
s.add_development_dependency('bundler', '>= 1.3.5') | ||
s.add_development_dependency('selenium-webdriver', '>= 3.4.1') | ||
s.add_development_dependency('database_cleaner', '>= 1.0.0') | ||
s.add_development_dependency('factory_girl', '>= 3.2') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider changing this to factory_bot
while you're here too. There will need to be some other changes made to the features (like emulate_javascript.feature
too)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've just submitted a PR to your repo for this: gobijan#2
Make click_with_javascript_emulation take any args
I just merged the pull requests in. Let's see :) |
Apart from the `geckodriver -v` issues in a few runs, it is looking pretty good! Great work, everyone!
…On Fri., 20 Apr. 2018, 16:20 Bijan Rahnema, ***@***.***> wrote:
I just merged the pull requests in. Let's see :)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#378 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AI4pzQ7ae4q-O1BipBIKVPwrCUeAhr9-ks5tqX4igaJpZM4TRHPH>
.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've restarted the erroneous tests and can confirm everything is working. Let's work on the requested changes in the reviews above, then we can get this merged. :)
cucumber-rails.gemspec
Outdated
@@ -37,7 +37,7 @@ Gem::Specification.new do |s| | |||
s.add_development_dependency('rdoc', '>= 3.4') | |||
s.add_development_dependency('yard', '>= 0.8.7') | |||
|
|||
s.required_ruby_version = '>= 2.2.0' | |||
s.required_ruby_version = '>= 2.3.0' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cucumber-ruby
supports >= 2.2
, so we should change this back to keep things standardised.
features/emulate_javascript.feature
Outdated
@@ -16,12 +16,12 @@ Feature: Emulate Javascript | |||
And I write to "features/step_definitions/s.rb" with: | |||
""" | |||
Given /^there is a widget named "([^"]*)"$/ do |name| | |||
FactoryGirl.create(:widget, name: name) | |||
FactoryBot.create(:widget, :name => name) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We shouldn't regress with this. :key => value
is the old Ruby style. :)
features/emulate_javascript.feature
Outdated
@@ -73,12 +73,12 @@ Feature: Emulate Javascript | |||
And I write to "features/step_definitions/s.rb" with: | |||
""" | |||
Given /^there is a widget named "([^"]*)"$/ do |name| | |||
FactoryGirl.create(:widget, name: name) | |||
FactoryBot.create(:widget, :name => name) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We shouldn't regress with this. :key => value
is the old Ruby style. :)
cucumber-rails.gemspec
Outdated
s.add_development_dependency('rake', '>= 0.9.2.2') | ||
s.add_development_dependency('rspec', '~> 3.0') | ||
s.add_development_dependency('rspec', '~> 3') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should become ~> 3.0
again to avoid allowing rspec 4 automatically when it arrives.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Woops. I'll fix that now - thanks @mvz!
Almost there \o/ |
Hi @gobijan, Thanks for your making your first contribution to Cucumber, and welcome to the Cucumber committers team! You can now push directly to this repo and all other repos under the cucumber organization! 🍾 In return for this generous offer we hope you will:
On behalf of the Cucumber core team, |
All merged! The last change wouldn't have any impact on the test suite. :) |
Nice! Thanks everyone for contributing on this 😀 Was fun to see open source at it's best. |
When working on cucumber/cucumber-rails#378, we would sometimes see that the builds would be unable to connect to the Geckodriver. On further investigation, this seems to be caused by the Geckodriver not being downloaded in the first place. I think that this is due to GitHub's API rate limiting certain build machines from accessing their API. A better approach would be to hardcode the URLs for the assets -- since they're easily predicatable -- and then to bump this gem whenever a new release comes out.
Wonderful :) I've opened a PR on DevicoSolutions/geckodriver-helper#5 which should hopefully put an end to the intermittent builds too. |
In the meantime, could we please get a new gem release containing this PR's fixes? I believe that would allow codebases that use cucumber-rails to also upgrade to Rails 5.2. |
@radar, we'll need to finalise the changelog first (#385), but once we've done this, we'll have to get @mvz, @olleolleolle, or @aslak to proceed with a release (when they're ready). |
@xtrasimplicity That's a different Aslak 🙂 |
Woops! Thanks @mvz. @aslakhellesoy Would you be able to build the latest release and push it to rubygems.org, when you get a chance? (Or alternatively, could I have access to do this? 😀) Thanks heaps! |
Summary
Relax the runtime dependencies to allow railties version 5.2.
Details
Relax the runtime dependencies to allow railties version 5.2.
Motivation and Context
Allow Rails 5.2 now that it's released.
How Has This Been Tested?
No introduction of new tests. Relying on tests that are already there.
Screenshots (if appropriate):
none.
Types of changes
Checklist: