From e3c0d971e04d5ad0171a4dff02ce668c50a61b84 Mon Sep 17 00:00:00 2001 From: Noah Davis Date: Tue, 24 Sep 2013 00:51:44 -0400 Subject: [PATCH] Add some verbose debugging information --- lib/code_climate/test_reporter/client.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/code_climate/test_reporter/client.rb b/lib/code_climate/test_reporter/client.rb index 9abe9fd..e8a9e26 100644 --- a/lib/code_climate/test_reporter/client.rb +++ b/lib/code_climate/test_reporter/client.rb @@ -50,12 +50,16 @@ def post_results(result) uri = URI.parse("#{host}/test_reports") http = http_client(uri) + http.set_debug_output($stderr) + request = Net::HTTP::Post.new(uri.path) request["User-Agent"] = USER_AGENT request["Content-Type"] = "application/json" request["Content-Encoding"] = "gzip" request.body = compress(result.to_json) + puts "About to post #{request.body.length} bytes" + response = http.request(request) if response.code.to_i >= 200 && response.code.to_i < 300