eventsimple 1.5.6 → 1.5.7

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: f628774141b53a531e1c58965e543316ce8a71560dc91fd5bd9762f7fab8a833
4
- data.tar.gz: 2f29fa6197efc44d9f9a20e300046a254361c886284f0d533cb63ad15ee8e91b
3
+ metadata.gz: 1ad06b055da4ac9aac198693559193edbc58df0dc35276c37a35399740c95f06
4
+ data.tar.gz: 23153c0fc74d8336f76108013bcc2b9f48f9d46c4dfa1e96368e08fce7704e82
5
5
  SHA512:
6
- metadata.gz: 490f7a05851f319cbec0b1e4327e15405d8336a868087fd5f321c9c5f6660fac92246be8bff1553d393899ee3e259fb420ad5827e6dbce701fe3a59793defd2f
7
- data.tar.gz: 63ca6aef81fae8ec3d0a811e796c9b979810e86d02115a8dcda34e18b3a290bba22d096d2537d269044320098f30db30bb3e42e94a31deafdf18e2018de50539
6
+ metadata.gz: 46087d727d23121cc684c4f799624f2c1f44d47a7c040caa1f4a8d3935af09d09e075743d737b587482271d235fc1925a710922017641e9ac58d2b979e670d5a
7
+ data.tar.gz: 7f1d1d568bbb9245b869ad7a23f48b236b46c0472867c987d7cc9ead26232483319ada8eea80400a323a236c939bec93bb2db46fef63a08a405bfa8367f3be9f
data/CHANGELOG.md CHANGED
@@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
6
6
 
7
7
  ## Unreleased
8
8
 
9
+ ## 1.5.7 - 2025-04-04
10
+ ### Changed
11
+ - Initializiation error on db:schema:load is fixed
12
+
9
13
  ## 1.5.6 - 2025-01-02
10
14
  ### Changed
11
15
  - inheritance column setter needs to be a string
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- eventsimple (1.5.6)
4
+ eventsimple (1.5.7)
5
5
  concurrent-ruby (>= 1.2.3)
6
6
  dry-struct (~> 1.6)
7
7
  dry-types (~> 1.7)
@@ -13,29 +13,29 @@ PATH
13
13
  GEM
14
14
  remote: https://rubygems.org/
15
15
  specs:
16
- actioncable (8.0.0)
17
- actionpack (= 8.0.0)
18
- activesupport (= 8.0.0)
16
+ actioncable (8.0.2)
17
+ actionpack (= 8.0.2)
18
+ activesupport (= 8.0.2)
19
19
  nio4r (~> 2.0)
20
20
  websocket-driver (>= 0.6.1)
21
21
  zeitwerk (~> 2.6)
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)
22
+ actionmailbox (8.0.2)
23
+ actionpack (= 8.0.2)
24
+ activejob (= 8.0.2)
25
+ activerecord (= 8.0.2)
26
+ activestorage (= 8.0.2)
27
+ activesupport (= 8.0.2)
28
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)
29
+ actionmailer (8.0.2)
30
+ actionpack (= 8.0.2)
31
+ actionview (= 8.0.2)
32
+ activejob (= 8.0.2)
33
+ activesupport (= 8.0.2)
34
34
  mail (>= 2.8.0)
35
35
  rails-dom-testing (~> 2.2)
36
- actionpack (8.0.0)
37
- actionview (= 8.0.0)
38
- activesupport (= 8.0.0)
36
+ actionpack (8.0.2)
37
+ actionview (= 8.0.2)
38
+ activesupport (= 8.0.2)
39
39
  nokogiri (>= 1.8.5)
40
40
  rack (>= 2.2.4)
41
41
  rack-session (>= 1.0.1)
@@ -43,35 +43,35 @@ GEM
43
43
  rails-dom-testing (~> 2.2)
44
44
  rails-html-sanitizer (~> 1.6)
