Module: Bundler::Audit::CLI::Formats::Junit

Defined in:
lib/bundler/audit/cli/formats/junit.rb

Instance Method Summary collapse

Instance Method Details

Prints any findings as an XML junit report.

Parameters:

  • report (Report)

    The results from the Scanner.

  • output (IO, File) (defaults to: $stdout)

    Optional output stream.



35
36
37
38
39
40
41
42
43
44
45
46
# File 'lib/bundler/audit/cli/formats/junit.rb', line 35

def print_report(report, output=$stdout)
  original_stdout = $stdout
  $stdout = output

  print_xml_testsuite(report) do
    report.each do |result|
      print_xml_testcase(result)
    end
  end

  $stdout = original_stdout
end