Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

response might not be a faraday response

  • Loading branch information...
commit d3410c9568258238e3852d2acdbd8e0fed8a92cb 1 parent 7626ef4
@rkh rkh authored
Showing with 3 additions and 1 deletion.
  1. +3 −1 lib/gh/remote.rb
View
4 lib/gh/remote.rb
@@ -67,7 +67,9 @@ def fetch_resource(key)
# Internal: ...
def generate_response(key, response)
- body, headers, url = response.body, response.headers, response.env[:url]
+ body, headers = response.body, response.headers
+ url = response.respond_to?(:url) ? response.url : response.env.try(:[], :url)
+ url = full_url(key) if url.to_s.empty?
modify(body, headers, url)
end
Please sign in to comment.
Something went wrong with that request. Please try again.