45
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)
46
+ actiontext (8.0.2)
47
+ actionpack (= 8.0.2)
48
+ activerecord (= 8.0.2)
49
+ activestorage (= 8.0.2)
50
+ activesupport (= 8.0.2)
51
51
  globalid (>= 0.6.0)
52
52
  nokogiri (>= 1.8.5)
53
- actionview (8.0.0)
54
- activesupport (= 8.0.0)
53
+ actionview (8.0.2)
54
+ activesupport (= 8.0.2)
55
55
  builder (~> 3.1)
56
56
  erubi (~> 1.11)
57
57
  rails-dom-testing (~> 2.2)
58
58
  rails-html-sanitizer (~> 1.6)
59
- activejob (8.0.0)
60
- activesupport (= 8.0.0)
59
+ activejob (8.0.2)
60
+ activesupport (= 8.0.2)
61
61
  globalid (>= 0.3.6)
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)
62
+ activemodel (8.0.2)
63
+ activesupport (= 8.0.2)
64
+ activerecord (8.0.2)
65
+ activemodel (= 8.0.2)
66
+ activesupport (= 8.0.2)
67
67
  timeout (>= 0.4.0)
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)
68
+ activestorage (8.0.2)
69
+ actionpack (= 8.0.2)
70
+ activejob (= 8.0.2)
71
+ activerecord (= 8.0.2)
72
+ activesupport (= 8.0.2)
73
73
  marcel (~> 1.0)
74
- activesupport (8.0.0)
74
+ activesupport (8.0.2)
75
75
  base64
76
76
  benchmark (>= 0.3)
77
77
  bigdecimal
@@ -86,10 +86,10 @@ GEM
86
86
  uri (>= 0.13.1)
87
87
  addressable (2.8.7)
88
88
  public_suffix (>= 2.0.2, < 7.0)
89
- ast (2.4.2)
89
+ ast (2.4.3)
90
90
  base64 (0.2.0)
91
91
  benchmark (0.4.0)
92
- bigdecimal (3.1.8)
92
+ bigdecimal (3.1.9)
93
93
  builder (3.3.0)
94
94
  bundle-audit (0.1.0)
95
95
  bundler-audit
@@ -97,58 +97,61 @@ GEM
97
97
  bundler (>= 1.2.0, < 3)
98
98
  thor (~> 1.0)
99
99
  coderay (1.1.3)
100
- concurrent-ruby (1.3.4)
101
- connection_pool (2.4.1)
100
+ concurrent-ruby (1.3.5)
101
+ connection_pool (2.5.0)
102
102
  crass (1.0.6)
103
103
  date (3.4.1)
104
- diff-lcs (1.5.1)
104
+ diff-lcs (1.6.1)
105
105
  drb (2.2.1)
106
- dry-core (1.0.2)
106
+ dry-core (1.1.0)
107
107
  concurrent-ruby (~> 1.0)
108
108
  logger
109
109
  zeitwerk (~> 2.6)
110
- dry-inflector (1.1.0)
111
- dry-logic (1.5.0)
110
+ dry-inflector (1.2.0)
111
+ dry-logic (1.6.0)
112
+ bigdecimal
112
113
  concurrent-ruby (~> 1.0)
113
- dry-core (~> 1.0, < 2)
114
+ dry-core (~> 1.1)
114
115
  zeitwerk (~> 2.6)
115
- dry-struct (1.6.0)
116
- dry-core (~> 1.0, < 2)
117
- dry-types (>= 1.7, < 2)
116
+ dry-struct (1.8.0)
117
+ dry-core (~> 1.1)
118
+ dry-types (~> 1.8, >= 1.8.2)
118
119
  ice_nine (~> 0.11)
119
120
  zeitwerk (~> 2.6)
120
- dry-types (1.7.2)
121
+ dry-types (1.8.2)
121
122
  bigdecimal (~> 3.0)
122
123
  concurrent-ruby (~> 1.0)
123
124
  dry-core (~> 1.0)
124
125
  dry-inflector (~> 1.0)
125
126
  dry-logic (~> 1.4)
126
127
  zeitwerk (~> 2.6)
