Module: AbideDevUtils::CEM::Generate::CoverageReport

Defined in:
lib/abide_dev_utils/cem/generate/coverage_report.rb

Overview

Methods and objects used to construct a report of what CEM enforces versus what the various compliance frameworks expect to be enforced.

Defined Under Namespace

Classes: BenchmarkReport, Filter, OldReport, ReportOptions, ReportOutput, ReportOutputCorrelation

Class Method Summary collapse

Class Method Details

.generate(format_func: :to_h, opts: {}) ⇒ Object



17
18
19
20
21
22
23
24
25
# File 'lib/abide_dev_utils/cem/generate/coverage_report.rb', line 17

def self.generate(format_func: :to_h, opts: {})
  opts = ReportOptions.new(opts)
  pupmod = AbideDevUtils::Ppt::PuppetModule.new
  benchmarks = AbideDevUtils::CEM::Benchmark.benchmarks_from_puppet_module(pupmod,
                                                                           ignore_all_errors: opts.ignore_all_errors)
  benchmarks.map do |b|
    BenchmarkReport.new(b, opts).run.send(format_func)
  end
end