class Bard::CI::Local
Public Instance Methods
Source
# File lib/bard/ci/local.rb, line 6 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
Private Instance Methods
Source
# File lib/bard/ci/local.rb, line 37 def building? ![nil, false].include?(@wait_thread.status) end
Source
# File lib/bard/ci/local.rb, line 33 def start @stdin, @stdout_and_stderr, @wait_thread = Open3.popen2e("CLEAN=true bin/rake ci") end
Source
# File lib/bard/ci/local.rb, line 41 def success? @wait_thread.value.success? end