-
Notifications
You must be signed in to change notification settings - Fork 107
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
Mogli with latest httparty versions #150
Comments
I vote for format json, but I’ll do whatever you recommend. Mike On May 16, 2014, at 1:52 PM, Sérgio Patrício [email protected] wrote:
|
Forget this, I was using mogli '0.0.44'. With version '0.0.46' this was solved in 0ce0969 |
Using mogli with httparty version '>= 0.12.0' gives me the following error when using
Mogli::Client.create_from_code_and_authenticator
:From my analysis the problem is caused because of the commit jnunemaker/httparty@b7d4e21 in httparty. Basically before this commit the response with content type
text/javascript
was parsed as json, and now with httparty version '>= 0.12.0' is parsed as plain text.In
lib/mogli/user.rb
where it should have an hash it has a string with the hash inside, and this causes the error above.One possible solution is to update the gemspec dependencies to limit httparty, With this https://github.com/sergiopatricio/mogli/tree/httparty-fix-dependency it works.
Another possible solution is to add
:format=>:json
to the line in https://github.com/mmangino/mogli/blob/master/lib/mogli/client.rb#L153 like this:The problem here is that I don't know the consequences of this because
get_and_map
is used in a few places.I only use mogli to make user posts so it's hard to see if anything breaks with this change.
Do you have an opinion on the best approach to solve this problem?
(Note: this may be related with #142)
The text was updated successfully, but these errors were encountered: