event_engine 0.2.1 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +12 -0
- data/lib/event_engine/event_schema_json_loader.rb +5 -5
- data/lib/event_engine/schema_registry.rb +1 -1
- data/lib/event_engine/version.rb +1 -1
- data/lib/event_engine.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 147bcd5804bc40820fdbe36f46bd6e5ca76a7b7d09b39bf1955ccbda2925e1cd
|
|
4
|
+
data.tar.gz: bdb36c1bf535f603b58950749ef12d1ea19bbbbd1c59e4f3831525c4d336342b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 90690f42ed2498c5516a52230b750273777d115fa136af306e84c0c3a2dd4615f79d63570aa14ba0d34087a2c582e036f9a3acad6175a757305783225404c93c
|
|
7
|
+
data.tar.gz: 507ce9e63e9a161436a88eabcb7d6114f06bdd77e7fa88a23296c3655910994b7e9696f3f0a5cd4420876e39f02da963c748773c8551096f39cec22d0076c4a4
|
data/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.2.2] - 2026-09-06
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
|
|
14
|
+
- Versioned lookup after boot. `EventSchemaJsonLoader.load` returned a
|
|
15
|
+
`SchemaRegistry` where `SchemaRegistry#load_from_schema!` stores an
|
|
16
|
+
`EventSchema`, so `emit(..., event_version: 2)` — documented in the README —
|
|
17
|
+
called `schema_for` on a registry and raised `NoMethodError`. The loader now
|
|
18
|
+
returns the `EventSchema` its callers assign.
|
|
19
|
+
- `SchemaRegistry#reset!` left `@event_schema` as a plain `Hash`, so registering
|
|
20
|
+
into a reset registry raised `NoMethodError`.
|
|
21
|
+
|
|
10
22
|
## [0.2.1] - 2026-07-29
|
|
11
23
|
|
|
12
24
|
### Fixed
|
|
@@ -3,17 +3,17 @@ require "json"
|
|
|
3
3
|
module EventEngine
|
|
4
4
|
class EventSchemaJsonLoader
|
|
5
5
|
def self.load(path)
|
|
6
|
-
|
|
7
|
-
return
|
|
6
|
+
schema = EventSchema.new
|
|
7
|
+
return schema unless File.exist?(path)
|
|
8
8
|
|
|
9
9
|
contents = File.read(path.to_s)
|
|
10
|
-
return
|
|
10
|
+
return schema if contents.strip.empty?
|
|
11
11
|
|
|
12
12
|
JSON.parse(contents).each do |attributes|
|
|
13
|
-
|
|
13
|
+
schema.register(CatalogEntry.from_h(attributes))
|
|
14
14
|
end
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
schema
|
|
17
17
|
end
|
|
18
18
|
end
|
|
19
19
|
end
|
data/lib/event_engine/version.rb
CHANGED
data/lib/event_engine.rb
CHANGED
|
@@ -174,7 +174,7 @@ module EventEngine
|
|
|
174
174
|
slice = EventSchemaJsonLoader.load(schema_path)
|
|
175
175
|
|
|
176
176
|
schema_registry.load_from_schema!(EventSchema.new) unless schema_registry.loaded?
|
|
177
|
-
slice.
|
|
177
|
+
slice.schemas_by_event.each_value do |versions|
|
|
178
178
|
versions.each_value { |schema| schema_registry.register(schema) }
|
|
179
179
|
end
|
|
180
180
|
|