class SimpleCov::Formatter::MetricFu
Attributes
coverage_file_path[W]
Public Instance Methods
coverage_file_path()
click to toggle source
# File lib/metric_fu/metrics/rcov/simplecov_formatter.rb, line 24 def coverage_file_path @coverage_file_path || self.coverage_file_path = default_coverage_file_path end
default_coverage_file_path()
click to toggle source
# File lib/metric_fu/metrics/rcov/simplecov_formatter.rb, line 28 def default_coverage_file_path File.join(SimpleCov.root, "coverage", "rcov", output_file_name) end
format(result)
click to toggle source
# File lib/metric_fu/metrics/rcov/simplecov_formatter.rb, line 16 def format(result) rcov_text = FormatLikeRCov.new(result).format client = MetricFu::RCovTestCoverageClient.new(coverage_file_path) client.post_results(rcov_text) end
output_file_name()
click to toggle source
TODO: Read in from legacy coverage/rcov/rcov.txt path, when set write to date-specific report file, read from if present e.g.
MetricFu::Metric.get_metric(:rcov).run_options[:output_directory] or metric_directory = MetricFu::Io::FileSystem.scratch_directory('Ymd-coverage') MetricFu::Utility.mkdir_p(metric_directory, :verbose => false)
@note legacy file name is 'rcov.txt'
going forward, the file name will be in a date-stamped format like for all other reported metrics.
# File lib/metric_fu/metrics/rcov/simplecov_formatter.rb, line 42 def output_file_name "rcov.txt" end