Class: Henitai::SurvivorLoader
- Inherits:
-
Object
- Object
- Henitai::SurvivorLoader
- Defined in:
- lib/henitai/survivor_loader.rb
Overview
Reads a Stryker-compatible mutation report and extracts survivor data.
Returns a Report value object carrying:
- +survivor_ids+ — stable IDs of survived mutants
- +coverage_map+ — stableId → [test_files] from prior coveredBy data
- +git_sha+ — git HEAD at the time the report was written (may be nil)
Scope validation is intentionally shallow: checks schemaVersion presence and at least one file path overlap with config.includes.
Defined Under Namespace
Classes: FileNotFoundError, InvalidReportError, Report, ScopeMismatchError
Instance Method Summary collapse
-
#initialize(path, include_paths: []) ⇒ SurvivorLoader
constructor
A new instance of SurvivorLoader.
- #load ⇒ Report
Constructor Details
#initialize(path, include_paths: []) ⇒ SurvivorLoader
Returns a new instance of SurvivorLoader.
25 26 27 28 |
# File 'lib/henitai/survivor_loader.rb', line 25 def initialize(path, include_paths: []) @path = path @include_paths = include_paths end |
Instance Method Details
#load ⇒ Report
31 32 33 34 35 36 |
# File 'lib/henitai/survivor_loader.rb', line 31 def load raw = read_file report = parse_json(raw) validate_scope(report) build_report(report) end |