eventsimple 1.5.3 → 1.5.5
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 +8 -0
- data/Gemfile.lock +167 -169
- data/eventsimple.gemspec +1 -1
- data/lib/eventsimple/entity.rb +15 -0
- data/lib/eventsimple/event.rb +16 -4
- data/lib/eventsimple/version.rb +1 -1
- metadata +10 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 638911b3c3aa0a4b29937285f54ea9e5db19611aabf57fee632393ef19a9f673
|
4
|
+
data.tar.gz: 5cec4fe7771514cb6148bb2e775bd9305444c714615ad54019e6f391a934c985
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b1484e11a7940d47af9d8a954c879f763547466d86de126753bff0d87b77e7d32b90f8949383fc49afe782ac179214f483abdc68504af149b18ef9edd583f19d
|
7
|
+
data.tar.gz: 68ab2b38e21b0a99a018f483aec74b8dcafc1b7549f4ef36dd5007dc0c3a7847d66c052981e0d0dc6b8d74ce5e4f769b0d6e64e7a0f9b2e1a60d02ff0e7d5289
|
data/CHANGELOG.md
CHANGED
@@ -6,6 +6,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
6
6
|
|
7
7
|
## Unreleased
|
8
8
|
|
9
|
+
## 1.5.5 - 2024-12-23
|
10
|
+
### Changed
|
11
|
+
- Validate value and type of `aggregate_id` between Event and Entity
|
12
|
+
|
13
|
+
## 1.5.4 - 2024-12-05
|
14
|
+
### Changed
|
15
|
+
- Rails 8.0 is supported
|
16
|
+
|
9
17
|
## 1.5.3 - 2024-09-09
|
10
18
|
### Changed
|
11
19
|
- Pass self to `enable_writes!` block
|
data/Gemfile.lock
CHANGED
@@ -1,113 +1,111 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
eventsimple (1.5.
|
4
|
+
eventsimple (1.5.5)
|
5
5
|
concurrent-ruby (>= 1.2.3)
|
6
6
|
dry-struct (~> 1.6)
|
7
7
|
dry-types (~> 1.7)
|
8
8
|
pg (~> 1.4)
|
9
|
-
rails (
|
9
|
+
rails (>= 7.0, < 9.0)
|
10
10
|
retriable (~> 3.1)
|
11
11
|
with_advisory_lock (>= 5.1)
|
12
12
|
|
13
13
|
GEM
|
14
14
|
remote: https://rubygems.org/
|
15
15
|
specs:
|
16
|
-
actioncable (
|
17
|
-
actionpack (=
|
18
|
-
activesupport (=
|
16
|
+
actioncable (8.0.0)
|
17
|
+
actionpack (= 8.0.0)
|
18
|
+
activesupport (= 8.0.0)
|
19
19
|
nio4r (~> 2.0)
|
20
20
|
websocket-driver (>= 0.6.1)
|
21
21
|
zeitwerk (~> 2.6)
|
22
|
-
actionmailbox (
|
23
|
-
actionpack (=
|
24
|
-
activejob (=
|
25
|
-
activerecord (=
|
26
|
-
activestorage (=
|
27
|
-
activesupport (=
|
28
|
-
mail (>= 2.
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
activejob (= 7.1.3.2)
|
36
|
-
activesupport (= 7.1.3.2)
|
37
|
-
mail (~> 2.5, >= 2.5.4)
|
38
|
-
net-imap
|
39
|
-
net-pop
|
40
|
-
net-smtp
|
22
|
+
actionmailbox (8.0.0)
|
23
|
+
actionpack (= 8.0.0)
|
24
|
+
activejob (= 8.0.0)
|
25
|
+
activerecord (= 8.0.0)
|
26
|
+
activestorage (= 8.0.0)
|
27
|
+
activesupport (= 8.0.0)
|
28
|
+
mail (>= 2.8.0)
|
29
|
+
actionmailer (8.0.0)
|
30
|
+
actionpack (= 8.0.0)
|
31
|
+
actionview (= 8.0.0)
|
32
|
+
activejob (= 8.0.0)
|
33
|
+
activesupport (= 8.0.0)
|
34
|
+
mail (>= 2.8.0)
|
41
35
|
rails-dom-testing (~> 2.2)
|
42
|
-
actionpack (
|
43
|
-
actionview (=
|
44
|
-
activesupport (=
|
36
|
+
actionpack (8.0.0)
|
37
|
+
actionview (= 8.0.0)
|
38
|
+
activesupport (= 8.0.0)
|
45
39
|
nokogiri (>= 1.8.5)
|
46
|
-
racc
|
47
40
|
rack (>= 2.2.4)
|
48
41
|
rack-session (>= 1.0.1)
|
49
42
|
rack-test (>= 0.6.3)
|
50
43
|
rails-dom-testing (~> 2.2)
|
51
44
|
rails-html-sanitizer (~> 1.6)
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
45
|
+
useragent (~> 0.16)
|
46
|
+
actiontext (8.0.0)
|
47
|
+
actionpack (= 8.0.0)
|
48
|
+
activerecord (= 8.0.0)
|
49
|
+
activestorage (= 8.0.0)
|
50
|
+
activesupport (= 8.0.0)
|
57
51
|
globalid (>= 0.6.0)
|
58
52
|
nokogiri (>= 1.8.5)
|
59
|
-
actionview (
|
60
|
-
activesupport (=
|
53
|
+
actionview (8.0.0)
|
54
|
+
activesupport (= 8.0.0)
|
61
55
|
builder (~> 3.1)
|
62
56
|
erubi (~> 1.11)
|
63
57
|
rails-dom-testing (~> 2.2)
|
64
58
|
rails-html-sanitizer (~> 1.6)
|
65
|
-
activejob (
|
66
|
-
activesupport (=
|
59
|
+
activejob (8.0.0)
|
60
|
+
activesupport (= 8.0.0)
|
67
61
|
globalid (>= 0.3.6)
|
68
|
-
activemodel (
|
69
|
-
activesupport (=
|
70
|
-
activerecord (
|
71
|
-
activemodel (=
|
72
|
-
activesupport (=
|
62
|
+
activemodel (8.0.0)
|
63
|
+
activesupport (= 8.0.0)
|
64
|
+
activerecord (8.0.0)
|
65
|
+
activemodel (= 8.0.0)
|
66
|
+
activesupport (= 8.0.0)
|
73
67
|
timeout (>= 0.4.0)
|
74
|
-
activestorage (
|
75
|
-
actionpack (=
|
76
|
-
activejob (=
|
77
|
-
activerecord (=
|
78
|
-
activesupport (=
|
68
|
+
activestorage (8.0.0)
|
69
|
+
actionpack (= 8.0.0)
|
70
|
+
activejob (= 8.0.0)
|
71
|
+
activerecord (= 8.0.0)
|
72
|
+
activesupport (= 8.0.0)
|
79
73
|
marcel (~> 1.0)
|
80
|
-
activesupport (
|
74
|
+
activesupport (8.0.0)
|
81
75
|
base64
|
76
|
+
benchmark (>= 0.3)
|
82
77
|
bigdecimal
|
83
|
-
concurrent-ruby (~> 1.0, >= 1.
|
78
|
+
concurrent-ruby (~> 1.0, >= 1.3.1)
|
84
79
|
connection_pool (>= 2.2.5)
|
85
80
|
drb
|
86
81
|
i18n (>= 1.6, < 2)
|
82
|
+
logger (>= 1.4.2)
|
87
83
|
minitest (>= 5.1)
|
88
|
-
|
89
|
-
tzinfo (~> 2.0)
|
90
|
-
|
91
|
-
|
84
|
+
securerandom (>= 0.3)
|
85
|
+
tzinfo (~> 2.0, >= 2.0.5)
|
86
|
+
uri (>= 0.13.1)
|
87
|
+
addressable (2.8.7)
|
88
|
+
public_suffix (>= 2.0.2, < 7.0)
|
92
89
|
ast (2.4.2)
|
93
90
|
base64 (0.2.0)
|
94
|
-
|
95
|
-
|
91
|
+
benchmark (0.4.0)
|
92
|
+
bigdecimal (3.1.8)
|
93
|
+
builder (3.3.0)
|
96
94
|
bundle-audit (0.1.0)
|
97
95
|
bundler-audit
|
98
|
-
bundler-audit (0.9.
|
96
|
+
bundler-audit (0.9.2)
|
99
97
|
bundler (>= 1.2.0, < 3)
|
100
98
|
thor (~> 1.0)
|
101
99
|
coderay (1.1.3)
|
102
|
-
concurrent-ruby (1.
|
100
|
+
concurrent-ruby (1.3.4)
|
103
101
|
connection_pool (2.4.1)
|
104
102
|
crass (1.0.6)
|
105
|
-
date (3.
|
103
|
+
date (3.4.1)
|
106
104
|
diff-lcs (1.5.1)
|
107
|
-
drb (2.2.
|
108
|
-
|
109
|
-
dry-core (1.0.1)
|
105
|
+
drb (2.2.1)
|
106
|
+
dry-core (1.0.2)
|
110
107
|
concurrent-ruby (~> 1.0)
|
108
|
+
logger
|
111
109
|
zeitwerk (~> 2.6)
|
112
110
|
dry-inflector (1.1.0)
|
113
111
|
dry-logic (1.5.0)
|
@@ -126,23 +124,26 @@ GEM
|
|
126
124
|
dry-inflector (~> 1.0)
|
127
125
|
dry-logic (~> 1.4)
|
128
126
|
zeitwerk (~> 2.6)
|
129
|
-
erubi (1.
|
130
|
-
factory_bot (6.
|
127
|
+
erubi (1.13.0)
|
128
|
+
factory_bot (6.5.0)
|
131
129
|
activesupport (>= 5.0.0)
|
132
|
-
factory_bot_rails (6.4.
|
133
|
-
factory_bot (~> 6.
|
130
|
+
factory_bot_rails (6.4.4)
|
131
|
+
factory_bot (~> 6.5)
|
134
132
|
railties (>= 5.0.0)
|
135
|
-
ffi (1.
|
133
|
+
ffi (1.17.0-arm64-darwin)
|
134
|
+
ffi (1.17.0-x86_64-linux-gnu)
|
136
135
|
formatador (1.1.0)
|
137
136
|
fuubar (2.5.1)
|
138
137
|
rspec-core (~> 3.0)
|
139
138
|
ruby-progressbar (~> 1.4)
|
140
|
-
git (
|
139
|
+
git (2.3.3)
|
140
|
+
activesupport (>= 5.0)
|
141
141
|
addressable (~> 2.8)
|
142
|
+
process_executer (~> 1.1)
|
142
143
|
rchardet (~> 1.8)
|
143
144
|
globalid (1.2.1)
|
144
145
|
activesupport (>= 6.1)
|
145
|
-
guard (2.
|
146
|
+
guard (2.19.0)
|
146
147
|
formatador (>= 0.2.4)
|
147
148
|
listen (>= 2.7, < 4.0)
|
148
149
|
lumberjack (>= 1.0.12, < 2.0)
|
@@ -156,20 +157,21 @@ GEM
|
|
156
157
|
guard (~> 2.1)
|
157
158
|
guard-compat (~> 1.1)
|
158
159
|
rspec (>= 2.99.0, < 4.0)
|
159
|
-
i18n (1.14.
|
160
|
+
i18n (1.14.6)
|
160
161
|
concurrent-ruby (~> 1.0)
|
161
162
|
ice_nine (0.11.2)
|
162
|
-
io-console (0.
|
163
|
-
irb (1.
|
164
|
-
rdoc
|
163
|
+
io-console (0.8.0)
|
164
|
+
irb (1.14.1)
|
165
|
+
rdoc (>= 4.0.0)
|
165
166
|
reline (>= 0.4.2)
|
166
|
-
json (2.
|
167
|
+
json (2.9.0)
|
167
168
|
language_server-protocol (3.17.0.3)
|
168
169
|
lint_roller (1.1.0)
|
169
|
-
listen (3.
|
170
|
+
listen (3.9.0)
|
170
171
|
rb-fsevent (~> 0.10, >= 0.10.3)
|
171
172
|
rb-inotify (~> 0.9, >= 0.9.10)
|
172
|
-
|
173
|
+
logger (1.6.2)
|
174
|
+
loofah (2.23.1)
|
173
175
|
crass (~> 1.0.2)
|
174
176
|
nokogiri (>= 1.12.0)
|
175
177
|
lumberjack (1.2.10)
|
@@ -179,12 +181,11 @@ GEM
|
|
179
181
|
net-pop
|
180
182
|
net-smtp
|
181
183
|
marcel (1.0.4)
|
182
|
-
method_source (1.
|
184
|
+
method_source (1.1.0)
|
183
185
|
mini_mime (1.1.5)
|
184
|
-
minitest (5.
|
185
|
-
mutex_m (0.2.0)
|
186
|
+
minitest (5.25.4)
|
186
187
|
nenv (0.3.0)
|
187
|
-
net-imap (0.4
|
188
|
+
net-imap (0.5.4)
|
188
189
|
date
|
189
190
|
net-protocol
|
190
191
|
net-pop (0.1.2)
|
@@ -193,175 +194,172 @@ GEM
|
|
193
194
|
timeout
|
194
195
|
net-smtp (0.5.0)
|
195
196
|
net-protocol
|
196
|
-
nio4r (2.7.
|
197
|
-
nokogiri (1.16.
|
197
|
+
nio4r (2.7.4)
|
198
|
+
nokogiri (1.16.8-arm64-darwin)
|
198
199
|
racc (~> 1.4)
|
199
|
-
nokogiri (1.16.
|
200
|
+
nokogiri (1.16.8-x86_64-linux)
|
200
201
|
racc (~> 1.4)
|
201
202
|
notiffany (0.1.3)
|
202
203
|
nenv (~> 0.1)
|
203
204
|
shellany (~> 0.0)
|
204
|
-
parallel (1.
|
205
|
-
parse_a_changelog (1.3.
|
205
|
+
parallel (1.26.3)
|
206
|
+
parse_a_changelog (1.3.3)
|
206
207
|
treetop (~> 1.6)
|
207
|
-
parser (3.3.0
|
208
|
+
parser (3.3.6.0)
|
208
209
|
ast (~> 2.4.1)
|
209
210
|
racc
|
210
|
-
pg (1.5.
|
211
|
+
pg (1.5.9)
|
211
212
|
polyglot (0.3.5)
|
212
|
-
|
213
|
+
process_executer (1.2.0)
|
214
|
+
pry (0.15.0)
|
213
215
|
coderay (~> 1.1)
|
214
216
|
method_source (~> 1.0)
|
215
|
-
psych (5.1
|
217
|
+
psych (5.2.1)
|
218
|
+
date
|
216
219
|
stringio
|
217
|
-
public_suffix (
|
218
|
-
puma (6.
|
220
|
+
public_suffix (6.0.1)
|
221
|
+
puma (6.5.0)
|
219
222
|
nio4r (~> 2.0)
|
220
|
-
racc (1.
|
221
|
-
rack (3.
|
223
|
+
racc (1.8.1)
|
224
|
+
rack (3.1.8)
|
222
225
|
rack-session (2.0.0)
|
223
226
|
rack (>= 3.0.0)
|
224
227
|
rack-test (2.1.0)
|
225
228
|
rack (>= 1.3)
|
226
|
-
rackup (2.1
|
229
|
+
rackup (2.2.1)
|
227
230
|
rack (>= 3)
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
activesupport (= 7.1.3.2)
|
231
|
+
rails (8.0.0)
|
232
|
+
actioncable (= 8.0.0)
|
233
|
+
actionmailbox (= 8.0.0)
|
234
|
+
actionmailer (= 8.0.0)
|
235
|
+
actionpack (= 8.0.0)
|
236
|
+
actiontext (= 8.0.0)
|
237
|
+
actionview (= 8.0.0)
|
238
|
+
activejob (= 8.0.0)
|
239
|
+
activemodel (= 8.0.0)
|
240
|
+
activerecord (= 8.0.0)
|
241
|
+
activestorage (= 8.0.0)
|
242
|
+
activesupport (= 8.0.0)
|
241
243
|
bundler (>= 1.15.0)
|
242
|
-
railties (=
|
244
|
+
railties (= 8.0.0)
|
243
245
|
rails-dom-testing (2.2.0)
|
244
246
|
activesupport (>= 5.0.0)
|
245
247
|
minitest
|
246
248
|
nokogiri (>= 1.6)
|
247
|
-
rails-html-sanitizer (1.6.
|
249
|
+
rails-html-sanitizer (1.6.1)
|
248
250
|
loofah (~> 2.21)
|
249
|
-
nokogiri (
|
250
|
-
railties (
|
251
|
-
actionpack (=
|
252
|
-
activesupport (=
|
253
|
-
irb
|
251
|
+
nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0)
|
252
|
+
railties (8.0.0)
|
253
|
+
actionpack (= 8.0.0)
|
254
|
+
activesupport (= 8.0.0)
|
255
|
+
irb (~> 1.13)
|
254
256
|
rackup (>= 1.0.0)
|
255
257
|
rake (>= 12.2)
|
256
258
|
thor (~> 1.0, >= 1.2.2)
|
257
259
|
zeitwerk (~> 2.6)
|
258
260
|
rainbow (3.1.1)
|
259
|
-
rake (13.1
|
261
|
+
rake (13.2.1)
|
260
262
|
rb-fsevent (0.11.2)
|
261
|
-
rb-inotify (0.
|
263
|
+
rb-inotify (0.11.1)
|
262
264
|
ffi (~> 1.0)
|
263
265
|
rchardet (1.8.0)
|
264
|
-
rdoc (6.
|
266
|
+
rdoc (6.8.1)
|
265
267
|
psych (>= 4.0.0)
|
266
|
-
regexp_parser (2.9.
|
267
|
-
reline (0.
|
268
|
+
regexp_parser (2.9.3)
|
269
|
+
reline (0.5.12)
|
268
270
|
io-console (~> 0.5)
|
269
271
|
retriable (3.1.2)
|
270
|
-
rexml (3.2.8)
|
271
|
-
strscan (>= 3.0.9)
|
272
272
|
rspec (3.13.0)
|
273
273
|
rspec-core (~> 3.13.0)
|
274
274
|
rspec-expectations (~> 3.13.0)
|
275
275
|
rspec-mocks (~> 3.13.0)
|
276
|
-
rspec-core (3.13.
|
276
|
+
rspec-core (3.13.2)
|
277
277
|
rspec-support (~> 3.13.0)
|
278
|
-
rspec-expectations (3.13.
|
278
|
+
rspec-expectations (3.13.3)
|
279
279
|
diff-lcs (>= 1.2.0, < 2.0)
|
280
280
|
rspec-support (~> 3.13.0)
|
281
|
-
rspec-mocks (3.13.
|
281
|
+
rspec-mocks (3.13.2)
|
282
282
|
diff-lcs (>= 1.2.0, < 2.0)
|
283
283
|
rspec-support (~> 3.13.0)
|
284
|
-
rspec-rails (
|
285
|
-
actionpack (>=
|
286
|
-
activesupport (>=
|
287
|
-
railties (>=
|
288
|
-
rspec-core (~> 3.
|
289
|
-
rspec-expectations (~> 3.
|
290
|
-
rspec-mocks (~> 3.
|
291
|
-
rspec-support (~> 3.
|
292
|
-
rspec-support (3.13.
|
293
|
-
rubocop (1.
|
284
|
+
rspec-rails (7.1.0)
|
285
|
+
actionpack (>= 7.0)
|
286
|
+
activesupport (>= 7.0)
|
287
|
+
railties (>= 7.0)
|
288
|
+
rspec-core (~> 3.13)
|
289
|
+
rspec-expectations (~> 3.13)
|
290
|
+
rspec-mocks (~> 3.13)
|
291
|
+
rspec-support (~> 3.13)
|
292
|
+
rspec-support (3.13.2)
|
293
|
+
rubocop (1.69.1)
|
294
294
|
json (~> 2.3)
|
295
295
|
language_server-protocol (>= 3.17.0)
|
296
296
|
parallel (~> 1.10)
|
297
297
|
parser (>= 3.3.0.2)
|
298
298
|
rainbow (>= 2.2.2, < 4.0)
|
299
|
-
regexp_parser (>=
|
300
|
-
|
301
|
-
rubocop-ast (>= 1.30.0, < 2.0)
|
299
|
+
regexp_parser (>= 2.9.3, < 3.0)
|
300
|
+
rubocop-ast (>= 1.36.2, < 2.0)
|
302
301
|
ruby-progressbar (~> 1.7)
|
303
|
-
unicode-display_width (>= 2.4.0, <
|
304
|
-
rubocop-ast (1.
|
305
|
-
parser (>= 3.
|
306
|
-
rubocop-
|
307
|
-
rubocop (~> 1.
|
308
|
-
rubocop-
|
309
|
-
rubocop (~> 1.41)
|
310
|
-
rubocop-performance (1.20.2)
|
302
|
+
unicode-display_width (>= 2.4.0, < 4.0)
|
303
|
+
rubocop-ast (1.36.2)
|
304
|
+
parser (>= 3.3.1.0)
|
305
|
+
rubocop-factory_bot (2.26.1)
|
306
|
+
rubocop (~> 1.61)
|
307
|
+
rubocop-performance (1.22.1)
|
311
308
|
rubocop (>= 1.48.1, < 2.0)
|
312
|
-
rubocop-ast (>= 1.
|
313
|
-
rubocop-rails (2.
|
309
|
+
rubocop-ast (>= 1.31.1, < 2.0)
|
310
|
+
rubocop-rails (2.26.2)
|
314
311
|
activesupport (>= 4.2.0)
|
315
312
|
rack (>= 1.1)
|
316
|
-
rubocop (>= 1.
|
317
|
-
rubocop-ast (>= 1.
|
318
|
-
rubocop-rspec (2.
|
319
|
-
rubocop (~> 1.
|
320
|
-
|
321
|
-
rubocop-factory_bot (~> 2.22)
|
322
|
-
rubocop-vendor (0.13.0)
|
313
|
+
rubocop (>= 1.52.0, < 2.0)
|
314
|
+
rubocop-ast (>= 1.31.1, < 2.0)
|
315
|
+
rubocop-rspec (3.2.0)
|
316
|
+
rubocop (~> 1.61)
|
317
|
+
rubocop-vendor (0.13.2)
|
323
318
|
rubocop
|
324
319
|
ruby-progressbar (1.13.0)
|
325
|
-
|
320
|
+
securerandom (0.4.0)
|
326
321
|
shellany (0.0.1)
|
327
|
-
standard (1.
|
322
|
+
standard (1.35.0.1)
|
328
323
|
language_server-protocol (~> 3.17.0.2)
|
329
324
|
lint_roller (~> 1.0)
|
330
|
-
rubocop (~> 1.
|
325
|
+
rubocop (~> 1.62)
|
331
326
|
standard-custom (~> 1.0.0)
|
332
327
|
standard-performance (~> 1.3)
|
333
328
|
standard-custom (1.0.2)
|
334
329
|
lint_roller (~> 1.0)
|
335
330
|
rubocop (~> 1.50)
|
336
|
-
standard-performance (1.
|
331
|
+
standard-performance (1.5.0)
|
337
332
|
lint_roller (~> 1.1)
|
338
|
-
rubocop-performance (~> 1.
|
339
|
-
standard-rails (1.0
|
333
|
+
rubocop-performance (~> 1.22.0)
|
334
|
+
standard-rails (1.2.0)
|
340
335
|
lint_roller (~> 1.0)
|
341
|
-
rubocop-rails (~> 2.
|
342
|
-
stringio (3.1.
|
343
|
-
|
344
|
-
|
345
|
-
timeout (0.4.1)
|
336
|
+
rubocop-rails (~> 2.26.0)
|
337
|
+
stringio (3.1.2)
|
338
|
+
thor (1.3.2)
|
339
|
+
timeout (0.4.3)
|
346
340
|
treetop (1.6.12)
|
347
341
|
polyglot (~> 0.3)
|
348
342
|
tzinfo (2.0.6)
|
349
343
|
concurrent-ruby (~> 1.0)
|
350
|
-
unicode-display_width (
|
351
|
-
|
344
|
+
unicode-display_width (3.1.2)
|
345
|
+
unicode-emoji (~> 4.0, >= 4.0.4)
|
346
|
+
unicode-emoji (4.0.4)
|
347
|
+
uri (1.0.2)
|
348
|
+
useragent (0.16.11)
|
352
349
|
websocket-driver (0.7.6)
|
353
350
|
websocket-extensions (>= 0.1.0)
|
354
351
|
websocket-extensions (0.1.5)
|
355
352
|
with_advisory_lock (5.1.0)
|
356
353
|
activerecord (>= 6.1)
|
357
354
|
zeitwerk (>= 2.6)
|
358
|
-
ws-style (7.
|
359
|
-
rubocop-
|
355
|
+
ws-style (7.6.1)
|
356
|
+
rubocop-factory_bot (>= 2.26.0)
|
357
|
+
rubocop-rspec (>= 3.0.0)
|
360
358
|
rubocop-vendor (>= 0.11)
|
361
359
|
standard (>= 1.30.1)
|
362
360
|
standard-custom (>= 1.0.2)
|
363
361
|
standard-rails (>= 0.1.0)
|
364
|
-
zeitwerk (2.
|
362
|
+
zeitwerk (2.7.1)
|
365
363
|
|
366
364
|
PLATFORMS
|
367
365
|
arm64-darwin-22
|
data/eventsimple.gemspec
CHANGED
@@ -26,7 +26,7 @@ Gem::Specification.new do |spec|
|
|
26
26
|
spec.add_runtime_dependency 'dry-struct', '~> 1.6'
|
27
27
|
spec.add_runtime_dependency 'dry-types', '~> 1.7'
|
28
28
|
spec.add_runtime_dependency 'pg', '~> 1.4'
|
29
|
-
spec.add_runtime_dependency 'rails', '
|
29
|
+
spec.add_runtime_dependency 'rails', '>= 7.0', '< 9.0'
|
30
30
|
spec.add_runtime_dependency 'retriable', '~> 3.1'
|
31
31
|
spec.add_runtime_dependency 'with_advisory_lock', '>= 5.1'
|
32
32
|
spec.add_runtime_dependency 'concurrent-ruby', '>= 1.2.3'
|
data/lib/eventsimple/entity.rb
CHANGED
@@ -3,6 +3,18 @@ module Eventsimple
|
|
3
3
|
DEFAULT_IGNORE_PROPS = %w[id lock_version].freeze
|
4
4
|
|
5
5
|
def event_driven_by(event_klass, aggregate_id:, filter_attributes: [])
|
6
|
+
if defined?(event_klass._aggregate_id)
|
7
|
+
raise ArgumentError, "aggregate_id mismatch event:#{event_klass._aggregate_id} entity:#{aggregate_id}" if aggregate_id != event_klass._aggregate_id
|
8
|
+
|
9
|
+
begin
|
10
|
+
aggregate_column_type_in_event = event_klass.column_for_attribute(:aggregate_id).type
|
11
|
+
aggregate_column_type_in_entity = column_for_attribute(aggregate_id).type
|
12
|
+
|
13
|
+
raise ArgumentError, "column type mismatch - event:#{aggregate_column_type_in_event} entity:#{aggregate_column_type_in_entity}" if aggregate_column_type_in_event != aggregate_column_type_in_entity
|
14
|
+
rescue ActiveRecord::NoDatabaseError
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
6
18
|
has_many :events, class_name: event_klass.name.to_s,
|
7
19
|
foreign_key: :aggregate_id,
|
8
20
|
primary_key: aggregate_id,
|
@@ -18,6 +30,9 @@ module Eventsimple
|
|
18
30
|
class_attribute :_filter_attributes
|
19
31
|
self._filter_attributes = [aggregate_id] | Array.wrap(filter_attributes)
|
20
32
|
|
33
|
+
class_attribute :_aggregate_id
|
34
|
+
self._aggregate_id = aggregate_id
|
35
|
+
|
21
36
|
# disable automatic timestamp updates
|
22
37
|
self.record_timestamps = false
|
23
38
|
|
data/lib/eventsimple/event.rb
CHANGED
@@ -5,6 +5,18 @@ module Eventsimple
|
|
5
5
|
|
6
6
|
# rubocop:disable Metrics/AbcSize, Metrics/MethodLength
|
7
7
|
def drives_events_for(aggregate_klass, aggregate_id:, events_namespace: nil)
|
8
|
+
if defined?(aggregate_klass._aggregate_id)
|
9
|
+
raise ArgumentError, "aggregate_id mismatch event:#{aggregate_id} entity:#{aggregate_klass._aggregate_id}" if aggregate_id != aggregate_klass._aggregate_id
|
10
|
+
|
11
|
+
begin
|
12
|
+
aggregate_column_type_in_event = aggregate_klass.column_for_attribute(aggregate_klass._aggregate_id).type unless aggregate_klass.attribute_names.blank?
|
13
|
+
aggregate_column_type_in_entity = column_for_attribute(:aggregate_id).type unless aggregate_klass.attribute_names.blank?
|
14
|
+
|
15
|
+
raise ArgumentError, "column type mismatch - event:#{aggregate_column_type_in_event} entity:#{aggregate_column_type_in_entity}" if aggregate_column_type_in_event != aggregate_column_type_in_entity
|
16
|
+
rescue ActiveRecord::NoDatabaseError
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
8
20
|
class_attribute :_events_namespace
|
9
21
|
self._events_namespace = events_namespace
|
10
22
|
|
@@ -159,20 +171,20 @@ module Eventsimple
|
|
159
171
|
end
|
160
172
|
end
|
161
173
|
|
162
|
-
def with_locks(&
|
174
|
+
def with_locks(&)
|
163
175
|
if _outbox_enabled
|
164
|
-
base_class.with_advisory_lock(base_class.name, { transaction: true }, &
|
176
|
+
base_class.with_advisory_lock(base_class.name, { transaction: true }, &)
|
165
177
|
else
|
166
178
|
yield
|
167
179
|
end
|
168
180
|
end
|
169
181
|
|
170
|
-
def with_retries(args, &
|
182
|
+
def with_retries(args, &) # rubocop:disable Metrics/AbcSize
|
171
183
|
entity = args[0][_aggregate_klass.model_name.element.to_sym]
|
172
184
|
|
173
185
|
# Only implement retries when the event is not already inside a transaction.
|
174
186
|
if entity&.persisted? && !existing_transaction_in_progress?
|
175
|
-
Retriable.with_context(:optimistic_locking, on_retry: proc { entity.reload }, &
|
187
|
+
Retriable.with_context(:optimistic_locking, on_retry: proc { entity.reload }, &)
|
176
188
|
else
|
177
189
|
yield
|
178
190
|
end
|
data/lib/eventsimple/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: eventsimple
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.5.
|
4
|
+
version: 1.5.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Zulfiqar Ali
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-01-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dry-struct
|
@@ -56,16 +56,22 @@ dependencies:
|
|
56
56
|
name: rails
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- - "
|
59
|
+
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '7.0'
|
62
|
+
- - "<"
|
63
|
+
- !ruby/object:Gem::Version
|
64
|
+
version: '9.0'
|
62
65
|
type: :runtime
|
63
66
|
prerelease: false
|
64
67
|
version_requirements: !ruby/object:Gem::Requirement
|
65
68
|
requirements:
|
66
|
-
- - "
|
69
|
+
- - ">="
|
67
70
|
- !ruby/object:Gem::Version
|
68
71
|
version: '7.0'
|
72
|
+
- - "<"
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
version: '9.0'
|
69
75
|
- !ruby/object:Gem::Dependency
|
70
76
|
name: retriable
|
71
77
|
requirement: !ruby/object:Gem::Requirement
|