-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Bundler/DuplicatedGem does not recognize if statements and the like #3752
Comments
This is an interesting issue since it seems like bundler doesn't want you to specify different dependency versions depending on the ruby version. Bundler has a construct built in for specifying dependencies depending on the ruby version and if you try to convert your example to their source 'https://rubygems.org'
gem 'beaker-rspec', '~> 5.0', require: false, platforms: :ruby_22
gem 'beaker-rspec', require: false, platforms: :ruby_23
|
Note that for this particular case, you shouldn't need the
|
What if you need to run your Gemfile against multiple ruby versions. |
@mvz From what I understand of the |
This is a very common pattern in puppet module development: |
Hmm, Maybe the ruby version can be an ENV var? Seems like the gem knows what version of ruby it needs and bundler can satisfy this? I'll mess around with setting the ruby version and see if it works out... |
Yes, but because you set it to |
There hasn't been much activity on this ticket and our Core Team is spread too thin on so many tasks, so I'll just close it for the sake of having a cleaner lists of tasks to focus on. We'd gladly review a PR, but it's unlikely that'd we're going to tackle this ourselves in the foreseeable future. |
rubocop/rubocop#4432 and rubocop/rubocop#3752 have been closed against this cop which make it pretty annoying with false positives. since this is a lint that complains against a hard-error from bundler there really isn't a lot of point to this. throwing a style error to prevent a syntax error, where the linter will necessarily be inaccurate due to static analysis is not adding value.
rubocop/rubocop#4432 and rubocop/rubocop#3752 have been closed against this cop which make it pretty annoying with false positives. since this is a lint that complains against a hard-error from bundler there really isn't a lot of point to this. throwing a style error to prevent a syntax error, where the linter will necessarily be inaccurate due to static analysis is not adding value. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Since rubocop does not honour if/else blocks. As per: rubocop/rubocop#3752
Since rubocop does not honour if/else blocks. As per: rubocop/rubocop#3752
This fails and should not:
The text was updated successfully, but these errors were encountered: