phobos 2.0.1 → 2.0.2

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: 9e0e6b91f9e7afec0ae7b099dfd87c9106e4d8691c61093e6e0b5c3cddf11a10
4
- data.tar.gz: 3f346e5a54b758a14a24da2ff187e3cb3e76ae855ee2f96462272bac5e16c835
3
+ metadata.gz: 77558904b4cc06321149de51f2b13edeb97704a93128749214ba8454ff997db3
4
+ data.tar.gz: c88ded6d626d55f56eef5645147f102867097bbc5d32c8c4d3604a24b53f8d57
5
5
  SHA512:
6
- metadata.gz: 3f428b81a60214c3038ce4cace27d3c88de0045ec735cd674eac8b5053dc7748ca5b1318dbab250f203ee896df1975ad3a916cf5302cd42d6c314bcd5f40f914
7
- data.tar.gz: 7f03ea7b6445e9a9480169515f13fa5cb542f6dc7b8b6f7b93b1222738ec80f1d34bc6358e4d960d8191033d830e8b65ceb83fa40885097520af78f434325fd5
6
+ metadata.gz: e2c541adb24d1a42be9c99958508ebc143c078c3294df9245094c954de8c5d240be89fdf8a1afcf05ed3ad556290b2a7928b5722b4e1b56a25b2095f9e3d2b69
7
+ data.tar.gz: 49af36a25cc903e7bcc87e6a7a453dfd32127111ce99896b77bf31f50c1967cc8550b9e3740d47d42febaae44ffa92c7dd5e3959c96a0b637bcc5bb20ddf0c66
@@ -6,7 +6,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
6
6
  ``
7
7
  ## UNRELEASED
8
8
 
9
- # [2.0.1] - 2021-01-14
9
+ ## [2.0.2] - 2021-01-28
10
+ - Additional fixes for Ruby 3.0
11
+
12
+ ## [2.0.1] - 2021-01-14
10
13
  - Fix bug with Ruby 3.0 around OpenStruct
11
14
 
12
15
  ## [2.0.0-beta1] - 2020-05-04
@@ -67,7 +67,7 @@ module Phobos
67
67
  end
68
68
 
69
69
  def create_kafka_client
70
- Kafka.new(config.kafka.to_hash.merge(logger: @ruby_kafka_logger))
70
+ Kafka.new(**config.kafka.to_hash.merge(logger: @ruby_kafka_logger))
71
71
  end
72
72
 
73
73
  def create_exponential_backoff(backoff_config = nil)
@@ -13,7 +13,7 @@ module Phobos
13
13
  max_concurrency = listener_configs[:max_concurrency] || 1
14
14
  Array.new(max_concurrency).map do
15
15
  configs = listener_configs.select { |k| Constants::LISTENER_OPTS.include?(k) }
16
- Phobos::Listener.new(configs.merge(handler: handler_class))
16
+ Phobos::Listener.new(**configs.merge(handler: handler_class))
17
17
  end
18
18
  end
19
19
  end
@@ -93,7 +93,7 @@ module Phobos
93
93
  def start_listener
94
94
  instrument('listener.start', listener_metadata) do
95
95
  @consumer = create_kafka_consumer
96
- @consumer.subscribe(topic, @subscribe_opts)
96
+ @consumer.subscribe(topic, **@subscribe_opts)
97
97
 
98
98
  # This is done here because the producer client is bound to the current thread and
99
99
  # since "start" blocks a thread might be used to call it
@@ -135,7 +135,7 @@ module Phobos
135
135
  end
136
136
 
137
137
  def consume_each_batch
138
- @consumer.each_batch(@message_processing_opts) do |batch|
138
+ @consumer.each_batch(**@message_processing_opts) do |batch|
139
139
  batch_processor = Phobos::Actions::ProcessBatch.new(
140
140
  listener: self,
141
141
  batch: batch,
@@ -149,7 +149,7 @@ module Phobos
149
149
  end
150
150
 
151
151
  def consume_each_batch_inline
152
- @consumer.each_batch(@message_processing_opts) do |batch|
152
+ @consumer.each_batch(**@message_processing_opts) do |batch|
153
153
  batch_processor = Phobos::Actions::ProcessBatchInline.new(
154
154
  listener: self,
155
155
  batch: batch,
@@ -163,7 +163,7 @@ module Phobos
163
163
  end
164
164
 
165
165
  def consume_each_message
166
- @consumer.each_message(@message_processing_opts) do |message|
166
+ @consumer.each_message(**@message_processing_opts) do |message|
167
167
  message_processor = Phobos::Actions::ProcessMessage.new(
168
168
  listener: self,
169
169
  message: message,
@@ -181,7 +181,7 @@ module Phobos
181
181
  Constants::KAFKA_CONSUMER_OPTS.include?(k)
182
182
  end
183
183
  configs.merge!(@kafka_consumer_opts)
184
- @kafka_client.consumer({ group_id: group_id }.merge(configs))
184
+ @kafka_client.consumer(**{ group_id: group_id }.merge(configs))
185
185
  end
186
186
 
187
187
  def compact(hash)
@@ -78,7 +78,7 @@ module Phobos
78
78
 
79
79
  def create_sync_producer
80
80
  client = kafka_client || configure_kafka_client(Phobos.create_kafka_client)
81
- sync_producer = client.producer(regular_configs)
81
+ sync_producer = client.producer(**regular_configs)
82
82
  if Phobos.config.producer_hash[:persistent_connections]
83
83
  producer_store[:sync_producer] = sync_producer
84
84
  end
@@ -109,7 +109,7 @@ module Phobos
109
109
 
110
110
  def create_async_producer
111
111
  client = kafka_client || configure_kafka_client(Phobos.create_kafka_client)
112
- async_producer = client.async_producer(async_configs)
112
+ async_producer = client.async_producer(**async_configs)
113
113
  producer_store[:async_producer] = async_producer
114
114
  end
115
115
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Phobos
4
- VERSION = '2.0.1'
4
+ VERSION = '2.0.2'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: phobos
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.1
4
+ version: 2.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Túlio Ornelas
@@ -15,7 +15,7 @@ authors:
15
15
  autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
- date: 2021-01-14 00:00:00.000000000 Z
18
+ date: 2021-01-28 00:00:00.000000000 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: bundler
@@ -314,7 +314,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
314
314
  - !ruby/object:Gem::Version
315
315
  version: '0'
316
316
  requirements: []
317
- rubygems_version: 3.0.9
317
+ rubygems_version: 3.2.3
318
318
  signing_key:
319
319
  specification_version: 4
320
320
  summary: Simplifying Kafka for ruby apps