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 +4 -4
- data/CHANGELOG.md +30 -0
- data/README.md +9 -0
- data/lib/event_engine/event_schema_json_loader.rb +5 -5
- data/lib/event_engine/processing_rules.rb +1 -1
- 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 +2 -2
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,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
|
-
|
|
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
|
|
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.
|
|
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-
|
|
11
|
+
date: 2026-09-06 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: railties
|