event_engine 0.2.0 → 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: dec18ac1cb2f4605efaec53cc844453046e5ee7d9e1c111bb7a303ac8e10eb03
4
- data.tar.gz: a1e46a6755d4f04675ee8a7931dc226f6d386de00bf5c69aea2cc644b3c68bd7
3
+ metadata.gz: 147bcd5804bc40820fdbe36f46bd6e5ca76a7b7d09b39bf1955ccbda2925e1cd
4
+ data.tar.gz: bdb36c1bf535f603b58950749ef12d1ea19bbbbd1c59e4f3831525c4d336342b
5
5
  SHA512:
6
- metadata.gz: 5ecdfe7997ff911c9ee0cb24b55ebdf3a749b9f3a038884e320eeddfb4c3bb10ee8b405b03593c51c4709bb3a151640cdfdb3c541e9cbd975f40b9e023058b00
7
- data.tar.gz: fba7d789ab7a5dbefb02dbcc368bee0379f7131552413b33914bc8a1391af7e33c9080e98f307d391acb1d5f17119e855b2d497cbbfed2f7c0704a85a031056e
6
+ metadata.gz: 90690f42ed2498c5516a52230b750273777d115fa136af306e84c0c3a2dd4615f79d63570aa14ba0d34087a2c582e036f9a3acad6175a757305783225404c93c
7
+ data.tar.gz: 507ce9e63e9a161436a88eabcb7d6114f06bdd77e7fa88a23296c3655910994b7e9696f3f0a5cd4420876e39f02da963c748773c8551096f39cec22d0076c4a4
data/CHANGELOG.md CHANGED
@@ -7,6 +7,36 @@ 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
+
22
+ ## [0.2.1] - 2026-07-29
23
+
24
+ ### Fixed
25
+
26
+ - Running `event_engine:catalog` broke `emit`. The task scaffolds a rules file
27
+ listing every catalogued event with no value, and those bare keys counted as
28
+ declared rules — so routing was considered active while every event resolved to
29
+ nothing, raising `UnroutableEventError` on emit until each rule was filled in.
30
+
31
+ An app that processes events through **handlers** rather than processors — for
32
+ example one using `event_engine-store`, whose `Recorder` observes every event —
33
+ could not emit at all after building its catalog.
34
+
35
+ An undecided rule is now treated as no rule: a rules file where nothing is decided
36
+ behaves exactly like no rules file, and `event_engine:rules:check` still reports
37
+ the undecided events so the gap stays visible.
38
+
39
+
10
40
  ## [0.2.0] - 2026-07-29
11
41
 
12
42
  This release completes the split between **authoring** and **runtime**. Events are
data/README.md CHANGED
@@ -82,6 +82,15 @@ What a host still decides for itself is **how** each event is processed, in the
82
82
 
83
83
  ---
84
84
 
85
+ ## A working example
86
+
87
+ [**DYB-Development/event_engine_example**](https://github.com/DYB-Development/event_engine_example)
88
+ is a minimal Rails app wired to this pipeline end to end — declaring an event,
89
+ compiling it, declaring how it is processed, and handling it. It installs all three
90
+ gems from RubyGems, so it is what a real host looks like.
91
+
92
+ ---
93
+
85
94
  ## Getting started
86
95
 
87
96
  ```ruby
@@ -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
@@ -29,7 +29,7 @@ module EventEngine
29
29
  end
30
30
 
31
31
  def any?
32
- !@default.nil? || @packs.any? || @events.any?
32
+ processor_names.any?
33
33
  end
34
34
 
35
35
  def processor_names
@@ -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.0"
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,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: event_engine
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - tylercschneider
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-07-29 00:00:00.000000000 Z
11
+ date: 2026-09-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties