-
Notifications
You must be signed in to change notification settings - Fork 556
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
Support ruby http gem v1.0.0+ #554
Conversation
@@ -14,9 +14,17 @@ def self.from_webmock(webmock_response, request_signature = nil) | |||
status = Status.new(webmock_response.status.first) | |||
headers = webmock_response.headers || {} | |||
body = Body.new Streamer.new webmock_response.body | |||
uri = URI request_signature.uri.to_s if request_signature | |||
uri = URI.coerce request_signature.uri.to_s if request_signature |
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.
This is failing for me.
NoMethodError:
undefined method `coerce' for HTTP::URI:Class
Also fails if I use ::URI.coerce
NoMethodError:
undefined method `coerce' for URI:Module
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.
Oh. I don't know what I was thinking of when pushed that. Thanks for catching this up.
91b6afe
to
d2f1317
Compare
Do not merge yet - seems like Addressable::URI changes some of the internal stuff - gonna check and will get back to this ASAP |
Issue was not caused by Addressable::URI, but by WebMock appending default port to URI within request signature. |
👍 on this change -- running into this issue myself and took me a second to debug 😄 |
@davidbegin should be fine now :D |
Thanks! I'll take a look today. |
🍰 Thanks so much for fixing this! 🍰 I rebased it on master, relaxed the http rb version, and merged it in over at #559. |
Awesome! Thanks! |
No description provided.