Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 has a side effect of users not being able to update to Capybara 3 when it releases, since the requirement is in non user modifiable source. Additionally master now depends on
~> 2.15
. Wouldn't it be better asgem "capybara", ">= 2.15"
in this file? (~> 2.15 makes sense in the apps generated Gemfile though)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 submitted it this way as that's what was requested on #30952. I'm assuming the preferred convention here is to match rubygem's preference that open-ended dependencies are to be avoided.
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.
It is fine to not allow update to capybara 3 since rails may not work with that version, but yeah, it should be 2.15. I'll update it.
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.
@rafaelfranca It will work with 3 since 3 is just going to be a remove deprecations and drop ruby versions release. However, this is adding a requirement just for a warning in a non user editable file - The more restrictive requirement in the Gemfile generated for an app is correct, and where the actual restriction should be (so users can modify that when Capybara 3 is released, if desired). I really feel this should be
>= 2.15
in this file.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.
@twalpole so I should be good to use
gem 'capybara', '~> 3.0.2', '< 4.0'
in my Rails 5.1 app? I'm experiencing #30952There 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.
@MrHubble If you're using Rails 5.1 you should be able to use
gem 'capybara', '~> 2.18'
in your gem file since Rails 5.1 won't allow Capybara 3+ due to this change (which IMHO was bad and has been corrected in 5.2) if you're using system tests. With Rails 5.2 you should be good to usegem 'capybara', '~> 3.0'
(note that specifying the<4.0
is unnecessary due to the the way~>
worksThere 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.
Great. Thanks so much for taking the time to clarify.