-
Notifications
You must be signed in to change notification settings - Fork 60
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
Updated Rubocop to latest version #88
Conversation
Thank you for the pull request. It may take us a few days to review this admittedly simple change. We need to discuss the implications of the change and assuming Ruby 2.5 as the default. |
I generally have no problem with updating a dependency like this, as it seems like it would be a good idea to use newer versions and one would think we would have to update it eventually. But I'm confused about how Ruby 2.5 comes into play here. It appears that Rubocop has no problem running when I'm in ruby 2.5.1 on this project, using version 0.49.1 of Rubocop. I'm not really familiar with Rubocop, but is the problem that your parent project wants to traverse this gem using he newer version of Rubocop than what we have specified, and therefore you need to update the .rubocop.yml to add the right exception? But that isn't a ruby version problem since 0.49.1 appears to work in Ruby 2.5. @jawalonoski: Just FYI: We are good running 2.5 in general on this gem, as it is now required for crucible_smart_app for TLS testing support, and our .travis.yml is up to date with the versions we support. |
@arscan I had the following issue when pulling → bundle exec rake test
Running RuboCop...
Error: Unknown Ruby version 2.5 found in `.ruby-version`.
Known versions: 1.9, 2.0, 2.1, 2.2, 2.3, 2.4
RuboCop failed! I checked on a few GH issues and all were suggesting to update the gem to its latest version. Rubocop is a "development dependency" so it does not affect our apps when installing the gem :) We use it on 2.5.1 and 2.5.0 apps and older versions of rubocop without any problem. |
Ok, that's what I was missing. Rubocop is finding a Thanks for pointing this out, I wasn't aware that this was a problem! We are very lenient with the Ruby versions that we support for this gem (2.2-2.5), so we probably should be telling Rubocop to use the 2.2 style rule set, instead of the current situation where it might run against different style rules depending on the environment. To do that, we can add I added the Does this seem like a reasonable alternative to your proposed solution? |
@arscan seems like a perfect solution. I've updated my PR with the missing config :) |
Thanks @EtienneDepaulis . I have one more thing to ask -- now that we have set the target to 2.2, I don't believe that we need to silence the Could you try unsilencing that, and if it still works push that update (and I'll then merge)? Or let me know if I'm miscalculating and unsilencing it still causes the error for you. Thanks for your help! |
@arscan Here are the original errors: The What do you think ? |
Thanks for continuing to work through this with me @EtienneDepaulis -- I appreciate it. We can't change If that isn't the case, the let's just leave the Naming cop in there as it was, and I'll open an issue targeting 4.0 of this client to clean up those aspects of the API. In other words, I'm good with you reverting this last commit, and I'll merge. Make sense? |
0c0e920
to
f95a7bd
Compare
Hi @arscan, I was expecting this answer about Thanks for taking the time to find the best compromise :) |
Hello guys,
I wanted to fix a few things on your gem (we have an extended use if it as all our infrastructure is FHIR based and some of our clients are Rails apps). As we use ruby 2.5 by default, I had to update Rubocop to it's latest version. Was that the correct choice ?
I fixed a
Performance/RegexpMatch
offense and silencedNaming
ones as you did.Here are all the previous offenses:
With this PR,
bundle exec rake test
works perfectly in a 2.5.x environment.