lib/licensed/reporters/cache_reporter.rb in licensed-2.10.0 vs lib/licensed/reporters/cache_reporter.rb in licensed-2.11.0

- old
+ new

@@ -25,35 +25,35 @@ def report_source(source) super do |report| shell.info " #{source.class.type}" result = yield report - warning_reports = report.all_reports.select { |report| report.warnings.any? }.to_a + warning_reports = report.all_reports.select { |r| r.warnings.any? }.to_a if warning_reports.any? shell.newline shell.warn " * Warnings:" - warning_reports.each do |report| - display_metadata = report.map { |k, v| "#{k}: #{v}" }.join(", ") + warning_reports.each do |r| + display_metadata = r.map { |k, v| "#{k}: #{v}" }.join(", ") - shell.warn " * #{report.name}" + shell.warn " * #{r.name}" shell.warn " #{display_metadata}" unless display_metadata.empty? - report.warnings.each do |warning| + r.warnings.each do |warning| shell.warn " - #{warning}" end shell.newline end end - errored_reports = report.all_reports.select { |report| report.errors.any? }.to_a + errored_reports = report.all_reports.select { |r| r.errors.any? }.to_a if errored_reports.any? shell.newline shell.error " * Errors:" - errored_reports.each do |report| - display_metadata = report.map { |k, v| "#{k}: #{v}" }.join(", ") + errored_reports.each do |r| + display_metadata = r.map { |k, v| "#{k}: #{v}" }.join(", ") - shell.error " * #{report.name}" + shell.error " * #{r.name}" shell.error " #{display_metadata}" unless display_metadata.empty? - report.errors.each do |error| + r.errors.each do |error| shell.error " - #{error}" end shell.newline end else