Sha256: 6ee594406091ee5234c7c93304f5639ab81ff90831c3b9685bce9012507af3c9
Contents?: true
Size: 762 Bytes
Versions: 10
Compression:
Stored size: 762 Bytes
Contents
# frozen_string_literal: true 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
10 entries across 10 versions & 1 rubygems