Class: Ucode::Audit::Release::ManifestBuilder
- Inherits:
-
Object
- Object
- Ucode::Audit::Release::ManifestBuilder
- Defined in:
- lib/ucode/audit/release/manifest_builder.rb
Overview
Pure builder for the release-level manifest.json (TODO 27).
Produces a ready-to-serialize Models::Audit::ReleaseManifest from a list of FormulaAudits plus the universal-set location. Records the ucode/unicode versions, optional source-config sha256 (for Tier 1 curation provenance), aggregate formula/face counts, and the universal-set reference section.
Pure: no I/O, no global state. Caller serializes the model and writes the file.
Constant Summary collapse
- UNIVERSAL_SET_DIR =
"universal_glyph_set"- UNIVERSAL_SET_MANIFEST =
"manifest.json"- UNIVERSAL_SET_GLYPHS_DIR =
"glyphs"
Instance Method Summary collapse
Instance Method Details
#build(formulas:, release_root:, unicode_version:, ucode_version:, generated_at:, source_config_sha256: nil, universal_set_root: nil) ⇒ Models::Audit::ReleaseManifest
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 |
# File 'lib/ucode/audit/release/manifest_builder.rb', line 43 def build(formulas:, release_root:, unicode_version:, ucode_version:, generated_at:, source_config_sha256: nil, universal_set_root: nil) @release_root = release_root resolved_uset_root = universal_set_root || Ucode::Audit::Emitter::Paths.release_universal_set_root(release_root) Models::Audit::ReleaseManifest.new( ucode_version: ucode_version, unicode_version: unicode_version, generated_at: generated_at, source_config_sha256: source_config_sha256, formulas_total: formulas.size, faces_total: formulas.sum(&:faces_total), universal_set: build_universal_set(resolved_uset_root), formulas: formulas.map { |fa| build_formula_entry(fa) }, ) end |