Sha256: 1168404a1a290c23d61318373167a99e50c0a85a5f04ebf031ec05de9309c0dc
Contents?: true
Size: 866 Bytes
Versions: 22
Compression:
Stored size: 866 Bytes
Contents
require "open3" class Bard::CLI < Thor class CI class Local < Struct.new(:project_name, :branch, :sha) def run start start_time = Time.new.to_i while building? elapsed_time = Time.new.to_i - start_time yield elapsed_time, nil sleep(2) end @stdin.close @console = @stdout_and_stderr.read @stdout_and_stderr.close success? end def exists? true end def console @console end attr_accessor :last_response private def start @stdin, @stdout_and_stderr, @wait_thread = Open3.popen2e("CLEAN=true bin/rake ci") end def building? ![nil, false].include?(@wait_thread.status) end def success? @wait_thread.value.success? end end end end
Version data entries
22 entries across 22 versions & 1 rubygems