Sha256: abd769f40e046a3f608c7c3c7befc151f5d47e7e489d3b9fb65e42c953adf424
Contents?: true
Size: 1.13 KB
Versions: 24
Compression:
Stored size: 1.13 KB
Contents
module RubyCI module SimpleCov module Reporting def self.included base base.instance_eval do unless (ENV['RUBY_CI_SECRET_KEY'] || '').empty? def write_last_run(result) ::SimpleCov::LastRun.write(result: result.coverage_statistics.transform_values do |stats| round_coverage(stats.percent) end) source = {} result.source_files.each do |source_file| source[source_file.filename.gsub(root, '')] = source_file.src end result_json = {} result.as_json.each do |command, data| result_json[command] = data data['coverage'].clone.each do |src, file_data| result_json[command]['coverage'].delete(src) file_data['src'] = source[src.gsub(root, '')] result_json[command]['coverage'][src.gsub(root, '')] = file_data end end RubyCI.report_simplecov(result_json.to_json) end end end end end end end
Version data entries
24 entries across 24 versions & 1 rubygems