class Bard::CLI::CI::Local
Attributes
last_response[RW]
Public Instance Methods
console()
click to toggle source
# File lib/bard/ci.rb, line 125 def console @console end
exists?()
click to toggle source
# File lib/bard/ci.rb, line 121 def exists? true end
run() { |elapsed_time, nil| ... }
click to toggle source
# File lib/bard/ci.rb, line 104 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
building?()
click to toggle source
# File lib/bard/ci.rb, line 137 def building? ![nil, false].include?(@wait_thread.status) end
start()
click to toggle source
# File lib/bard/ci.rb, line 133 def start @stdin, @stdout_and_stderr, @wait_thread = Open3.popen2e("bin/rake ci") end
success?()
click to toggle source
# File lib/bard/ci.rb, line 141 def success? @wait_thread.value.success? end