Sha256: 48f01eb1258c38bdf86fe8a4ca86a55b087335f35f686f4dc5399014ed6c8305
Contents?: true
Size: 728 Bytes
Versions: 12
Compression:
Stored size: 728 Bytes
Contents
module Shipit class CommitChecksController < ShipitController def show checks.schedule end params do accepts :since, Integer, default: 0 end def tail output = checks.output(since: params.since) url = nil unless checks.finished? next_offset = params.since + output.bytesize url = stack_tail_commit_checks_path(stack, sha: commit.sha, since: next_offset) end render json: {url: url, output: output, status: checks.status} end private delegate :checks, to: :commit def commit @commit ||= stack.commits.find_by_sha!(params[:sha]) end def stack @stack ||= Stack.from_param!(params[:stack_id]) end end end
Version data entries
12 entries across 12 versions & 1 rubygems