Repository navigation
Silence Hashie::Mash logger on Hashie 3.5.0+ - #874
Merged
Merged
Conversation
michaelherold
force-pushed
the
silence-mash-logger
branch
from
February 3, 2017 21:49
4831e33 to
5c906ed
Compare
Closed
michaelherold
force-pushed
the
silence-mash-logger
branch
2 times, most recently
from
February 3, 2017 23:08
dfb8d7a to
f819d09
Compare
Contributor
Author
|
The test around this are ... convoluted ... because of the requirement for coverage not dropping. |
Contributor
Author
|
The failure on 1.8.7 doesn't seem to have anything to do with this change. |
Member
|
Hey @michaelherold, would you mind either rebasing on master or allowing edits from maintainers? Thanks! |
We introduced a new logger for Mash due to the huge number of issues that we get where people try to set keys on their Mash. This change silences the info messages that get logged when a Mash has a conflict with a method name. I had to do this in a kind of hacky way. Since OmniAuth supports Hashie versions `>= 1.2, < 4`, I can't just hook into the method that we'll be adding in 3.5.2. As such, I apply an override for the logging method if the disable method isn't present. I'm also only overriding the method in versions that have the logging capability.
michaelherold
force-pushed
the
silence-mash-logger
branch
from
February 5, 2017 21:35
f819d09 to
00481a9
Compare
Contributor
Author
|
There you go @tmilewski - I rebased it. I don't see any setting that should be preventing you from editing. Please let me know if there's anything else I can do! |
Member
|
Perfect, thank you! |
Contributor
Author
|
I just released Hashie v3.5.2 which has the |
|
@michaelherold Thanks 👍 |
oliverguenther
added a commit
to opf/openproject
that referenced
this pull request
Jun 13, 2017
Fixes hashie warnings of the kind ``` You are setting a key that conflicts with a built-in method Foo#bar. ``` Warnings have been silenced in: omniauth/omniauth#874 Since our PR (omniauth/omniauth#837) has not been answered, we maintain our own fork.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We introduced a new logger for Mash due to the huge number of issues
that we get where people try to set keys on their Mash. This change
silences the info messages that get logged when a Mash has a conflict
with a method name.
I had to do this in a kind of hacky way. Since OmniAuth supports Hashie
versions
>= 1.2, < 4, I can't just hook into the method that we'll beadding in 3.5.2. As such, I apply an override for the logging method if
the disable method isn't present.
I'm also only overriding the method in versions that have the logging
capability.
If anyone has a better suggestion on how to handle this, I'm open to
suggestions! I'm also open to changing the
KeyStorename. I wentwith that because
OmniAuth::Mashwouldn't communicate much if youaren't familiar with Hashie.
Fixes #872