127
- erubi (1.13.0)
128
- factory_bot (6.5.0)
129
- activesupport (>= 5.0.0)
128
+ erubi (1.13.1)
129
+ factory_bot (6.5.1)
130
+ activesupport (>= 6.1.0)
130
131
  factory_bot_rails (6.4.4)
131
132
  factory_bot (~> 6.5)
132
133
  railties (>= 5.0.0)
133
- ffi (1.17.0-arm64-darwin)
134
- ffi (1.17.0-x86_64-linux-gnu)
134
+ ffi (1.17.1-arm64-darwin)
135
+ ffi (1.17.1-x86_64-linux-gnu)
135
136
  formatador (1.1.0)
136
137
  fuubar (2.5.1)
137
138
  rspec-core (~> 3.0)
138
139
  ruby-progressbar (~> 1.4)
139
- git (2.3.3)
140
+ git (3.0.0)
140
141
  activesupport (>= 5.0)
141
142
  addressable (~> 2.8)
142
- process_executer (~> 1.1)
143
- rchardet (~> 1.8)
143
+ process_executer (~> 1.3)
144
+ rchardet (~> 1.9)
144
145
  globalid (1.2.1)
145
146
  activesupport (>= 6.1)
146
- guard (2.19.0)
147
+ guard (2.19.1)
147
148
  formatador (>= 0.2.4)
148
149
  listen (>= 2.7, < 4.0)
150
+ logger (~> 1.6)
149
151
  lumberjack (>= 1.0.12, < 2.0)
150
152
  nenv (~> 0.1)
151
153
  notiffany (~> 0.0)
154
+ ostruct (~> 0.6)
152
155
  pry (>= 0.13.0)
153
156
  shellany (~> 0.0)
154
157
  thor (>= 0.18.1)
@@ -157,21 +160,22 @@ GEM
157
160
  guard (~> 2.1)
158
161
  guard-compat (~> 1.1)
159
162
  rspec (>= 2.99.0, < 4.0)
160
- i18n (1.14.6)
163
+ i18n (1.14.7)
161
164
  concurrent-ruby (~> 1.0)
162
165
  ice_nine (0.11.2)
163
166
  io-console (0.8.0)
164
- irb (1.14.1)
167
+ irb (1.15.2)
168
+ pp (>= 0.6.0)
165
169
  rdoc (>= 4.0.0)
166
170
  reline (>= 0.4.2)
167
- json (2.9.0)
168
- language_server-protocol (3.17.0.3)
171
+ json (2.10.2)
172
+ language_server-protocol (3.17.0.4)
169
173
  lint_roller (1.1.0)
170
174
  listen (3.9.0)
171
175
  rb-fsevent (~> 0.10, >= 0.10.3)
172
176
  rb-inotify (~> 0.9, >= 0.9.10)
173
- logger (1.6.2)
174
- loofah (2.23.1)
177
+ logger (1.7.0)
178
+ loofah (2.24.0)
175
179
  crass (~> 1.0.2)
176
180
  nokogiri (>= 1.12.0)
177
181
  lumberjack (1.2.10)
@@ -183,75 +187,81 @@ GEM
183
187
  marcel (1.0.4)
184
188
  method_source (1.1.0)
185
189
  mini_mime (1.1.5)
186
- minitest (5.25.4)
190
+ minitest (5.25.5)
187
191
  nenv (0.3.0)
188
- net-imap (0.5.4)
192
+ net-imap (0.5.6)
189
193
  date
190
194
  net-protocol
191
195
  net-pop (0.1.2)
192
196
  net-protocol
193
197
  net-protocol (0.2.2)
194
198
  timeout
195
- net-smtp (0.5.0)
199
+ net-smtp (0.5.1)
196
200
  net-protocol
197
201
  nio4r (2.7.4)
198
- nokogiri (1.16.8-arm64-darwin)
202
+ nokogiri (1.18.7-arm64-darwin)
199
203
  racc (~> 1.4)
