Module: AbideDevUtils::CEM::CoverageReport

Defined in:
lib/abide_dev_utils/cem/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, ReportOutput

Class Method Summary collapse

Class Method Details

.basic_coverage(format_func: :to_yaml, ignore_benchmark_errors: false) ⇒ Object

def self.generate(outfile: 'cem_coverage.yaml', **_filters)

pupmod = AbideDevUtils::Ppt::PuppetModule.new
# filter = Filter.new(pupmod, **filters)
benchmarks = AbideDevUtils::CEM::Benchmark.benchmarks_from_puppet_module(pupmod)
Report.new(benchmarks).generate(outfile: outfile)

end



23
24
25
26
27
28
29
30
31
# File 'lib/abide_dev_utils/cem/coverage_report.rb', line 23

def self.basic_coverage(format_func: :to_yaml, ignore_benchmark_errors: false)
  pupmod = AbideDevUtils::Ppt::PuppetModule.new
  # filter = Filter.new(pupmod, **filters)
  benchmarks = AbideDevUtils::CEM::Benchmark.benchmarks_from_puppet_module(pupmod,
                                                                           ignore_all_errors: ignore_benchmark_errors)
  benchmarks.map do |b|
    AbideDevUtils::CEM::CoverageReport::BenchmarkReport.new(b).basic_coverage.send(format_func)
  end
end