Module: Hecks::Ports::Persistence::Plugins::Era
- Defined in:
- lib/hecks/ports/persistence/plugins/era.rb
Overview
ADR 0033 — requiring THIS FILE is installing the plugin. Nothing in
Hecks core requires it; an app that binds PostgresEra, or wants
schema-translation support at all, requires it explicitly — the
same shape every adapter-specific spec fixture already uses to
load one particular .adapter file rather than all of them.
Class Method Summary collapse
-
.contribute_boot_gates(registry, gates) ⇒ Object
Runtime::Loader.run_boot_gates!asks every loaded persistence plugin to contribute here, generically — it never mentionsEraCheckor "era" by name.
Class Method Details
.contribute_boot_gates(registry, gates) ⇒ Object
Runtime::Loader.run_boot_gates! asks every loaded persistence
plugin to contribute here, generically — it never mentions
EraCheck or "era" by name. Two gates, both :pre_verify:
:era_compute_rules — unconditional, whenever this plugin is
loaded at all. A compute/rekey rule requires Postgres
whatever adapter is actually bound (ADR 0031's own reasoning,
unchanged) — this is the rich, adapter-aware version of that
check; Runtime::Loader's own structural backstop (plain
Bluebook::Translation data, no plugin-specific class) only
ever fires when NO persistence plugin is loaded at all.
:era_check — conditional, exactly ADR 0031's own gate,
unchanged: registered only when this registry has an aggregate
actually bound to a lineage-capable adapter.
37 38 39 40 41 |
# File 'lib/hecks/ports/persistence/plugins/era.rb', line 37 def contribute_boot_gates(registry, gates) gates.register(:era_compute_rules, ->(reg, _dir) { Runtime::EraCheck.check_compute_rules_for_registry!(reg) }, phase: :pre_verify) gates.register(:era_check, Runtime::EraCheck.method(:check_lineage!), phase: :pre_verify) if Runtime::EraCheck.lineage_capable_registry?(registry) end |