12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
# File 'lib/codecov/formatter.rb', line 12
def format(report)
result = {
'meta' => {
'version' => "codecov-ruby/v#{::Codecov::VERSION}"
}
}
result.update(result_to_codecov(report))
begin
result_path = File.join(::SimpleCov.coverage_path, RESULT_FILE_NAME)
File.write(result_path, result['codecov'])
puts "Coverage report generated to #{result_path}.\n#{result}"
rescue Errno::ENOENT => e
puts e
puts "Could not write coverage report to file.\n#{result}"
end
result
end
|