-
Notifications
You must be signed in to change notification settings - Fork 75
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
Swap out Faraday for Hurley #35
Conversation
@@ -1,4 +1,4 @@ | |||
require 'faraday' | |||
require 'hurley' | |||
require 'addressable/template' |
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.
Should we require addressable-uri before hurley? Since we're using Addressable anyway, might as well use it for URI parsing too.
def initialize(endpoint, options = nil) | ||
@endpoint = endpoint | ||
@conn = (options && options[:faraday]) || Faraday.new | ||
@client = (options && options[:hurley]) || Hurley::Client.new(@endpoint) |
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.
Since we are renaming the option why not use :client
?
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.
I like :client
👍 Hurley means nothing to me. I'll replace him with Ben in a heartbeat!
Callers shouldn't care if we're using Hurley by default. /cc @rafaelfranca
Instead of totally ripping out Faraday, this change provides an incremental compatibility layer on top of Hurley so folks can use either library.
@technoweenie: What do you think of 6a16a00. |
Since we're already using Addressable, this will let Hurley use it for URI parsing.
Since Faraday is being deprecated, I'd prefer that Faraday gets a shim for Hurley API compatibility instead :) |
@technoweenie Check out the latest diff. |
Looks like Faraday is here to stay. lostisland/hurley#43 |
See lostisland/faraday#454.
This moves Sawyer over from Faraday internals to the new Hurley project. Will wait until we get Octokit.rb running against this branch before thinking about merging.
/fyi @technoweenie