-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Deprecator improvements #2997
Deprecator improvements #2997
Conversation
In preparation for removing deprecations for certain generators, this commit documents the Deprecator and how to test deprecated generators. It also adds a unit test using newly added matchers based on Rails deprecation matchers. With this change, we can remove generators in a follow up PR while having the Deprecator covered and documented.
c53bade
to
f86ba5e
Compare
@@ -1,17 +1,70 @@ | |||
# frozen_string_literal: true | |||
|
|||
# Based on Rails ActiveSupport Deprecator | |||
# https://github.com/rails/rails/blob/6f0d1ad14b92b9f5906e44740fce8b4f1c7075dc/activesupport/lib/active_support/deprecation/constant_accessor.rb | |||
# https://github.com/rails/rails/blob/main/activesupport/lib/active_support/deprecation/constant_accessor.rb |
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 changes here are mostly documentation and identation.
@@ -0,0 +1,41 @@ | |||
# frozen_string_literal: true |
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.
Moved this file from test/faker/ to test/faker/support.
a9fabc2
to
f3102de
Compare
@@ -6,7 +6,7 @@ source 'https://rubygems.org' | |||
gemspec | |||
|
|||
gem 'benchmark' | |||
gem 'minitest', '5.25.0' | |||
gem 'minitest', '5.25.1' |
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.
Ruby head was not happy with the old version. This new version works for all Ruby versions in CI.
f3102de
to
d8b2327
Compare
In preparation for removing deprecations for certain generators, this commit documents the Deprecator and how to test deprecated generators. It also adds a unit test using newly added matchers based on Rails deprecation matchers. This new test is independent from any "real" deprecated generator that can be removed at any time.
With this change, we can remove generators in a follow up PR while having the Deprecator covered and documented.