200
- nokogiri (1.16.8-x86_64-linux)
204
+ nokogiri (1.18.7-x86_64-linux-gnu)
201
205
  racc (~> 1.4)
202
206
  notiffany (0.1.3)
203
207
  nenv (~> 0.1)
204
208
  shellany (~> 0.0)
209
+ ostruct (0.6.1)
205
210
  parallel (1.26.3)
206
211
  parse_a_changelog (1.3.3)
207
212
  treetop (~> 1.6)
208
- parser (3.3.6.0)
213
+ parser (3.3.7.4)
209
214
  ast (~> 2.4.1)
210
215
  racc
211
216
  pg (1.5.9)
212
217
  polyglot (0.3.5)
213
- process_executer (1.2.0)
214
- pry (0.15.0)
218
+ pp (0.6.2)
219
+ prettyprint
220
+ prettyprint (0.2.0)
221
+ prism (1.4.0)
222
+ process_executer (1.3.0)
223
+ pry (0.15.2)
215
224
  coderay (~> 1.1)
216
225
  method_source (~> 1.0)
217
- psych (5.2.1)
226
+ psych (5.2.3)
218
227
  date
219
228
  stringio
220
229
  public_suffix (6.0.1)
221
- puma (6.5.0)
230
+ puma (6.6.0)
222
231
  nio4r (~> 2.0)
223
232
  racc (1.8.1)
224
- rack (3.1.8)
225
- rack-session (2.0.0)
233
+ rack (3.1.12)
234
+ rack-session (2.1.0)
235
+ base64 (>= 0.1.0)
226
236
  rack (>= 3.0.0)
227
- rack-test (2.1.0)
237
+ rack-test (2.2.0)
228
238
  rack (>= 1.3)
229
239
  rackup (2.2.1)
230
240
  rack (>= 3)
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
+ rails (8.0.2)
242
+ actioncable (= 8.0.2)
243
+ actionmailbox (= 8.0.2)
244
+ actionmailer (= 8.0.2)
245
+ actionpack (= 8.0.2)
246
+ actiontext (= 8.0.2)
247
+ actionview (= 8.0.2)
248
+ activejob (= 8.0.2)
249
+ activemodel (= 8.0.2)
250
+ activerecord (= 8.0.2)
251
+ activestorage (= 8.0.2)
252
+ activesupport (= 8.0.2)
243
253
  bundler (>= 1.15.0)
244
- railties (= 8.0.0)
254
+ railties (= 8.0.2)
245
255
  rails-dom-testing (2.2.0)
246
256
  activesupport (>= 5.0.0)
247
257
  minitest
248
258
  nokogiri (>= 1.6)
249
- rails-html-sanitizer (1.6.1)
259
+ rails-html-sanitizer (1.6.2)
250
260
  loofah (~> 2.21)
251
261
  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)
262
+ railties (8.0.2)
263
+ actionpack (= 8.0.2)
264
+ activesupport (= 8.0.2)
255
265
  irb (~> 1.13)
256
266
  rackup (>= 1.0.0)
257
267
  rake (>= 12.2)
@@ -262,18 +272,18 @@ GEM
262
272
  rb-fsevent (0.11.2)
263
273
  rb-inotify (0.11.1)
264
274
  ffi (~> 1.0)
265
- rchardet (1.8.0)
266
- rdoc (6.8.1)
275
+ rchardet (1.9.0)
276
+ rdoc (6.13.1)
267
277
  psych (>= 4.0.0)
268
- regexp_parser (2.9.3)
269
- reline (0.5.12)
278
+ regexp_parser (2.10.0)
279
+ reline (0.6.1)
270
280
  io-console (~> 0.5)
271
281
  retriable (3.1.2)
272
282
  rspec (3.13.0)
273
283
  rspec-core (~> 3.13.0)
274
284
  rspec-expectations (~> 3.13.0)
275
285
  rspec-mocks (~> 3.13.0)
276
- rspec-core (3.13.2)
286
+ rspec-core (3.13.3)
277
287
  rspec-support (~> 3.13.0)
