Skip to content
This repository has been archived by the owner on Apr 14, 2021. It is now read-only.

Commit

Permalink
Add URI to http response output in debug mode
Browse files Browse the repository at this point in the history
Useful when mapping completed responses to requests when debugging to
determine which requests are still in progress.
  • Loading branch information
NickLaMuro committed Jul 25, 2016
1 parent 2a138ed commit 4df7986
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/bundler/fetcher/downloader.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def fetch(uri, options = {}, counter = 0)
raise HTTPError, "Too many redirects" if counter >= redirect_limit

response = request(uri, options)
Bundler.ui.debug("HTTP #{response.code} #{response.message}")
Bundler.ui.debug("HTTP #{response.code} #{response.message} #{uri}")

case response
when Net::HTTPSuccess, Net::HTTPNotModified
Expand Down
2 changes: 1 addition & 1 deletion spec/bundler/fetcher/downloader_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
let(:http_response) { Net::HTTPSuccess.new("1.1", 200, "Success") }

it "should log the HTTP response code and message to debug" do
expect(Bundler).to receive_message_chain(:ui, :debug).with("HTTP 200 Success")
expect(Bundler).to receive_message_chain(:ui, :debug).with("HTTP 200 Success #{uri}")
subject.fetch(uri, options, counter)
end
end
Expand Down

0 comments on commit 4df7986

Please sign in to comment.