-
-
Notifications
You must be signed in to change notification settings - Fork 263
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
Don't use FreezeTime cop in Rails <5.2 #918
Don't use FreezeTime cop in Rails <5.2 #918
Conversation
@@ -0,0 +1 @@ | |||
* Fix `Rails/FreezeTime` running against Rails < 5.2 apps. ([@DRBragg][]) |
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.
Can you add the PR address?
* Fix `Rails/FreezeTime` running against Rails < 5.2 apps. ([@DRBragg][]) | |
* [#918](https://github.com/rubocop/rubocop-rails/pull/918): Fix `Rails/FreezeTime` running against Rails < 5.2 apps. ([@DRBragg][]) |
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.
Yes, absolutely! I apologize that I didn't have it in there originally. When I read the Contributing guide section on the changelog I assumed it only applied to issue links
0a96ee6
to
9b45334
Compare
@koic Is there a policy on which Rails versions rubocop-rails should support? |
@andyw8 Rails 4.2 and above now: But honestly strongly conservative about supporting older versions. This patch is acceptable because it is a minor fix to existing feature and is not difficult to maintain. I haven't decided yet, but in the future the following may hint at maintenance policy: |
@DRBragg CI is failing. Can you take a look? |
`freeze_time` wasn't added until Rails 5.2.
9b45334
to
186e6b4
Compare
I'm sorry @koic, I missed a linter error. Please forgive the oversight... |
Never mind! Thank you for the fixing! |
freeze_time
wasn't added until Rails 5.2, so running this cop against a Rails <= 5.1 app returns inaccurate offenses.I have:
minimum_target_rails_version
to5.2
in theRails/FreezeTime
Cop.Before submitting the PR make sure the following are checked:
[Fix #issue-number]
(if the related issue exists).master
(if not - rebase it).bundle exec rake default
. It executes all tests and runs RuboCop on its own code.{change_type}_{change_description}.md
if the new code introduces user-observable changes. See changelog entry format for details.