summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick LaMuro <nicklamuro@gmail.com>2016-07-25 12:27:46 -0500
committerNick LaMuro <nicklamuro@gmail.com>2016-07-25 15:49:15 -0500
commit4df7986dc566b64e8bea5096d436f5025557b645 (patch)
tree54a795e95e5a44a295629031d80e84426b02a8d6
parent2a138ed736b2210a21588db44b567dbdea6f7a18 (diff)
downloadbundler-4df7986dc566b64e8bea5096d436f5025557b645.tar.gz
Add URI to http response output in debug mode
Useful when mapping completed responses to requests when debugging to determine which requests are still in progress.
-rw-r--r--lib/bundler/fetcher/downloader.rb2
-rw-r--r--spec/bundler/fetcher/downloader_spec.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/bundler/fetcher/downloader.rb b/lib/bundler/fetcher/downloader.rb
index a4ba4f3af8..c8d714c05a 100644
--- a/lib/bundler/fetcher/downloader.rb
+++ b/lib/bundler/fetcher/downloader.rb
@@ -14,7 +14,7 @@ module Bundler
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
diff --git a/spec/bundler/fetcher/downloader_spec.rb b/spec/bundler/fetcher/downloader_spec.rb
index 2d784b4421..8371bcfa6c 100644
--- a/spec/bundler/fetcher/downloader_spec.rb
+++ b/spec/bundler/fetcher/downloader_spec.rb
@@ -31,7 +31,7 @@ describe Bundler::Fetcher::Downloader do
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