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

Hashie takes issue with "index" on ActionNetwork's entry point #13

Open
mashedkeyboard opened this issue Jul 3, 2020 · 1 comment
Open
Labels
enhancement New feature or request

Comments

@mashedkeyboard
Copy link

mashedkeyboard commented Jul 3, 2020

Hi folks, thanks for this great library!

On running client.entry_point.authenticated_successfully?, you will see the following warning:

You are setting a key that conflicts with a built-in method Hashie::Mash#index defined in Hash. This can cause unexpected behavior when accessing the key as a property. You can still access the key via the #[] method.

This warning is, of course, largely inconsequential, as a result of the fact that the only presence of index as a key is in the docs link. However, it's still a warning, so it might be an idea to try and address it in some way or another. It looks like the only real way of doing that would be switching away from Hashie in Vertebrae, though, so it may be a WONTFIX.

@woodhull
Copy link
Member

woodhull commented Jul 6, 2020

Switching out hashie for a more carefully crafted approach is not high on our internal priority list right now (the code as is works for our use cases), but we would of course welcome and consider a PR with a change to improve the json parsing.

Hashie is a bit of a hammer/code smell, (the memory usage is worrying too!) but it makes it so easy to work with arbitrary json input in a ruby-like manner.

@woodhull woodhull added the enhancement New feature or request label Jul 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants