deimos-ruby 1.8.6 → 1.10.0

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: 65a333a1b518855f322e74ee096dc555c70dffa1b258d406bdea574584336f74
4
- data.tar.gz: 6e6b64330307f03ed0311c96ff897c6573500a1de9cac997e4fade0b5987e6d9
3
+ metadata.gz: a614febc556860a51e870e89beb90fde63201fffae3ba7ca78c53d423a65a7b6
4
+ data.tar.gz: e4676b33fbaf9c105ffd12b89a0090a86b8befd7cf0e09b39078a70e213f72dc
5
5
  SHA512:
6
- metadata.gz: dd188a47a95c60a1d129314da2eec7f80cd842eb713e975d582edfa07a3cf4e966cd4433082439d162e0a29b84d8c72b92408f936eeedd3d9f058c002581d1da
7
- data.tar.gz: 0c2a7e11df203cda96dba6ca16809c88e18d149b8e23a05d76641cd1039a70284315b497ca324155f4fb060099a3dd32be83b9fe9da5be5708cbc91954dfeddc
6
+ metadata.gz: 0d418e1d0b27008392da829980c6bdf754111a1f103965dce6882f97d3a02f0220d58756f6f1f0682df12944eac1a012516b0a3612c257342509b6e0b4c3da57
7
+ data.tar.gz: 1be3de2310297dc6b75a8f98b6c3f84483c6c401d6395dc6752cc57c342f8935911ba1ad11e8eb69e6bfcb19720e8540985c42976033401c39e137a3ab8fbc40
data/CHANGELOG.md CHANGED
@@ -7,6 +7,41 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## UNRELEASED
9
9
 
