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 +4 -4
- data/CHANGELOG.md +16 -0
- data/Gemfile.lock +168 -168
- data/README.md +2 -2
- data/eventsimple.gemspec +1 -1
- data/lib/eventsimple/entity.rb +1 -1
- data/lib/eventsimple/event.rb +4 -4
- data/lib/eventsimple/generators/templates/create_events.erb +1 -0
- data/lib/eventsimple/outbox/consumer.rb +2 -5
- 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: fd1f9b77183b60cff86b901ea1a34cf689ee05fe91a3935c094a4cab2cd4f967
|
4
|
+
data.tar.gz: 56cd7accb037d1e559440a3aa201118037e24b7a8de3db0c7716a501d234ea08
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
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 (
|
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
|
-
dry-inflector (1.
|
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.
|
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.
|
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.
|
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.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.
|
276
|
+
rspec-core (3.13.2)
|
276
277
|
rspec-support (~> 3.13.0)
|
277
|
-
rspec-expectations (3.13.
|
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.
|
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 (
|
284
|
-
actionpack (>=
|
285
|
-
activesupport (>=
|
286
|
-
railties (>=
|
287
|
-
rspec-core (~> 3.
|
288
|
-
rspec-expectations (~> 3.
|
289
|
-
rspec-mocks (~> 3.
|
290
|
-
rspec-support (~> 3.
|
291
|
-
rspec-support (3.13.
|
292
|
-
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)
|
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 (>=
|
299
|
-
|
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, <
|
303
|
-
rubocop-ast (1.
|
304
|
-
parser (>= 3.
|
305
|
-
rubocop-
|
306
|
-
rubocop (~> 1.
|
307
|
-
rubocop-
|
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.
|
312
|
-
rubocop-rails (2.
|
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.
|
316
|
-
rubocop-ast (>= 1.
|
317
|
-
rubocop-rspec (2.
|
318
|
-
rubocop (~> 1.
|
319
|
-
|
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
|
-
|
320
|
+
securerandom (0.4.0)
|
325
321
|
shellany (0.0.1)
|
326
|
-
standard (1.
|
322
|
+
standard (1.35.0.1)
|
327
323
|
language_server-protocol (~> 3.17.0.2)
|
328
324
|
lint_roller (~> 1.0)
|
329
|
-
rubocop (~> 1.
|
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.
|
331
|
+
standard-performance (1.5.0)
|
336
332
|
lint_roller (~> 1.1)
|
337
|
-
rubocop-performance (~> 1.
|
338
|
-
standard-rails (1.0
|
333
|
+
rubocop-performance (~> 1.22.0)
|
334
|
+
standard-rails (1.2.0)
|
339
335
|
lint_roller (~> 1.0)
|
340
|
-
rubocop-rails (~> 2.
|
341
|
-
stringio (3.1.
|
342
|
-
thor (1.3.
|
343
|
-
timeout (0.4.
|
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 (
|
349
|
-
|
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.
|
357
|
-
rubocop-
|
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.
|
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', '
|
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
data/lib/eventsimple/event.rb
CHANGED
@@ -159,20 +159,20 @@ module Eventsimple
|
|
159
159
|
end
|
160
160
|
end
|
161
161
|
|
162
|
-
def with_locks(&
|
162
|
+
def with_locks(&)
|
163
163
|
if _outbox_enabled
|
164
|
-
base_class.with_advisory_lock(base_class.name, { transaction: true }, &
|
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, &
|
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 }, &
|
175
|
+
Retriable.with_context(:optimistic_locking, on_retry: proc { entity.reload }, &)
|
176
176
|
else
|
177
177
|
yield
|
178
178
|
end
|
@@ -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
|
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.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
|
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
|