messaging 3.7.3 → 3.8.1

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: 6f821ea60a3f97b473dc5d30434d6ae73c5a5a73f6409736f2f700a194072de0
4
- data.tar.gz: 4db14a6944a82b670f205e8e5a24981b2f1e8d28eaefae72ee5a0a1687c18718
3
+ metadata.gz: 680242dd6765be32e542a78687fc9978fe2d77893b48e44d892cc35e10a398d7
4
+ data.tar.gz: ead7fd0a508eb1e68af6d4e0ea03e63a15bc79fc5a95f53b7cd2c5f52b7ce45d
5
5
  SHA512:
6
- metadata.gz: 59dde5072d1c670f5b7976a92387d7ffb2bf5efcf0701af64ba1cc118f5ca592f1c2809a480219ebdad9893463d190e6dcf9b0918b18c993deb6cbd0b863de13
7
- data.tar.gz: 5bce59fffda5491bbaf25d9adb7feff5f2ef21f95c99a89577a461e5de4247b4fbb991fd2c1e33ca08a5c2f890f690dc9d79acb2c904c72957b56ca7d9cc8a2a
6
+ metadata.gz: 7199d01f436aba5924f98c4183412a43f82df8d68e613760d5fd2747be6e4392f81118fb09f77e1ce05140ad3f2538442c50483bbc34da0efe67ca4f105f8345
7
+ data.tar.gz: bc438025531a1a37fbc7503dfdc50c2854ae991a4fbaedb876b80781f09dd2df6248d54100fb3d9574bfcf25695079e6ef12d41b7ea8335f9a519b4958434e30
data/.circleci/config.yml CHANGED
@@ -9,7 +9,7 @@ orbs:
9
9
  shared: &shared
10
10
  docker:
11
11
  # https://github.com/bukowskis/fineart/wiki/Updating-the-development-docker-image-for-Circle-CI
12
- - image: ghcr.io/bukowskis/base-image/development:ruby-2.6.6-v5
12
+ - image: ghcr.io/bukowskis/base-image/development:ruby-2.7.6-v2
13
13
  auth:
14
14
  username: $GHCR_USER
15
15
  password: $GHCR_PASSWORD
data/.gitignore CHANGED
@@ -10,3 +10,5 @@ _site/
10
10
 
11
11
  # rspec failure tracking
12
12
  .rspec_status
13
+ /messaging
14
+ .DS_Store
data/Gemfile.lock CHANGED
@@ -1,13 +1,13 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- messaging (3.7.3)
4
+ messaging (3.8.0)
5
5
  activerecord
6
6
  activesupport
7
7
  after_transaction
8
8
  concurrent-ruby (>= 1.0.2)
9
9
  concurrent-ruby-ext (>= 1.0.2)
10
- dry-configurable
10
+ dry-configurable (~> 1.0.1)
11
11
  dry-container
12
12
  dry-equalizer
13
13
  dry-initializer
@@ -43,8 +43,8 @@ GEM
43
43
  i18n (>= 0.7, < 2)
44
44
  minitest (~> 5.1)
45
45
  tzinfo (~> 1.1)
46
- addressable (2.7.0)
47
- public_suffix (>= 2.0.2, < 5.0)
46
+ addressable (2.8.1)
47
+ public_suffix (>= 2.0.2, < 6.0)
48
48
  after_transaction (0.0.5)
49
49
  activerecord
50
50
  arel (9.0.0)
@@ -65,39 +65,41 @@ GEM
65
65
  colorator (1.1.0)
66
66
  commonmarker (0.17.13)
67
67
  ruby-enum (~> 0.5)
68
- concurrent-ruby (1.1.5)
69
- concurrent-ruby-ext (1.1.5)
70
- concurrent-ruby (= 1.1.5)
68
+ concurrent-ruby (1.1.10)
69
+ concurrent-ruby-ext (1.1.10)
70
+ concurrent-ruby (= 1.1.10)
71
71
  connection_pool (2.2.2)
72
72
  crass (1.0.5)
73
73
  descendants_tracker (0.0.4)
74
74
  thread_safe (~> 0.3, >= 0.3.1)
75
75
  diff-lcs (1.3)
76
76
  digest-crc (0.6.0)
77
- dnsruby (1.61.3)
78
- addressable (~> 2.5)
77
+ dnsruby (1.61.9)
78
+ simpleidn (~> 0.1)
79
79
  docile (1.3.2)
80
- dry-configurable (0.13.0)
80
+ dry-configurable (1.0.1)
81
+ dry-core (~> 1.0, < 2)
82
+ zeitwerk (~> 2.6)
83
+ dry-container (0.11.0)
81
84
  concurrent-ruby (~> 1.0)