10
+ ## 1.10.0 - 2021-03-22
11
+
12
+ - ### Roadmap :car:
13
+
14
+ - Extracted the configuration piece into a separate gem, [fig_tree](https://www.github.com/flipp-oss/fig_tree).
15
+ - Added a `save_record` method to ActiveRecordConsumer in case calling code wants to work with the record before saving.
16
+
17
+ - ### Fixes :wrench:
18
+
19
+ - Fixed a regression where the default values for consumer / Phobos listener configs were not correct (they were all nil). This is technically a breaking change, but it puts the configs back the way they were at version 1.4 and matches the documentation.
20
+
21
+ ## 1.9.2 - 2021-01-29
22
+
23
+ - ### Fixes :wrench:
24
+
25
+ - Fix for `uninitialized constant ActiveSupport::Autoload` in certain circumstances
26
+ - Removed unnecessary monkey patch which was crashing on newer versions of ruby-kafka
27
+
28
+ ## 1.9.0 - 2021-01-28
29
+
30
+ - ### Roadmap :car:
31
+
32
+ - Bumped the version of ruby-kafka to latest
33
+
34
+ - ### Fixes :wrench:
35
+
36
+ - Prevents DB Poller from reconnecting to DB if there is an open transaction
37
+ - Replaces `before` by `prepend_before` for more consistent test setups.
38
+ - Adds validation in the `kafka_producers` method (fixes [#90](https://github.com/flipp-oss/deimos/issues/90))
39
+
40
+ ## 1.8.7 - 2021-01-14
41
+
42
+ - ### Roadmap :car:
43
+ - Update Phobos version to allow version 1.9 or 2.x.
44
+
10
45
  ## 1.8.6 - 2021-01-14
11
46
 
12
47
  - ### Fixes :wrench:
data/Gemfile.lock CHANGED
@@ -1,77 +1,78 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- deimos-ruby (1.8.6)
4
+ deimos-ruby (1.9.2)
5
5
  avro_turf (~> 0.11)
6
- phobos (~> 1.9)
7
- ruby-kafka (~> 0.7)
8
- sigurd (= 0.0.1)
6
+ fig_tree (~> 0.0.2)
7
+ phobos (>= 1.9, < 3.0)
8
+ ruby-kafka (< 2)
9
+ sigurd (~> 0.0.1)
9
10
 
10
11
  GEM
11
12
  remote: https://rubygems.org/
12
13
  specs:
13
- actioncable (6.1.1)
14
- actionpack (= 6.1.1)
15
- activesupport (= 6.1.1)
14
+ actioncable (6.1.3)
15
+ actionpack (= 6.1.3)
16
+ activesupport (= 6.1.3)
16
17
  nio4r (~> 2.0)
17
18
  websocket-driver (>= 0.6.1)
18
- actionmailbox (6.1.1)
19
- actionpack (= 6.1.1)
20
- activejob (= 6.1.1)
21
- activerecord (= 6.1.1)
22
- activestorage (= 6.1.1)
23
- activesupport (= 6.1.1)
19
+ actionmailbox (6.1.3)
20
+ actionpack (= 6.1.3)
21
+ activejob (= 6.1.3)
22
+ activerecord (= 6.1.3)
23
+ activestorage (= 6.1.3)
24
+ activesupport (= 6.1.3)
24
25
  mail (>= 2.7.1)
25
- actionmailer (6.1.1)
26
- actionpack (= 6.1.1)
27
- actionview (= 6.1.1)
28
- activejob (= 6.1.1)
29
- activesupport (= 6.1.1)
26
+ actionmailer (6.1.3)
27
+ actionpack (= 6.1.3)
28
+ actionview (= 6.1.3)
29
+ activejob (= 6.1.3)
30
+ activesupport (= 6.1.3)
30
31
  mail (~> 2.5, >= 2.5.4)
31
32
  rails-dom-testing (~> 2.0)
32
- actionpack (6.1.1)
33
- actionview (= 6.1.1)
34
- activesupport (= 6.1.1)
33
+ actionpack (6.1.3)
34
+ actionview (= 6.1.3)
35
+ activesupport (= 6.1.3)
35
36
  rack (~> 2.0, >= 2.0.9)
36
37
  rack-test (>= 0.6.3)
37
38
  rails-dom-testing (~> 2.0)
38
39
  rails-html-sanitizer (~> 1.0, >= 1.2.0)
39
- actiontext (6.1.1)
40
- actionpack (= 6.1.1)
41
- activerecord (= 6.1.1)
42
- activestorage (= 6.1.1)
43
- activesupport (= 6.1.1)
40
+ actiontext (6.1.3)
41
+ actionpack (= 6.1.3)
42
+ activerecord (= 6.1.3)
43
+ activestorage (= 6.1.3)
44
+ activesupport (= 6.1.3)
44
45
  nokogiri (>= 1.8.5)
45
- actionview (6.1.1)
46
- activesupport (= 6.1.1)
46
+ actionview (6.1.3)
47
+ activesupport (= 6.1.3)
47
48
  builder (~> 3.1)
48
49
  erubi (~> 1.4)
49
50
  rails-dom-testing (~> 2.0)
50
51
  rails-html-sanitizer (~> 1.1, >= 1.2.0)
51
- activejob (6.1.1)
52
- activesupport (= 6.1.1)
52
+ activejob (6.1.3)
53
+ activesupport (= 6.1.3)
53
54
  globalid (>= 0.3.6)
54
- activemodel (6.1.1)
55
- activesupport (= 6.1.1)
56
- activerecord (6.1.1)
57
- activemodel (= 6.1.1)
58
- activesupport (= 6.1.1)
59
- activerecord-import (1.0.7)
55
+ activemodel (6.1.3)
56
+ activesupport (= 6.1.3)
57
+ activerecord (6.1.3)
58
+ activemodel (= 6.1.3)
59
+ activesupport (= 6.1.3)
60
+ activerecord-import (1.0.8)
60
61
  activerecord (>= 3.2)
61
- activestorage (6.1.1)
62
- actionpack (= 6.1.1)
63
- activejob (= 6.1.1)
64
- activerecord (= 6.1.1)
65
- activesupport (= 6.1.1)
62
+ activestorage (6.1.3)
63
+ actionpack (= 6.1.3)
64
+ activejob (= 6.1.3)
65
+ activerecord (= 6.1.3)
66
+ activesupport (= 6.1.3)
66
67
  marcel (~> 0.3.1)
67
68
  mimemagic (~> 0.3.2)
68
- activesupport (6.1.1)
69
+ activesupport (6.1.3)
69
70
  concurrent-ruby (~> 1.0, >= 1.0.2)
70
71
  i18n (>= 1.6, < 2)
71
72
  minitest (>= 5.1)
72
73
  tzinfo (~> 2.0)
73
74
  zeitwerk (~> 2.3)
74
- ast (2.4.1)
75
+ ast (2.4.2)
75
76
  avro (1.9.2)
76
77
  multi_json
77
78
  avro_turf (0.11.0)
@@ -79,21 +80,23 @@ GEM
79
80
  excon (~> 0.45)
80
81
  builder (3.2.4)
81
82
  coderay (1.1.3)
82
- concurrent-ruby (1.1.6)
83
- concurrent-ruby-ext (1.1.6)
84
- concurrent-ruby (= 1.1.6)
83
+ concurrent-ruby (1.1.8)
84
+ concurrent-ruby-ext (1.1.8)
85
+ concurrent-ruby (= 1.1.8)
85
86
  crass (1.0.6)
86
- database_cleaner (1.8.5)
87
- ddtrace (0.37.0)
87
+ database_cleaner (1.99.0)
88
+ ddtrace (0.46.0)
88
89
  msgpack
89
90
  diff-lcs (1.4.4)
90
91
  digest-crc (0.6.3)
91
92
  rake (>= 12.0.0, < 14.0.0)
92
- dogstatsd-ruby (4.8.1)
93
+ dogstatsd-ruby (4.8.3)
93
94
  erubi (1.10.0)
94
- excon (0.78.1)
95
+ excon (0.79.0)
95
96
  exponential-backoff (0.0.4)
96
- ffi (1.13.1)
97
+ ffi (1.15.0)
98
+ fig_tree (0.0.2)
99
+ activesupport (>= 3.0.0)
97
100
  formatador (0.2.5)
98
101
  globalid (0.4.2)
99
102
  activesupport (>= 4.2.0)
@@ -111,22 +114,22 @@ GEM
111
114
  guard (~> 2.1)
112
115
  guard-compat (~> 1.1)
113
116
  rspec (>= 2.99.0, < 4.0)
114
- guard-rubocop (1.3.0)
117
+ guard-rubocop (1.4.0)
115
118
  guard (~> 2.0)
116
- rubocop (~> 0.20)
117
- i18n (1.8.7)
119
+ rubocop (< 2.0)
120
+ i18n (1.8.9)
118
121
  concurrent-ruby (~> 1.0)
119
- listen (3.2.1)
122
+ listen (3.4.1)
120
123
  rb-fsevent (~> 0.10, >= 0.10.3)
121
124
  rb-inotify (~> 0.9, >= 0.9.10)
122
125
  little-plugger (1.1.4)
123
126
  logging (2.3.0)
124
127
  little-plugger (~> 1.1)
125
128
  multi_json (~> 1.14)
126
- loofah (2.8.0)
129
+ loofah (2.9.0)
127
130
  crass (~> 1.0.2)
128
131
  nokogiri (>= 1.5.9)
129
- lumberjack (1.2.6)
132
+ lumberjack (1.2.8)
130
133
  mail (2.7.1)
131
134
  mini_mime (>= 0.1.1)
132
135
  marcel (0.3.3)
@@ -135,23 +138,23 @@ GEM
135
138
  mimemagic (0.3.5)
136
139
  mini_mime (1.0.2)
137
140
  mini_portile2 (2.5.0)
138
- minitest (5.14.3)
139
- msgpack (1.3.3)
141
+ minitest (5.14.4)
142
+ msgpack (1.4.2)
140
143
  multi_json (1.15.0)
141
144
  mysql2 (0.5.3)
142
145
  nenv (0.3.0)
143
- nio4r (2.5.4)
146
+ nio4r (2.5.7)
144
147
  nokogiri (1.11.1)
145
148
  mini_portile2 (~> 2.5.0)
146
149
  racc (~> 1.4)
147
150
  notiffany (0.1.3)
148
151
  nenv (~> 0.1)
149
152
  shellany (~> 0.0)
150
- parallel (1.19.2)
151
- parser (2.7.1.4)
153
+ parallel (1.20.1)
154
+ parser (3.0.0.0)
152
155
  ast (~> 2.4.1)
153
156
  pg (1.2.3)
154
- phobos (1.9.0)
157
+ phobos (2.0.2)
155
158
  activesupport (>= 3.0.0)
156
159
  concurrent-ruby (>= 1.0.2)
157
160
  concurrent-ruby-ext (>= 1.0.2)
@@ -159,36 +162,36 @@ GEM
159
162
  logging
160
163
  ruby-kafka
161
164
  thor
162
- pry (0.13.1)
165
+ pry (0.14.0)
163
166
  coderay (~> 1.1)
164
167
  method_source (~> 1.0)
165
168
  racc (1.5.2)
166
169
  rack (2.2.3)
167
170
  rack-test (1.1.0)
168
171
  rack (>= 1.0, < 3)
169
- rails (6.1.1)
170
- actioncable (= 6.1.1)
171
- actionmailbox (= 6.1.1)
172
- actionmailer (= 6.1.1)
173
- actionpack (= 6.1.1)
174
- actiontext (= 6.1.1)
175
- actionview (= 6.1.1)
176
- activejob (= 6.1.1)
177
- activemodel (= 6.1.1)
178
- activerecord (= 6.1.1)
179
- activestorage (= 6.1.1)
180
- activesupport (= 6.1.1)
172
+ rails (6.1.3)
173
+ actioncable (= 6.1.3)
174
+ actionmailbox (= 6.1.3)
175
+ actionmailer (= 6.1.3)
176
+ actionpack (= 6.1.3)
177
+ actiontext (= 6.1.3)
178
+ actionview (= 6.1.3)
179
+ activejob (= 6.1.3)
180
+ activemodel (= 6.1.3)
181
+ activerecord (= 6.1.3)
182
+ activestorage (= 6.1.3)
183
+ activesupport (= 6.1.3)
181
184
  bundler (>= 1.15.0)
182
- railties (= 6.1.1)
185
+ railties (= 6.1.3)
183
186
  sprockets-rails (>= 2.0.0)
184
187
  rails-dom-testing (2.0.3)
185
188
  activesupport (>= 4.2.0)
186
189
  nokogiri (>= 1.6)
187
190
  rails-html-sanitizer (1.3.0)
188
191
  loofah (~> 2.3)
189
- railties (6.1.1)
190
- actionpack (= 6.1.1)
191
- activesupport (= 6.1.1)
192
+ railties (6.1.3)
193
+ actionpack (= 6.1.3)
194
+ activesupport (= 6.1.3)
192
195
  method_source
193
196
  rake (>= 0.8.7)
194
197
  thor (~> 1.0)
@@ -197,29 +200,29 @@ GEM
197
200
  rb-fsevent (0.10.4)
198
201
  rb-inotify (0.10.1)
199
202
  ffi (~> 1.0)
200
- regexp_parser (1.7.1)
203
+ regexp_parser (2.1.1)
201
204
  rexml (3.2.4)
202
- rspec (3.9.0)
203
- rspec-core (~> 3.9.0)
204
- rspec-expectations (~> 3.9.0)
205
- rspec-mocks (~> 3.9.0)
206
- rspec-core (3.9.2)
207
- rspec-support (~> 3.9.3)
208
- rspec-expectations (3.9.2)
205
+ rspec (3.10.0)
206
+ rspec-core (~> 3.10.0)
207
+ rspec-expectations (~> 3.10.0)
208
+ rspec-mocks (~> 3.10.0)
209
+ rspec-core (3.10.1)
210
+ rspec-support (~> 3.10.0)
211
+ rspec-expectations (3.10.1)
209
212
  diff-lcs (>= 1.2.0, < 2.0)
210
- rspec-support (~> 3.9.0)
211
- rspec-mocks (3.9.1)
213
+ rspec-support (~> 3.10.0)
214
+ rspec-mocks (3.10.2)
212
215
  diff-lcs (>= 1.2.0, < 2.0)
213
- rspec-support (~> 3.9.0)
214
- rspec-rails (4.0.1)
216
+ rspec-support (~> 3.10.0)
217
+ rspec-rails (4.1.1)
215
218
  actionpack (>= 4.2)
216
219
  activesupport (>= 4.2)
217
220
  railties (>= 4.2)
218
- rspec-core (~> 3.9)
219
- rspec-expectations (~> 3.9)
220
- rspec-mocks (~> 3.9)
221
- rspec-support (~> 3.9)
222
- rspec-support (3.9.3)
221
+ rspec-core (~> 3.10)
222
+ rspec-expectations (~> 3.10)
223
+ rspec-mocks (~> 3.10)
224
+ rspec-support (~> 3.10)
225
+ rspec-support (3.10.2)
223
226
  rspec_junit_formatter (0.4.1)
224
227
  rspec-core (>= 2, < 4, != 2.12.0)
225
228
  rubocop (0.88.0)
@@ -231,15 +234,15 @@ GEM
231
234
  rubocop-ast (>= 0.1.0, < 1.0)
232
235
  ruby-progressbar (~> 1.7)
233
236
  unicode-display_width (>= 1.4.0, < 2.0)
234
- rubocop-ast (0.2.0)
235
- parser (>= 2.7.0.1)
237
+ rubocop-ast (0.8.0)
238
+ parser (>= 2.7.1.5)
236
239
  rubocop-rspec (1.42.0)
237
240
  rubocop (>= 0.87.0)
238
- ruby-kafka (0.7.10)
241
+ ruby-kafka (1.3.0)
239
242
  digest-crc
240
- ruby-progressbar (1.10.1)
243
+ ruby-progressbar (1.11.0)
241
244
  shellany (0.0.1)
242
- sigurd (0.0.1)
245
+ sigurd (0.0.3)
243
246
  concurrent-ruby (~> 1)
244
247
  exponential-backoff
245
248
  sprockets (4.0.2)
@@ -250,7 +253,7 @@ GEM
250
253
  activesupport (>= 4.0)
251
254
  sprockets (>= 3.0.0)
252
255
  sqlite3 (1.4.2)
253
- thor (1.0.1)
256
+ thor (1.1.0)
254
257
  tzinfo (2.0.4)
255
258
  concurrent-ruby (~> 1.0)
256
259
  unicode-display_width (1.7.0)
data/deimos-ruby.gemspec CHANGED
@@ -19,9 +19,10 @@ Gem::Specification.new do |spec|
19
19
  spec.require_paths = ['lib']
20
20
 
21
21
  spec.add_runtime_dependency('avro_turf', '~> 0.11')
22
- spec.add_runtime_dependency('phobos', '~> 1.9')
23
- spec.add_runtime_dependency('ruby-kafka', '~> 0.7')
24
- spec.add_runtime_dependency('sigurd', '0.0.1')
22
+ spec.add_runtime_dependency('phobos', '>= 1.9', '< 3.0')
23
+ spec.add_runtime_dependency('ruby-kafka', '< 2')
24
+ spec.add_runtime_dependency('sigurd', '~> 0.0.1')
25
+ spec.add_runtime_dependency('fig_tree', '~> 0.0.2')
25
26
 
26
27
  spec.add_development_dependency('activerecord-import')
27
28
  spec.add_development_dependency('avro', '~> 1.9')
data/docs/ARCHITECTURE.md CHANGED
@@ -74,11 +74,7 @@ must define methods such as:
74
74
 
75
75
  ### Configuration
76
76
 
77
- Deimos has its own `Configurable` module that makes heavy use of `method_missing`
78
- to provide a very succinct but powerful configuration format (including
79
- default values, procs, print out as hash, reset, etc.). It also
80
- allows for multiple blocks to define different objects of the same time
81
- (like producers, consumers, pollers etc.).
77
+ Deimos uses the [https://www.github.com/flipp_oss/fig_tree](fig_tree) gem for configuration.
82
78
 
83
79
  The configuration definition for Deimos is in `config/configuration.rb`. In
84
80
  addition, there are methods in `config/phobos_config.rb` which translate to/from
@@ -91,6 +91,7 @@ delivery|`:batch`|The delivery mode for the consumer. Possible values: `:message
91
91
  session_timeout|300|Number of seconds after which, if a client hasn't contacted the Kafka cluster, it will be kicked out of the group.
92
92
  offset_commit_interval|10|Interval between offset commits, in seconds.
93
93
  offset_commit_threshold|0|Number of messages that can be processed before their offsets are committed. If zero, offset commits are not triggered by message processing
94
+ offset_retention_time|nil|The time period that committed offsets will be retained, in seconds. Defaults to the broker setting.
94
95
  heartbeat_interval|10|Interval between heartbeats; must be less than the session window.
95
96
  backoff|`(1000..60_000)`|Range representing the minimum and maximum number of milliseconds to back off after a consumer error.
96
97
 
data/lib/deimos.rb CHANGED
@@ -1,5 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require 'active_support'
4
+
3
5
  require 'phobos'
4
6
  require 'deimos/version'
5
7
  require 'deimos/config/configuration'
@@ -18,7 +20,6 @@ require 'deimos/backends/test'
18
20
 
19
21
  require 'deimos/schema_backends/base'
20
22
 
21
- require 'deimos/monkey_patches/ruby_kafka_heartbeat'
22
23
  require 'deimos/monkey_patches/phobos_producer'
23
24
  require 'deimos/monkey_patches/phobos_cli'
24
25