-
Notifications
You must be signed in to change notification settings - Fork 34
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
Update AmazingPrint::MongoMapper for frozen strings #44
Conversation
Also, - Regenerate gemfiles - Ignore some Rubocop issues with generated gemfiles
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.
It looks like the # frozen_string_literal: true
have been removed, which AFAIK means, that those string literals aren't frozen anymore. Was that the intention?
@@ -90,7 +90,7 @@ def awesome_mongo_mapper_instance(object) | |||
label = "#{colorize('embedded', :assoc)} #{label}" | |||
end | |||
|
|||
"#{label} " << awesome_hash(data) | |||
[label, awesome_hash(data)].join(' ') |
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.
If the String should stay mutable, this should work too: +"#{label} #{awesome_hash(data)}"
. Up to you which one's more readable.
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.
I went back and forth on this one but based on #41 I thought using the same approach everywhere was nice.
@paddor I know the frozen string comments were removed from gemfiles as part of generating with appraisal. I thought this was fine since it's only for testing. Ignoring that and single quotes in Rubocop prevents needing to "correct" the gemfiles after running |
I'm not sure how many folks are using
mongo_mapper
but I noticed a fix was needed here and that specs were not running so I brought them back.