eventsimple 1.5.0 → 1.5.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0e34181920a4294d6f99a84819ea4861377c3e760a33bde393821ba4de8a8165
4
- data.tar.gz: 426eeaa345d28493854e989c08891b40766fd595d5b822876dbac030e65ce9d8
3
+ metadata.gz: fd1f9b77183b60cff86b901ea1a34cf689ee05fe91a3935c094a4cab2cd4f967
4
+ data.tar.gz: 56cd7accb037d1e559440a3aa201118037e24b7a8de3db0c7716a501d234ea08
5
5
  SHA512:
6
- metadata.gz: a9f364c4e825147973326bcb9c87f0201720b6773957a6670a2c466b7febd606c5ba3868f81557f06b8a95a2e49035b866c83c188a2bc5e11a8c2af6e0de49f2
7
- data.tar.gz: d761164e0bf06957c696f1d720c9d292b71a43a50827d44a0564a67280d36d0c98805af8bee7a042104cb8011da7ab0876c0b8e8e74e8eda61cdd7d20ca27b17
6
+ metadata.gz: 8e94859b8dec11414e20e95f5fa2edf3e9ea209b1f99fa0efa8ffbb4aae7d0b84b35fe88f36808ef8d619d1b20513efa80ec33db82babd578ea1f632643e13f8
7
+ data.tar.gz: c2ac0bf6dcf7a0ad10f23c9d8ebcd858e92f92050bc23851d4b0394a2c460eb26b508ac5712e713ae0ce7412b0b7daaea374b17f8ac2b72f10203a975bac79ec
data/CHANGELOG.md CHANGED
@@ -6,6 +6,22 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
6
6
 
7
7
  ## Unreleased
8
8
 
9
+ ## 1.5.4 - 2024-12-05
10
+ ### Changed
11
+ - Rails 8.0 is supported
12
+
13
+ ## 1.5.3 - 2024-09-09
14
+ ### Changed
15
+ - Pass self to `enable_writes!` block
16
+
17
+ ## 1.5.2 - 2024-05-22
18
+ ### Changed
19
+ - Add created_at index in events migration generation
20
+
21
+ ## 1.5.1 - 2024-05-13
22
+ ### Changed
23
+ - Fix bug where outbox concurrency was not being configured correctly.
24
+
9
25
  ## 1.5.0 - 2024-05-07
10
26
  ### Changed
11
27
  - The outbox consumer processes event batches concurrently
data/Gemfile.lock CHANGED
@@ -1,115 +1,113 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- eventsimple (1.5.0)
4
+ eventsimple (1.5.4)
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 (~> 7.0)
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 (7.1.3.2)
17
- actionpack (= 7.1.3.2)
18
- activesupport (= 7.1.3.2)
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 (7.1.3.2)
23
- actionpack (= 7.1.3.2)
24
- activejob (= 7.1.3.2)
25
- activerecord (= 7.1.3.2)
26
- activestorage (= 7.1.3.2)
27
- activesupport (= 7.1.3.2)
28
- mail (>= 2.7.1)
29
- net-imap
30
- net-pop
31
- net-smtp
32
- actionmailer (7.1.3.2)
33
- actionpack (= 7.1.3.2)
34
- actionview (= 7.1.3.2)
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 (7.1.3.2)
43
- actionview (= 7.1.3.2)
44
- activesupport (= 7.1.3.2)
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
- actiontext (7.1.3.2)
53
- actionpack (= 7.1.3.2)
54
- activerecord (= 7.1.3.2)
55
- activestorage (= 7.1.3.2)
56
- activesupport (= 7.1.3.2)
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 (7.1.3.2)
60
- activesupport (= 7.1.3.2)
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 (7.1.3.2)
66
- activesupport (= 7.1.3.2)
59
+ activejob (8.0.0)
60
+ activesupport (= 8.0.0)
67
61
  globalid (>= 0.3.6)
68
- activemodel (7.1.3.2)
69
- activesupport (= 7.1.3.2)
70
- activerecord (7.1.3.2)
71
- activemodel (= 7.1.3.2)
72
- activesupport (= 7.1.3.2)
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 (7.1.3.2)
75
- actionpack (= 7.1.3.2)
76
- activejob (= 7.1.3.2)
77
- activerecord (= 7.1.3.2)
78
- activesupport (= 7.1.3.2)
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 (7.1.3.2)
74
+ activesupport (8.0.0)
81
75
  base64
76
+ benchmark (>= 0.3)
82
77
  bigdecimal
