-
Notifications
You must be signed in to change notification settings - Fork 137
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
Use Faraday instead of Patron #88
Conversation
This looks really, really great. I'm just curious as to what the good use-cases for Faraday are? I'm probably going to merge this anyway, but I'm curious. Also, would be interested to hear from @ericcj on this (and anyone else!). |
Faraday is an abstract layer for http adapters, so you use the same interface, but easily change http adapter. Next is based on middlewares so you can move the processing of http requests form main part of you application, and gain much cleaner code. Imho the middleware support is the real power of Faraday. |
query = foo_query.or(bar_query) | ||
assert_equal 2, query.get.size | ||
#end | ||
foo = Parse::Object.new "Post" |
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.
was vcr disabled in this one intentionally? it seems like it would work
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.
Yes because it did't work :/ I think it's because of "random query"
The same is for test_user.rb.
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's easy to fix, foo["random"] = 'blah' and for the next one bar["random"] = 'meow' instead of using rand
thanks for this pull, it's definitely what i was looking for us to do with client.rb. ship it after my couple concerns |
@chytreg would love to see this get merged. will you have a chance to look over those last couple remaining comments? thanks again |
So what are the main issues here that need to be fixed? |
mostly the retry logic, and also would be nice to keep the logging on retries |
I'm quite busy, but will try to look in to it asap. Pozdrawiam 2013/6/5 Eric Jensen notifications@github.com
|
thanks! if you don't get to it we will eventually |
👍 |
Should be nice to merge to master ! |
👍 on this one, would love to see this merged in. |
Just failed to deploy because And installing
👍 on this PR |
Faraday is the library now used to issue HTTP calls. This should be closed. |
Hi,
I did quite big rewrite of client.rb to use Faraday library.
This give us all benefits of Faraday gem https://github.com/lostisland/faraday
The client.rb is much cleaner retry and json parsing are as the middleware.
I change default json pare to yail-ruby because is much quicker and has seamless integration flow.
We can use for example typhoeus adapater: