From a3d69bb65e7e9a4f1597c765b6be1f527c54ca2a Mon Sep 17 00:00:00 2001 From: carlad Date: Tue, 2 Aug 2016 17:36:21 +0200 Subject: [PATCH] add log_part model in comments --- lib/travis/api/v3/queries/log.rb | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/travis/api/v3/queries/log.rb b/lib/travis/api/v3/queries/log.rb index 186573ee..3f27c199 100644 --- a/lib/travis/api/v3/queries/log.rb +++ b/lib/travis/api/v3/queries/log.rb @@ -13,6 +13,15 @@ module Travis::API::V3 ## if it's not there then fetch it from S3, and return it wrapped as a compatible log_parts object with a hard coded #number (log_parts have a number) and the parts chunked (not sure how to do this) archived_log_path = archive_url("/jobs/#{params[:job.id]}/log.txt") content = open(Net::HTTP.get(URI.parse(archived_log_path))) + + ## log_part model: + ## id: nil, + ## log_id: log.id, + ## content: {"[INFO] Fetching org.eclipse.jface_3.11.1.v20160128-...}", + ## number: start at 0, increment by 1, + ## final: false, + ## created_at: log.created_at + # log_parts = [] # content.each_line do |line| # log_parts << line.chop