83
- concurrent-ruby (~> 1.0, >= 1.0.2)
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
- mutex_m
89
- tzinfo (~> 2.0)
90
- addressable (2.8.6)
91
- public_suffix (>= 2.0.2, < 6.0)
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
- bigdecimal (3.1.6)
95
- builder (3.2.4)
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.1)
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.2.3)
100
+ concurrent-ruby (1.3.4)
103
101
  connection_pool (2.4.1)
104
102
  crass (1.0.6)
105
- date (3.3.4)
103
+ date (3.4.1)
106
104
  diff-lcs (1.5.1)
107
- drb (2.2.0)
108
- ruby2_keywords
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
- dry-inflector (1.0.0)
110
+ dry-inflector (1.1.0)
113
111
  dry-logic (1.5.0)
114
112
  concurrent-ruby (~> 1.0)
115
113
  dry-core (~> 1.0, < 2)
@@ -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.12.0)
130
- factory_bot (6.4.6)
127
+ erubi (1.13.0)
128
+ factory_bot (6.5.0)
131
129
  activesupport (>= 5.0.0)
132
- factory_bot_rails (6.4.3)
133
- factory_bot (~> 6.4)
130
+ factory_bot_rails (6.4.4)
131
+ factory_bot (~> 6.5)
134
132
  railties (>= 5.0.0)
135
- ffi (1.16.3)
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 (1.19.1)
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.18.1)
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.1)
160
+ i18n (1.14.6)
160
161
  concurrent-ruby (~> 1.0)
161
162
  ice_nine (0.11.2)
162
- io-console (0.7.2)
163
- irb (1.11.2)
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.7.1)
167
+ json (2.9.0)
167
168
  language_server-protocol (3.17.0.3)
168
169
  lint_roller (1.1.0)
169
- listen (3.8.0)
170
+ listen (3.9.0)
170
171
  rb-fsevent (~> 0.10, >= 0.10.3)
171
172
  rb-inotify (~> 0.9, >= 0.9.10)
172
- loofah (2.22.0)
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.0.0)
184
+ method_source (1.1.0)
183
185
  mini_mime (1.1.5)
184
- minitest (5.22.2)
185
- mutex_m (0.2.0)
186
+ minitest (5.25.4)
186
187
  nenv (0.3.0)
187
- net-imap (0.4.10)
188
+ net-imap (0.5.1)
188
189
  date
189
190
  net-protocol
190
191
  net-pop (0.1.2)
@@ -193,173 +194,172 @@ GEM
193
194
  timeout
194
195
  net-smtp (0.5.0)
195
196
  net-protocol
196
- nio4r (2.7.0)
197
- nokogiri (1.16.2-arm64-darwin)
197
+ nio4r (2.7.4)
198
+ nokogiri (1.16.8-arm64-darwin)
198
199
  racc (~> 1.4)
199
- nokogiri (1.16.2-x86_64-linux)
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.24.0)
205
- parse_a_changelog (1.3.0)
205
+ parallel (1.26.3)
206
+ parse_a_changelog (1.3.3)
206
207
  treetop (~> 1.6)
207
- parser (3.3.0.5)
208
+ parser (3.3.6.0)
208
209
  ast (~> 2.4.1)
209
210
  racc
210
- pg (1.5.6)
211
+ pg (1.5.9)
211
212
  polyglot (0.3.5)
212
- pry (0.14.2)
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.2)
217
+ psych (5.2.1)
218
+ date
216
219
  stringio
217
- public_suffix (5.0.4)
218
- puma (6.4.2)
220
+ public_suffix (6.0.1)
221
+ puma (6.5.0)
219
222
  nio4r (~> 2.0)
220
- racc (1.7.3)
221
- rack (3.0.9.1)
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.0)
229
+ rackup (2.2.1)
227
230
  rack (>= 3)
228
- webrick (~> 1.8)
229
- rails (7.1.3.2)
230
- actioncable (= 7.1.3.2)
231
- actionmailbox (= 7.1.3.2)
232
- actionmailer (= 7.1.3.2)
233
- actionpack (= 7.1.3.2)
234
- actiontext (= 7.1.3.2)
235
- actionview (= 7.1.3.2)
236
- activejob (= 7.1.3.2)
237
- activemodel (= 7.1.3.2)
238
- activerecord (= 7.1.3.2)
239
- activestorage (= 7.1.3.2)
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 (= 7.1.3.2)
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.0)
249
+ rails-html-sanitizer (1.6.1)
248
250
  loofah (~> 2.21)
249
- nokogiri (~> 1.14)
250
- railties (7.1.3.2)
251
- actionpack (= 7.1.3.2)
252
- activesupport (= 7.1.3.2)
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.0)
261
+ rake (13.2.1)
260
262
  rb-fsevent (0.11.2)