278
288
  rspec-expectations (3.13.3)
279
289
  diff-lcs (>= 1.2.0, < 2.0)
@@ -281,7 +291,7 @@ GEM
281
291
  rspec-mocks (3.13.2)
282
292
  diff-lcs (>= 1.2.0, < 2.0)
283
293
  rspec-support (~> 3.13.0)
284
- rspec-rails (7.1.0)
294
+ rspec-rails (7.1.1)
285
295
  actionpack (>= 7.0)
286
296
  activesupport (>= 7.0)
287
297
  railties (>= 7.0)
@@ -290,34 +300,40 @@ GEM
290
300
  rspec-mocks (~> 3.13)
291
301
  rspec-support (~> 3.13)
292
302
  rspec-support (3.13.2)
293
- rubocop (1.69.1)
303
+ rubocop (1.75.2)
294
304
  json (~> 2.3)
295
- language_server-protocol (>= 3.17.0)
305
+ language_server-protocol (~> 3.17.0.2)
306
+ lint_roller (~> 1.1.0)
296
307
  parallel (~> 1.10)
297
308
  parser (>= 3.3.0.2)
298
309
  rainbow (>= 2.2.2, < 4.0)
299
310
  regexp_parser (>= 2.9.3, < 3.0)
300
- rubocop-ast (>= 1.36.2, < 2.0)
311
+ rubocop-ast (>= 1.44.0, < 2.0)
301
312
  ruby-progressbar (~> 1.7)
302
313
  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)
308
- rubocop (>= 1.48.1, < 2.0)
309
- rubocop-ast (>= 1.31.1, < 2.0)
314
+ rubocop-ast (1.44.0)
315
+ parser (>= 3.3.7.2)
316
+ prism (~> 1.4)
317
+ rubocop-factory_bot (2.27.1)
318
+ lint_roller (~> 1.1)
319
+ rubocop (~> 1.72, >= 1.72.1)
320
+ rubocop-performance (1.24.0)
321
+ lint_roller (~> 1.1)
322
+ rubocop (>= 1.72.1, < 2.0)
323
+ rubocop-ast (>= 1.38.0, < 2.0)
310
324
  rubocop-rails (2.26.2)
311
325
  activesupport (>= 4.2.0)
312
326
  rack (>= 1.1)
313
327
  rubocop (>= 1.52.0, < 2.0)
314
328
  rubocop-ast (>= 1.31.1, < 2.0)
315
- rubocop-rspec (3.2.0)
316
- rubocop (~> 1.61)
317
- rubocop-vendor (0.13.2)
329
+ rubocop-rspec (3.5.0)
330
+ lint_roller (~> 1.1)
331
+ rubocop (~> 1.72, >= 1.72.1)
332
+ rubocop-vendor (0.14.2)
333
+ lint_roller
318
334
  rubocop
319
335
  ruby-progressbar (1.13.0)
320
- securerandom (0.4.0)
336
+ securerandom (0.4.1)
321
337
  shellany (0.0.1)
322
338
  standard (1.35.0.1)
323
339
  language_server-protocol (~> 3.17.0.2)
@@ -328,38 +344,39 @@ GEM
328
344
  standard-custom (1.0.2)
329
345
  lint_roller (~> 1.0)
330
346
  rubocop (~> 1.50)
331
- standard-performance (1.5.0)
347
+ standard-performance (1.7.0)
332
348
  lint_roller (~> 1.1)
333
- rubocop-performance (~> 1.22.0)
349
+ rubocop-performance (~> 1.24.0)
334
350
  standard-rails (1.2.0)
335
351
  lint_roller (~> 1.0)
336
352
  rubocop-rails (~> 2.26.0)
337
- stringio (3.1.2)
353
+ stringio (3.1.6)
338
354
  thor (1.3.2)
339
355
  timeout (0.4.3)
340
- treetop (1.6.12)
356
+ treetop (1.6.14)
341
357
  polyglot (~> 0.3)
342
358
  tzinfo (2.0.6)
343
359
  concurrent-ruby (~> 1.0)
