-
Notifications
You must be signed in to change notification settings - Fork 381
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
Clean up singleton class eval statements #1529
Conversation
It looks like there's some issues with either the |
I fixed the |
Codecov Report
@@ Coverage Diff @@
## master #1529 +/- ##
=======================================
Coverage 98.23% 98.24%
=======================================
Files 877 877
Lines 42261 42253 -8
=======================================
- Hits 41517 41512 -5
+ Misses 744 741 -3
Continue to review full report at Codecov.
|
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.
LGTM 👍
end | ||
Rails::Application.singleton_class.class_eval do | ||
def inherited(base) | ||
# raise "You cannot have more than one Rails::Application" if Rails.application |
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.
Unrelated to this change, but this commented out line is a bit suspect 🤔 .
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.
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.
🚀 , 👋 2.0️⃣
Quite a few of our
class_eval
andclass_eval + class << self
statements were due to not having access the previously private #prepend or #include methods.This PR cleans up such usages.
Not all occurrences across the code base were converted, as some performed other operations (e.g. defining methods inside the
class << self
block). This PR touches the ones that are safe to do so, with minimal refactor.Ruby 2.0 deprecation checklist