261
- rb-inotify (0.10.1)
263
+ rb-inotify (0.11.1)
262
264
  ffi (~> 1.0)
263
265
  rchardet (1.8.0)
264
- rdoc (6.6.2)
266
+ rdoc (6.8.1)
265
267
  psych (>= 4.0.0)
266
- regexp_parser (2.9.0)
267
- reline (0.4.3)
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.6)
271
272
  rspec (3.13.0)
272
273
  rspec-core (~> 3.13.0)
273
274
  rspec-expectations (~> 3.13.0)
274
275
  rspec-mocks (~> 3.13.0)
275
- rspec-core (3.13.0)
276
+ rspec-core (3.13.2)
276
277
  rspec-support (~> 3.13.0)
277
- rspec-expectations (3.13.0)
278
+ rspec-expectations (3.13.3)
278
279
  diff-lcs (>= 1.2.0, < 2.0)
279
280
  rspec-support (~> 3.13.0)
280
- rspec-mocks (3.13.0)
281
+ rspec-mocks (3.13.2)
281
282
  diff-lcs (>= 1.2.0, < 2.0)
282
283
  rspec-support (~> 3.13.0)
283
- rspec-rails (6.1.1)
284
- actionpack (>= 6.1)
285
- activesupport (>= 6.1)
286
- railties (>= 6.1)
287
- rspec-core (~> 3.12)
288
- rspec-expectations (~> 3.12)
289
- rspec-mocks (~> 3.12)
290
- rspec-support (~> 3.12)
291
- rspec-support (3.13.0)
292
- rubocop (1.60.2)
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)
293
294
  json (~> 2.3)
294
295
  language_server-protocol (>= 3.17.0)
295
296
  parallel (~> 1.10)
296
297
  parser (>= 3.3.0.2)
297
298
  rainbow (>= 2.2.2, < 4.0)
298
- regexp_parser (>= 1.8, < 3.0)
299
- rexml (>= 3.2.5, < 4.0)
300
- rubocop-ast (>= 1.30.0, < 2.0)
299
+ regexp_parser (>= 2.9.3, < 3.0)
300
+ rubocop-ast (>= 1.36.2, < 2.0)
301
301
  ruby-progressbar (~> 1.7)
302
- unicode-display_width (>= 2.4.0, < 3.0)
303
- rubocop-ast (1.30.0)
304
- parser (>= 3.2.1.0)
305
- rubocop-capybara (2.20.0)
306
- rubocop (~> 1.41)
307
- rubocop-factory_bot (2.25.1)
308
- rubocop (~> 1.41)
309
- 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)
310
308
  rubocop (>= 1.48.1, < 2.0)
311
- rubocop-ast (>= 1.30.0, < 2.0)
312
- rubocop-rails (2.23.1)
309
+ rubocop-ast (>= 1.31.1, < 2.0)
310
+ rubocop-rails (2.26.2)
313
311
  activesupport (>= 4.2.0)
314
312
  rack (>= 1.1)
315
- rubocop (>= 1.33.0, < 2.0)
316
- rubocop-ast (>= 1.30.0, < 2.0)
317
- rubocop-rspec (2.26.1)
318
- rubocop (~> 1.40)
319
- rubocop-capybara (~> 2.17)
320
- rubocop-factory_bot (~> 2.22)
321
- 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)
322
318
  rubocop
323
319
  ruby-progressbar (1.13.0)
324
- ruby2_keywords (0.0.5)
320
+ securerandom (0.4.0)
325
321
  shellany (0.0.1)
326
- standard (1.34.0)
322
+ standard (1.35.0.1)
327
323
  language_server-protocol (~> 3.17.0.2)
328
324
  lint_roller (~> 1.0)
329
- rubocop (~> 1.60)
325
+ rubocop (~> 1.62)
330
326
  standard-custom (~> 1.0.0)
331
327
  standard-performance (~> 1.3)
332
328
  standard-custom (1.0.2)
333
329
  lint_roller (~> 1.0)
334
330
  rubocop (~> 1.50)
335
- standard-performance (1.3.1)
331
+ standard-performance (1.5.0)
336
332
  lint_roller (~> 1.1)
337
- rubocop-performance (~> 1.20.2)
338
- standard-rails (1.0.2)
333
+ rubocop-performance (~> 1.22.0)
334
+ standard-rails (1.2.0)
339
335
  lint_roller (~> 1.0)
340
- rubocop-rails (~> 2.23.1)
341
- stringio (3.1.0)
342
- thor (1.3.1)
343
- timeout (0.4.1)
336
+ rubocop-rails (~> 2.26.0)
337
+ stringio (3.1.2)
338
+ thor (1.3.2)
339
+ timeout (0.4.2)
344
340
  treetop (1.6.12)
