Class: FunCi::Pipeline::ProgressReporter

Inherits:
Object
  • Object
show all
Defined in:
lib/fun_ci/pipeline/progress_reporter.rb

Instance Method Summary collapse

Constructor Details

#initialize(stdout:) ⇒ ProgressReporter

Returns a new instance of ProgressReporter.



6
7
8
# File 'lib/fun_ci/pipeline/progress_reporter.rb', line 6

def initialize(stdout:)
  @stdout = stdout
end

Instance Method Details

#fast_result(passed) ⇒ Object



16
17
18
# File 'lib/fun_ci/pipeline/progress_reporter.rb', line 16

def fast_result(passed)
  @stdout.puts "fun-ci: fast #{result_marker(passed)}"
end

#phase_one_result(results) ⇒ Object



10
11
12
13
14
# File 'lib/fun_ci/pipeline/progress_reporter.rb', line 10

def phase_one_result(results)
  markers = results.map { |stage, passed| "#{stage} #{result_marker(passed)}" }
  summary = results.values.all? ? "phase 1 passed" : "phase 1 failed"
  @stdout.puts "fun-ci: #{markers.join("  ")}  (#{summary})"
end

#slow_launchedObject



20
21
22
# File 'lib/fun_ci/pipeline/progress_reporter.rb', line 20

def slow_launched
  @stdout.puts "fun-ci: slow (running in background)"
end