Class: InspecPlugins::StreamingReporterProgressBar::StreamingReporter

Inherits:
Object
  • Object
show all
Defined in:
lib/plugins/inspec-streaming-reporter-progress-bar/lib/inspec-streaming-reporter-progress-bar/streaming_reporter.rb

Overview

This class will provide the actual Streaming Reporter implementation. Its superclass is provided by another call to Inspec.plugin, this time with two args. The first arg specifies we are requesting version 2 of the Plugins API. The second says we are making a Streaming Reporter plugin component, so please make available any DSL needed for that.

Instance Method Summary collapse

Constructor Details

#initialize(output) ⇒ StreamingReporter

Returns a new instance of StreamingReporter.



62
63
64
65
66
# File 'lib/plugins/inspec-streaming-reporter-progress-bar/lib/inspec-streaming-reporter-progress-bar/streaming_reporter.rb', line 62

def initialize(output)
  @bar = nil
  @status_mapping = {}
  initialize_streaming_reporter
end

Instance Method Details

#example_failed(notification) ⇒ Object



72
73
74
# File 'lib/plugins/inspec-streaming-reporter-progress-bar/lib/inspec-streaming-reporter-progress-bar/streaming_reporter.rb', line 72

def example_failed(notification)
  set_example(notification, "failed")
end

#example_passed(notification) ⇒ Object



68
69
70
# File 'lib/plugins/inspec-streaming-reporter-progress-bar/lib/inspec-streaming-reporter-progress-bar/streaming_reporter.rb', line 68

def example_passed(notification)
  set_example(notification, "passed")
end

#example_pending(notification) ⇒ Object



76
77
78
# File 'lib/plugins/inspec-streaming-reporter-progress-bar/lib/inspec-streaming-reporter-progress-bar/streaming_reporter.rb', line 76

def example_pending(notification)
  set_example(notification, "skipped")
end