Module: SimpleCov::ReportStamp

Defined in:
lib/simplecov/report_stamp.rb

Overview

Touches coverage/.report_stamp whenever a report is formatted, no matter how the run ends. The clobber-prevention backstop needs an on-disk signal that a fresher report exists, and .last_run.json can't be it alone: that file is only written after fully successful runs.

Class Method Summary collapse

Class Method Details

.pathObject



12
13
14
# File 'lib/simplecov/report_stamp.rb', line 12

def path
  File.join(SimpleCov.coverage_path, ".report_stamp")
end

.touchObject

A read-only or vanished coverage dir must not crash reporting; the stamp only powers the deferral heuristic.



18
19
20
21
22
# File 'lib/simplecov/report_stamp.rb', line 18

def touch
  FileUtils.touch(path)
rescue SystemCallError
  nil
end