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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9f780a13e96d7a1fd1534d39aeda5cca32379d283e886839538f969d2cdcfa53
4
- data.tar.gz: 1dad812c37e3d4b44178d8d2a9b42b1623a94fef984c6e32d66f84a0b4a3d76a
3
+ metadata.gz: 147bcd5804bc40820fdbe36f46bd6e5ca76a7b7d09b39bf1955ccbda2925e1cd
4
+ data.tar.gz: bdb36c1bf535f603b58950749ef12d1ea19bbbbd1c59e4f3831525c4d336342b
5
5
  SHA512:
6
- metadata.gz: 685bad2445b1b6022625790855b51c4614be06e7cfafc81556d959a1a2d3254663a5a701bccfdc805c3260ec19919e939f22a5733d64481bdf894a60daeae896
7
- data.tar.gz: bd15af2c996f15d0422b624947c78fa2d2607e13a611b028ed6f03a3d5a470ee3d8963c15c038976c5bb2c164f3eebe41a90fe372d4c3c28b39abb0e4fa8d955
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
- registry = SchemaRegistry.new
7
- return registry unless File.exist?(path)
6
+ schema = EventSchema.new
7
+ return schema unless File.exist?(path)
8
8
 
9
9
  contents = File.read(path.to_s)
10
- return registry if contents.strip.empty?
10
+ return schema if contents.strip.empty?
11
11
 
12
12
  JSON.parse(contents).each do |attributes|
13
- registry.register(CatalogEntry.from_h(attributes))
13
+ schema.register(CatalogEntry.from_h(attributes))
14
14
  end
15
15
 
16
- registry
16
+ schema
17
17
  end
18
18
  end
19
19
  end
@@ -30,7 +30,7 @@ module EventEngine
30
30
  end
31
31
 
32
32
  def reset!
33
- @event_schema = {}
33
+ @event_schema = EventSchema.new
34
34
  @loaded = false
35
35
  end
36
36
 
@@ -1,3 +1,3 @@
1
1
  module EventEngine
2
- VERSION = "0.2.1"
2
+ VERSION = "0.2.2"
3
3
  end
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.event_schema.schemas_by_event.each_value do |versions|
177
+ slice.schemas_by_event.each_value do |versions|
178
178
  versions.each_value { |schema| schema_registry.register(schema) }
179
179
  end
180
180
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: event_engine
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - tylercschneider