82
- dry-core (~> 0.6)
83
- dry-container (0.9.0)
84
- concurrent-ruby (~> 1.0)
85
- dry-configurable (~> 0.13, >= 0.13.0)
86
- dry-core (0.7.1)
85
+ dry-core (1.0.0)
87
86
  concurrent-ruby (~> 1.0)
87
+ zeitwerk (~> 2.6)
88
88
  dry-equalizer (0.3.0)
89
- dry-initializer (3.0.4)
90
- em-websocket (0.5.1)
89
+ dry-initializer (3.1.1)
90
+ em-websocket (0.5.3)
91
91
  eventmachine (>= 0.12.9)
92
- http_parser.rb (~> 0.6.0)
92
+ http_parser.rb (~> 0)
93
93
  erubi (1.9.0)
94
- ethon (0.12.0)
95
- ffi (>= 1.3.0)
94
+ ethon (0.16.0)
95
+ ffi (>= 1.15.0)
96
96
  eventmachine (1.2.7)
97
- execjs (2.7.0)
98
- faraday (0.17.1)
99
- multipart-post (>= 1.2, < 3)
100
- ffi (1.11.3)
97
+ execjs (2.8.1)
98
+ faraday (2.7.2)
99
+ faraday-net_http (>= 2.0, < 3.1)
100
+ ruby2_keywords (>= 0.0.4)
101
+ faraday-net_http (3.0.2)
102
+ ffi (1.15.5)
101
103
  forwardable-extended (2.6.0)
102
104
  gemoji (3.0.1)
103
105
  github-pages (203)
@@ -149,10 +151,10 @@ GEM
149
151
  octokit (~> 4.0)
150
152
  public_suffix (~> 3.0)
151
153
  typhoeus (~> 1.3)
152
- html-pipeline (2.12.2)
154
+ html-pipeline (2.14.3)
153
155
  activesupport (>= 2)
154
156
  nokogiri (>= 1.4)
155
- http_parser.rb (0.6.0)
157
+ http_parser.rb (0.8.0)
156
158
  i18n (0.9.5)
157
159
  concurrent-ruby (~> 1.0)
158
160
  ice_nine (0.11.2)
@@ -266,7 +268,7 @@ GEM
266
268
  json (2.3.0)
267
269
  kramdown (1.17.0)
268
270
  liquid (4.0.3)
269
- listen (3.2.1)
271
+ listen (3.7.1)
270
272
  rb-fsevent (~> 0.10, >= 0.10.3)
271
273
  rb-inotify (~> 0.9, >= 0.9.10)
272
274
  loofah (2.4.0)
@@ -278,18 +280,19 @@ GEM
278
280
  method_object (1.0.0)
279
281
  dry-initializer
280
282
  method_source (0.9.2)
281
- mini_portile2 (2.4.0)
283
+ mini_portile2 (2.8.1)
282
284
  minima (2.5.1)
283
285
  jekyll (>= 3.5, < 5.0)
284
286
  jekyll-feed (~> 0.9)
285
287
  jekyll-seo-tag (~> 2.1)
286
288
  minitest (5.13.0)
287
289
  msgpack (1.3.1)
288
- multipart-post (2.1.1)
289
- nokogiri (1.10.7)
290
- mini_portile2 (~> 2.4.0)
291
- octokit (4.14.0)
292
- sawyer (~> 0.8.0, >= 0.5.3)
290
+ nokogiri (1.13.10)
291
+ mini_portile2 (~> 2.8.0)
292
+ racc (~> 1.4)
293
+ octokit (4.25.1)
294
+ faraday (>= 1, < 3)
295
+ sawyer (~> 0.9)
293
296
  pathutil (0.16.2)
294
297
  forwardable-extended (~> 2.6)
295
298
  pg (1.1.4)
@@ -299,6 +302,7 @@ GEM
299
302
  pry-rails (0.3.9)
300
303
  pry (>= 0.10.4)
301
304
  public_suffix (3.1.1)
305
+ racc (1.6.2)
302
306
  rack (2.0.7)
303
307
  rack-protection (2.0.7)
304
308
  rack
@@ -316,8 +320,8 @@ GEM
316
320
  rake (>= 0.8.7)
317
321
  thor (>= 0.19.0, < 2.0)
318
322
  rake (10.5.0)
319
- rb-fsevent (0.10.3)
320
- rb-inotify (0.10.0)
323
+ rb-fsevent (0.11.2)
324
+ rb-inotify (0.10.1)
321
325
  ffi (~> 1.0)
322
326
  redis (4.1.3)
323
327
  rouge (3.13.0)
@@ -342,20 +346,21 @@ GEM
342
346
  rspec-mocks (~> 3.9.0)
343
347
  rspec-support (~> 3.9.0)
344
348
  rspec-support (3.9.0)
345
- ruby-enum (0.7.2)
349
+ ruby-enum (0.9.0)
346
350
  i18n
347
351
  ruby-kafka (1.5.0)
