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

test breakage under Faraday 0.9.x/1.0 (pre-release) #40

Closed
technoweenie opened this issue Oct 29, 2012 · 1 comment
Closed

test breakage under Faraday 0.9.x/1.0 (pre-release) #40

technoweenie opened this issue Oct 29, 2012 · 1 comment

Comments

@technoweenie
Copy link

Hey, I've made some radical changes to the underlying builder/middleware system in Faraday. Her has just one test failure when run in legacy mode:

  1) Her::API initialization#setup takes custom options
     Failure/Error: @api.setup :foo => { :bar => "baz" }, :url => "https://api.example.com"
     NoMethodError:
       undefined method `foo=' for #<Faraday::ConnectionOptions:0x007ffabf31c538>
     # ./lib/her/api.rb:56:in `setup'
     # ./spec/api_spec.rb:34:in `block (4 levels) in <top (required)>'

Faraday 0.9 and up has replaced the nested hashes that Faraday::Connection.new takes in favor of Structs. The benefit is that misspelled options immediately raise exceptions, instead of subtly introducing bugs. The downside is that you can no longer pass custom options around.

Is Her relying on this functionality?

@remi
Copy link
Owner

remi commented Oct 29, 2012

No, Her is not relying on this functionality. Parameters are just stored in Her::API and I was passing them to Faraday.new because it contains the url required parameter.

I just pushed ca548f1 to make sure Her will run fine in future Faraday versions (at least in legacy mode for now). I’ll look into the new callbacks/middleware structure later.

Thanks for the notice!

@remi remi closed this as completed Nov 2, 2012
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

No branches or pull requests

2 participants