Class: FunCi::Pipeline::ProgressReporter
- Inherits:
-
Object
- Object
- FunCi::Pipeline::ProgressReporter
- Defined in:
- lib/fun_ci/pipeline/progress_reporter.rb
Instance Method Summary collapse
- #fast_result(passed) ⇒ Object
-
#initialize(stdout:) ⇒ ProgressReporter
constructor
A new instance of ProgressReporter.
- #phase_one_result(results) ⇒ Object
- #slow_launched ⇒ Object
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_launched ⇒ Object
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 |