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

Swap out Faraday for Hurley #35

Closed
wants to merge 8 commits into from
Closed

Swap out Faraday for Hurley #35

wants to merge 8 commits into from

Conversation

pengwynn
Copy link
Member

@pengwynn pengwynn commented Jan 5, 2015

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

@@ -1,4 +1,4 @@
require 'faraday'
require 'hurley'
require 'addressable/template'
Copy link
Member

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)

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?

Copy link
Member

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.
@pengwynn
Copy link
Member Author

@technoweenie: What do you think of 6a16a00.

Since we're already using Addressable, this will let Hurley use it for
URI parsing.
@technoweenie
Copy link
Member

Since Faraday is being deprecated, I'd prefer that Faraday gets a shim for Hurley API compatibility instead :)

@pengwynn
Copy link
Member Author

@technoweenie Check out the latest diff.

@pengwynn
Copy link
Member Author

pengwynn commented Feb 7, 2016

Looks like Faraday is here to stay. lostisland/hurley#43

@pengwynn pengwynn closed this Feb 7, 2016
@pengwynn pengwynn deleted the hurley branch February 7, 2016 22:21
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

Successfully merging this pull request may close these issues.

3 participants