348
352
  digest-crc
349
- rubyzip (1.3.0)
353
+ ruby2_keywords (0.0.5)
354
+ rubyzip (2.3.2)
350
355
  safe_yaml (1.0.5)
351
356
  sass (3.7.4)
352
357
  sass-listen (~> 4.0.0)
353
358
  sass-listen (4.0.0)
354
359
  rb-fsevent (~> 0.9, >= 0.9.4)
355
360
  rb-inotify (~> 0.9, >= 0.9.7)
356
- sawyer (0.8.2)
361
+ sawyer (0.9.2)
357
362
  addressable (>= 2.3.5)
358
- faraday (> 0.8, < 2.0)
363
+ faraday (>= 0.17.3, < 3)
359
364
  sidekiq (5.2.7)
360
365
  connection_pool (~> 2.2, >= 2.2.2)
361
366
  rack (>= 1.5.0)
@@ -366,20 +371,26 @@ GEM
366
371
  json (>= 1.8, < 3)
367
372
  simplecov-html (~> 0.10.0)
368
373
  simplecov-html (0.10.2)
374
+ simpleidn (0.2.1)
375
+ unf (~> 0.1.4)
369
376
  terminal-table (1.8.0)
370
377
  unicode-display_width (~> 1.1, >= 1.1.1)
371
378
  thor (0.20.3)
372
379
  thread_safe (0.3.6)
373
- typhoeus (1.3.1)
380
+ typhoeus (1.4.0)
374
381
  ethon (>= 0.9.0)
375
- tzinfo (1.2.5)
382
+ tzinfo (1.2.10)
376
383
  thread_safe (~> 0.1)
377
- unicode-display_width (1.6.0)
384
+ unf (0.1.4)
385
+ unf_ext
386
+ unf_ext (0.0.8.2)
387
+ unicode-display_width (1.8.0)
378
388
  useragent (0.16.10)
379
389
  virtus (2.0.0)
380
390
  axiom-types (~> 0.1)
381
391
  coercible (~> 1.0)
382
392
  descendants_tracker (~> 0.0, >= 0.0.3)
393
+ zeitwerk (2.6.6)
383
394
 
384
395
  PLATFORMS
385
396
  ruby
@@ -402,4 +413,4 @@ DEPENDENCIES
402
413
  simplecov
403
414
 
404
415
  BUNDLED WITH
405
- 1.17.3
416
+ 2.1.4
@@ -44,7 +44,7 @@ module Messaging
44
44
  end
45
45
 
46
46
  def create_producer
47
- kafka.client.async_producer(Config.kafka.producer.to_h)
47
+ kafka.client.async_producer(**Config.kafka.producer.to_h)
48
48
  end
49
49
  end
50
50
  end
@@ -27,7 +27,7 @@ module Messaging
27
27
 
28
28
  # Internal: Setup a Ruby-Kafka consumer
29
29
  def create_kafka_consumer(group_id)
30
- client.consumer({ group_id: group_id }.merge(Config.kafka.consumer.to_h))
30
+ client.consumer(**{ group_id: group_id }.merge(Config.kafka.consumer.to_h))
31
31
  end
32
32
 
33
33
  private
@@ -37,7 +37,7 @@ module Messaging
37
37
  # We have a specific logger for Ruby-Kafka as it
38
38
  # is a bit more noisy than we would like.
39
39
  kafka_logger = Messaging.logger.dup.tap { |logger| logger.level = Config.kafka.log_level }
40
- ::Kafka.new(Config.kafka.client.to_h.merge(client_id: Config.app_name, logger: kafka_logger))
40
+ ::Kafka.new(**Config.kafka.client.to_h.merge(client_id: Config.app_name, logger: kafka_logger))
41
41
  end
42
42
 
43
43
  def self.register!
@@ -7,56 +7,56 @@ module Messaging
7
7
  class Config
8
8
  extend ::Dry::Configurable
9
9
 
10
- setting :app_name, 'messaging', reader: true
10
+ setting :app_name, default: 'messaging', reader: true
11
11
 
12
- setting(:error_handlers, [], reader: true) { |value| Array(value) }
12
+ setting(:error_handlers, default: [], reader: true) { |value| Array(value) }
13
13
 
14
- setting :background_job_handler, ->(message, handler_name) { handler_name.constantize.call(message) }, reader: true
14
+ setting :background_job_handler, default: ->(message, handler_name) { handler_name.constantize.call(message) }, reader: true
15
15
 
16
- setting :logger, Logger.new(STDOUT), reader: true
16
+ setting :logger, default: Logger.new(STDOUT), reader: true
17
17
 
18
18
  setting :consumer, reader: true do
19
- setting :adapter, :kafka
20
- setting(:middlewares, []) { |value| Array(value) }
19
+ setting :adapter, default: :kafka
20
+ setting(:middlewares, default: []) { |value| Array(value) }
21
21
  end
