Skip to content

Instantly share code, notes, and snippets.

@meatballhat
Last active March 22, 2017 22:50
Show Gist options
  • Save meatballhat/e56a9e5d0bd3e36fe9053aca207efa01 to your computer and use it in GitHub Desktop.
Save meatballhat/e56a9e5d0bd3e36fe9053aca207efa01 to your computer and use it in GitHub Desktop.

NOTE: the TEXT const is defined here with value "application/json; chunked=true; version=2, application/json; version=2, text/plain"

diff --git a/lib/travis/client/artifact.rb b/lib/travis/client/artifact.rb
index f53e619..723d59a 100644
--- a/lib/travis/client/artifact.rb
+++ b/lib/travis/client/artifact.rb
@@ -39,7 +39,7 @@ module Travis
attributes['current_body'] ||= begin
body = load_attribute('body')
if body.to_s.empty?
- log = session.get_raw("jobs/#{job_id}/log", nil, "Accept" => TEXT)
+ log = session.get_raw("jobs/#{job_id}/log", nil, 'Accept' => 'text/plain')
body = String === log ? log : log['log']['body']
end
body
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment