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
(SimpleCov.defer_to_existing_report?) 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, which left
the backstop inert exactly when the child run failed and its report
mattered most.
Class Method Summary collapse
Class Method Details
.path ⇒ Object
15 16 17 |
# File 'lib/simplecov/report_stamp.rb', line 15 def path File.join(SimpleCov.coverage_path, ".report_stamp") end |
.touch ⇒ Object
19 20 21 22 23 24 25 |
# File 'lib/simplecov/report_stamp.rb', line 19 def touch FileUtils.touch(path) rescue SystemCallError # A read-only or vanished coverage dir must not crash reporting; # the stamp only powers the deferral heuristic. nil end |