344
- unicode-display_width (3.1.2)
360
+ unicode-display_width (3.1.4)
345
361
  unicode-emoji (~> 4.0, >= 4.0.4)
346
362
  unicode-emoji (4.0.4)
347
- uri (1.0.2)
363
+ uri (1.0.3)
348
364
  useragent (0.16.11)
349
- websocket-driver (0.7.6)
365
+ websocket-driver (0.7.7)
366
+ base64
350
367
  websocket-extensions (>= 0.1.0)
351
368
  websocket-extensions (0.1.5)
352
369
  with_advisory_lock (5.1.0)
353
370
  activerecord (>= 6.1)
354
371
  zeitwerk (>= 2.6)
355
- ws-style (7.6.1)
372
+ ws-style (7.7.2)
356
373
  rubocop-factory_bot (>= 2.26.0)
357
374
  rubocop-rspec (>= 3.0.0)
358
- rubocop-vendor (>= 0.11)
375
+ rubocop-vendor (>= 0.14.2)
359
376
  standard (>= 1.30.1)
360
377
  standard-custom (>= 1.0.2)
361
378
  standard-rails (>= 0.1.0)
362
- zeitwerk (2.7.1)
379
+ zeitwerk (2.7.2)
363
380
 
364
381
  PLATFORMS
365
382
  arm64-darwin-22
@@ -3,16 +3,16 @@ 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
6
+ begin
7
+ if defined?(event_klass._aggregate_id) && event_klass.table_exists? && table_exists?
8
+ raise ArgumentError, "aggregate_id mismatch event:#{event_klass._aggregate_id} entity:#{aggregate_id}" if aggregate_id != event_klass._aggregate_id
8
9
 
9
- begin
10
10
  aggregate_column_type_in_event = event_klass.column_for_attribute(:aggregate_id).type
11
11
  aggregate_column_type_in_entity = column_for_attribute(aggregate_id).type
12
12
 
13
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
14
  end
15
+ rescue ActiveRecord::NoDatabaseError
16
16
  end
17
17
 
18
18
  has_many :events, class_name: event_klass.name.to_s,
@@ -5,16 +5,17 @@ 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
8
+ begin
9
+ if defined?(aggregate_klass._aggregate_id) && aggregate_klass.table_exists? && table_exists?
10
+ raise ArgumentError, "aggregate_id mismatch event:#{aggregate_id} entity:#{aggregate_klass._aggregate_id}" if aggregate_id != aggregate_klass._aggregate_id
10
11
 
11
- begin
12
12
  aggregate_column_type_in_event = aggregate_klass.column_for_attribute(aggregate_klass._aggregate_id).type unless aggregate_klass.attribute_names.blank?
13
13
  aggregate_column_type_in_entity = column_for_attribute(:aggregate_id).type unless aggregate_klass.attribute_names.blank?
14
14
 
15
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
16
+
17
17
  end
18
+ rescue ActiveRecord::NoDatabaseError
18
19
  end
19
20
 
20
21
  class_attribute :_events_namespace
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Eventsimple
4
- VERSION = '1.5.6'
4
+ VERSION = '1.5.7'
5
5
  end
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.6
4
+ version: 1.5.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Zulfiqar Ali
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-01-02 00:00:00.000000000 Z
11
+ date: 2025-04-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dry-struct
@@ -303,7 +303,7 @@ licenses:
303
303
  - MIT
304
304
  metadata:
305
305
  changelog_uri: https://github.com/wealthsimple/eventsimple/blob/main/CHANGELOG.md
306
- post_install_message:
306
+ post_install_message:
307
307
  rdoc_options: []
308
308
  require_paths:
309
309
  - lib
@@ -319,7 +319,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
319
319
  version: '0'
320
320
  requirements: []
321
321
  rubygems_version: 3.4.19
322
- signing_key:
322
+ signing_key:
323
323
  specification_version: 4
324
324
  summary: Event sourcing toolkit using Rails and ActiveJob
325
325
  test_files: []