22
22
 
23
23
  setting :dispatcher, reader: true do
24
- setting :adapter, :kafka
25
- setting(:middlewares, []) { |value| Array(value) }
24
+ setting :adapter, default: :kafka
25
+ setting(:middlewares, default: []) { |value| Array(value) }
26
26
  end
27
27
 
28
28
  setting :message_store, reader: true do
29
- setting :adapter, :postgres
30
- setting(:middlewares, []) { |value| Array(value) }
29
+ setting :adapter, default: :postgres
30
+ setting(:middlewares, default: []) { |value| Array(value) }
31
31
  end
32
32
 
33
33
  setting :kafka, reader: true do
34
- setting :log_level, :warn
35
- setting :pause_timeout, 10
34
+ setting :log_level, default: :warn
35
+ setting :pause_timeout, default: 10
36
36
 
37
37
  setting :client do
38
- setting :seed_brokers, ['localhost:9092']
38
+ setting :seed_brokers, default: ['localhost:9092']
39
39
  setting :connect_timeout
40
40
  setting :socket_timeout
41
41
  setting :ssl_ca_certs_from_system
42
42
  setting :sasl_plain_username
43
43
  setting :sasl_plain_password
44
- setting :ssl_ca_cert, ENV['KAFKA_SSL_CA']
45
- setting :ssl_client_cert, ENV['KAFKA_SSL_CERTIFICATE']
46
- setting :ssl_client_cert_key, ENV['KAFKA_SSL_KEY']
44
+ setting :ssl_ca_cert, default: ENV['KAFKA_SSL_CA']
45
+ setting :ssl_client_cert, default: ENV['KAFKA_SSL_CERTIFICATE']
46
+ setting :ssl_client_cert_key, default: ENV['KAFKA_SSL_KEY']
47
47
  end
48
48
 
49
49
  setting :consumer do
50
- setting :session_timeout, 30
51
- setting :offset_commit_interval, 10
52
- setting :offset_commit_threshold, 0
53
- setting :heartbeat_interval, 10
50
+ setting :session_timeout, default: 30
51
+ setting :offset_commit_interval, default: 10
52
+ setting :offset_commit_threshold, default: 0
53
+ setting :heartbeat_interval, default: 10
54
54
  end
55
55
 
56
56
  setting :producer do
57
- setting :max_queue_size, 5_000
58
- setting :delivery_threshold, 10
59
- setting :delivery_interval, 0.05
57
+ setting :max_queue_size, default: 5_000
58
+ setting :delivery_threshold, default: 10
59
+ setting :delivery_interval, default: 0.05
60
60
  end
61
61
  end
62
62
 
@@ -18,7 +18,7 @@ module Messaging
18
18
  definitions << { pattern: pattern, options: options, block: block }
19
19
  end
20
20
 
21
- def new(*args, &block)
21
+ def new(*args, **options, &block)
22
22
  instance = allocate
23
23
 
24
24
  # Pre-initialize
@@ -26,7 +26,7 @@ module Messaging
26
26
  instance.on(definition[:pattern], definition[:options], &definition[:block])
27
27
  end
28
28
 
29
- instance.send(:initialize, *args, &block)
29
+ instance.send(:initialize, *args, **options, &block)
30
30
  instance
31
31
  end
32
32
  end
@@ -1,3 +1,3 @@
1
1
  module Messaging
2
- VERSION = '3.7.3'.freeze
2
+ VERSION = '3.8.1'.freeze
3
3
  end
data/messaging.gemspec CHANGED
@@ -24,7 +24,7 @@ Gem::Specification.new do |spec|
24
24
  spec.add_dependency 'method_object'
25
25
  spec.add_dependency 'concurrent-ruby', '>= 1.0.2'
26
26
  spec.add_dependency 'concurrent-ruby-ext', '>= 1.0.2'
27
- spec.add_dependency 'dry-configurable'
27
+ spec.add_dependency 'dry-configurable', '~> 1.0.1'
28
28
  spec.add_dependency 'dry-container'
29
29
  spec.add_dependency 'dry-equalizer'
30
30
  spec.add_dependency 'dry-initializer'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: messaging
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.7.3
4
+ version: 3.8.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bukowskis
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-01-02 00:00:00.000000000 Z
11
+ date: 2023-03-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -98,16 +98,16 @@ dependencies:
98
98
  name: dry-configurable
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - ">="
101
+ - - "~>"
102
102
  - !ruby/object:Gem::Version
103
- version: '0'
103
+ version: 1.0.1
104
104
  type: :runtime
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - ">="
108
+ - - "~>"
109
109
  - !ruby/object:Gem::Version
110
- version: '0'
110
+ version: 1.0.1
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: dry-container
113
113
  requirement: !ruby/object:Gem::Requirement