345
341
  polyglot (~> 0.3)
346
342
  tzinfo (2.0.6)
347
343
  concurrent-ruby (~> 1.0)
348
- unicode-display_width (2.5.0)
349
- webrick (1.8.1)
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)
350
349
  websocket-driver (0.7.6)
351
350
  websocket-extensions (>= 0.1.0)
352
351
  websocket-extensions (0.1.5)
353
352
  with_advisory_lock (5.1.0)
354
353
  activerecord (>= 6.1)
355
354
  zeitwerk (>= 2.6)
356
- ws-style (7.4.3)
357
- rubocop-rspec (>= 2.2.0)
355
+ ws-style (7.6.1)
356
+ rubocop-factory_bot (>= 2.26.0)
357
+ rubocop-rspec (>= 3.0.0)
358
358
  rubocop-vendor (>= 0.11)
359
359
  standard (>= 1.30.1)
360
360
  standard-custom (>= 1.0.2)
361
361
  standard-rails (>= 0.1.0)
362
- zeitwerk (2.6.13)
362
+ zeitwerk (2.7.1)
363
363
 
364
364
  PLATFORMS
365
365
  arm64-darwin-22
data/README.md CHANGED
@@ -128,6 +128,7 @@ create_table :user_events do |t|
128
128
  t.timestamps
129
129
 
130
130
  t.index :idempotency_key, unique: true
131
+ t.index :created_at
131
132
  end
132
133
 
133
134
  add_column :users, :lock_version, :integer
@@ -302,8 +303,7 @@ module UserComponent
302
303
 
303
304
  identitfier 'UserComponent::Consumer'
304
305
  consumes_event UserEvent
305
- processor EventProcessor
306
- concurrency 5 # default is 5
306
+ processor EventProcessor, concurrency: 5
307
307
  end
308
308
  end
309
309
  ```
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', '~> 7.0'
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'
@@ -39,7 +39,7 @@ module Eventsimple
39
39
  @readonly = false
40
40
 
41
41
  if block
42
- yield
42
+ yield self
43
43
  @readonly = true if was_readonly
44
44
  end
45
45
  end
@@ -159,20 +159,20 @@ module Eventsimple
159
159
  end
160
160
  end
161
161
 
162
- def with_locks(&block)
162
+ def with_locks(&)
163
163
  if _outbox_enabled
164
- base_class.with_advisory_lock(base_class.name, { transaction: true }, &block)
164
+ base_class.with_advisory_lock(base_class.name, { transaction: true }, &)
165
165
  else
166
166
  yield
167
167
  end
168
168
  end
169
169
 
170
- def with_retries(args, &block) # rubocop:disable Metrics/AbcSize
170
+ def with_retries(args, &) # rubocop:disable Metrics/AbcSize
171
171
  entity = args[0][_aggregate_klass.model_name.element.to_sym]
172
172
 
173
173
  # Only implement retries when the event is not already inside a transaction.
174
174
  if entity&.persisted? && !existing_transaction_in_progress?
175
- Retriable.with_context(:optimistic_locking, on_retry: proc { entity.reload }, &block)
175
+ Retriable.with_context(:optimistic_locking, on_retry: proc { entity.reload }, &)
176
176
  else
177
177
  yield
178
178
  end
@@ -13,6 +13,7 @@ class Create<%= model_name.camelize %>Events < ActiveRecord::Migration[7.0]
13
13
  t.timestamps
14
14
 
15
15
  t.index :idempotency_key, unique: true
16
+ t.index :created_at
16
17
  end
17
18
 
18
19
  # Enables optimistic locking on the evented table
@@ -30,15 +30,12 @@ module Eventsimple
30
30
  self._event_klass = event_klass
31
31
  end
32
32
 
33
- def processor(processor_klass)
33
+ def processor(processor_klass, concurrency: 5)
34
+ self._concurrency = concurrency
34
35
  self._processor_klass = processor_klass
35
36
  self._processor_pool = _concurrency.times.map { processor_klass.new }
36
37
  end
37
38
 
38
- def concurrency(concurrency)
39
- self._concurrency = concurrency
40
- end
41
-
42
39
  def start # rubocop:disable Metrics/AbcSize
43
40
  Signal.trap('INT') do
44
41
  self.stop_consumer = true
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Eventsimple
4
- VERSION = '1.5.0'
4
+ VERSION = '1.5.4'
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.0
4
+ version: 1.5.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Zulfiqar Ali
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-05-10 00:00:00.000000000 Z
11
+ date: 2024-12-05 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