Class: Ucode::Commands::UniversalSet::ReportCommand
- Inherits:
-
Object
- Object
- Ucode::Commands::UniversalSet::ReportCommand
- Defined in:
- lib/ucode/commands/universal_set.rb
Overview
ucode universal-set report — re-emit coverage reports from
an existing manifest. Useful when iterating on the manifest
shape (or regenerating reports after a model change) without
re-running the build.
Instance Method Summary collapse
-
#call(version, output_root:) ⇒ Hash
The CoverageReport#emit payload.
Instance Method Details
#call(version, output_root:) ⇒ Hash
Returns the CoverageReport#emit payload.
176 177 178 179 180 181 182 183 184 185 186 187 |
# File 'lib/ucode/commands/universal_set.rb', line 176 def call(version, output_root:) root = Pathname.new(output_root) manifest_path = root.join("manifest.json") raise Ucode::Error, "manifest not found at #{manifest_path}" unless manifest_path.exist? manifest = Ucode::Models::UniversalSetManifest.from_hash( JSON.parse(manifest_path.read), ) database = Database.open(version) Glyphs::UniversalSet::CoverageReport.new(root, database: database) .emit(manifest) end |