8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
# File 'lib/rcov/plugin.rb', line 8
def report(current_url:, master_url:, show_warning: true)
current_report = get_report(url: current_url)
master_report = get_report(url: master_url)
@current_report = current_report
@master_report = master_report
if show_warning && master_report && master_report.dig('metrics', 'covered_percent').round(2) > current_report.dig('metrics', 'covered_percent').round(2)
warn("Code coverage decreased from #{master_report.dig('metrics', 'covered_percent').round(2)}% to #{current_report.dig('metrics', 'covered_percent').round(2)}%")
end
output_report(current_report, master_report)
end
|