Skip to content
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

Client v1.14.0 floods STDOUT with mashie warnings #323

Closed
ben-axnick opened this issue Feb 27, 2017 · 2 comments
Closed

Client v1.14.0 floods STDOUT with mashie warnings #323

ben-axnick opened this issue Feb 27, 2017 · 2 comments

Comments

@ben-axnick
Copy link

ben-axnick commented Feb 27, 2017

Environment

Ruby 2.4.0
Hashie 3.5.5

This likely occurs as a result of using Hashie 3.5+ , which introduced the warning "feature".

Reproducing

  1. Call client.tickets.last (or anything, really)
  2. Observe warning spam like the following:
You are setting a key that conflicts with a built-in method Hashie::Mash#class defined in
 Kernel. This can cause unexpected behavior when accessing the key via as a property. You
 can still access the key via the #[] method.
W, [2017-02-27T01:20:01.552016 #367]  WARN -- : You are setting a key that conflicts with
 a built-in method Hashie::Mash#class defined in Kernel. This can cause unexpected behavi
or when accessing the key via as a property. You can still access the key via the #[] met
hod.

Expected behaviour

If the warnings are expected, silence them. See the section relating to disable_warnings in https://github.com/intridea/hashie .

Workarounds

Set hashie logger to Rails logger or disable it entirely. This feels a little aggressive, though. e.g. https://github.com/berkshelf/berkshelf/pull/1668/files

@marisawallace
Copy link

@bentheax thanks for reporting! I'm seeing this too.

@bquorning
Copy link
Member

Fixed in v1.14.3 by #327.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants