sbmt-kafka_producer 2.1.0 → 2.2.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: 426c17a9e1adcdb138988d2a2b5721556f0740f37b284d805fdb7c5c230488c6
4
- data.tar.gz: 7252b48e77ad609bbcabf45c84c8fc57de44532975e899dc2bcb96ecc696c83d
3
+ metadata.gz: 47faa4bddb7f4bc7b504d3f11dce5493ecc6fc10fd626c37715f54f5d1b3f9c4
4
+ data.tar.gz: 7c17222903ad70290a6ccdbb920f6a45d134ef6370771bdd58d6f9b3b1d99919
5
5
  SHA512:
6
- metadata.gz: 0f8c5a811b2fb7b393d595b865ecdb380c6e1dbd73f9dd48805de791d86e1dff212442b141d703c32fd37f8bf1bb5587245ac37961ddc9a9185834cb539b8a35
7
- data.tar.gz: b659ad4c35ea544d9658d1385825c5b7485990585058d25dcc515a35b3b7a9ff7c532fa1236bcffa117089a5101a41b2e2b0293a3ce204822896becd675b8bde
6
+ metadata.gz: 541bf86973789ffac7211294708007b55b6b6cb3d8840100d7f25ae1df2574040674ed20c33c062bd8bfd5482d334e06dd6189f4fd95247a13487c3d943b8aba
7
+ data.tar.gz: '09f79f5bc41746c01e9cfbc750ef3d0e6f5d7a4ae4b33680961989089eeaa43ae239e185a78b71f9d67a8a09061bcaadfc10c7f0d3738264b1c2cbb88e3e5413'
data/.rubocop.yml CHANGED
@@ -18,7 +18,7 @@ AllCops:
18
18
  NewCops: enable
19
19
  SuggestExtensions: false
20
20
  TargetRubyVersion: 2.7
21
- TargetRailsVersion: 5.2
21
+ TargetRailsVersion: 6.0
22
22
 
23
23
  RSpec/FilePath:
24
24
  Enabled: false
data/Appraisals CHANGED
@@ -3,12 +3,10 @@
3
3
  # See compatibility table at https://www.fastruby.io/blog/ruby/rails/versions/compatibility-table.html
4
4
 
5
5
  versions_map = {
6
- "5.1" => %w[2.7],
7
- "5.2" => %w[2.7],
8
6
  "6.0" => %w[2.7],
9
7
  "6.1" => %w[2.7 3.0],
10
8
  "7.0" => %w[3.1],
11
- "7.1" => %w[3.2]
9
+ "7.1" => %w[3.2, 3.3]
12
10
  }
13
11
 
14
12
  current_ruby_version = RUBY_VERSION.split(".").first(2).join(".")
data/CHANGELOG.md CHANGED
@@ -13,6 +13,19 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
13
13
 
14
14
  ### Fixed
15
15
 
16
+ ## [2.2.1] - 2024-06-07
17
+
18
+ ### Changed
19
+
20
+ - Drop support for Rails 5
21
+ - Temporary limit upper version of Waterdrop to less than 2.7
22
+
23
+ ## [2.2.0] - 2024-04-12
24
+
25
+ ### Changed
26
+
27
+ - Add logs with `offset`.
28
+
16
29
  ## [2.1.0] - 2024-03-14
17
30
 
18
31
  ### Changed
data/Gemfile CHANGED
@@ -3,3 +3,6 @@
3
3
  source "https://rubygems.org"
4
4
 
5
5
  gemspec
6
+
7
+ # FIXME: remove this after drop support for Ruby 2.7
8
+ gem "ffi", "< 1.17"
@@ -9,9 +9,10 @@ module Sbmt
9
9
  option :topic
10
10
 
11
11
  def sync_publish!(payload, options = {})
12
- around_publish do
12
+ report = around_publish do
13
13
  client.produce_sync(payload: payload, **options.merge(topic: topic))
14
14
  end
15
+ log_success(report)
15
16
  true
16
17
  end
17
18
 
@@ -81,6 +82,10 @@ module Sbmt
81
82
  ErrorTracker.error(error)
82
83
  end
83
84
 
85
+ def log_success(report)
86
+ logger.info "Message has been successfully sent to Kafka - topic: #{report.topic_name}, partition: #{report.partition}, offset: #{report.offset}"
87
+ end
88
+
84
89
  def format_exception_error(error)
85
90
  text = "#{format_exception_error(error.cause)}. " if with_cause?(error)
86
91
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Sbmt
4
4
  module KafkaProducer
5
- VERSION = "2.1.0"
5
+ VERSION = "2.2.1"
6
6
  end
7
7
  end
@@ -35,7 +35,7 @@ Gem::Specification.new do |spec|
35
35
  spec.add_dependency "connection_pool"
36
36
  spec.add_dependency "dry-initializer", "~> 3.0"
37
37
  spec.add_dependency "dry-struct"
38
- spec.add_dependency "waterdrop", "~> 2.5"
38
+ spec.add_dependency "waterdrop", "~> 2.5", "< 2.7" # BREAKING: undefined method `wait_timeout='' for #<Karafka::Core::Configurable::Node`
39
39
  spec.add_dependency "zeitwerk", "~> 2.6"
40
40
  spec.add_dependency "yabeda", ">= 0.11"
41
41
 
@@ -47,7 +47,7 @@ Gem::Specification.new do |spec|
47
47
  spec.add_development_dependency "opentelemetry-common", ">= 0.17.0"
48
48
  spec.add_development_dependency "opentelemetry-instrumentation-base", ">= 0.17.0"
49
49
  spec.add_development_dependency "rake", ">= 13.0"
50
- spec.add_development_dependency "rails", ">= 5.2"
50
+ spec.add_development_dependency "rails", ">= 6.0"
51
51
  spec.add_development_dependency "rspec", ">= 3.0"
52
52
  spec.add_development_dependency "rspec_junit_formatter", ">= 0.6"
53
53
  spec.add_development_dependency "rspec-rails", ">= 4.0"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sbmt-kafka_producer
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0
4
+ version: 2.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sbermarket Ruby-Platform Team
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-03-29 00:00:00.000000000 Z
11
+ date: 2024-06-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: anyway_config
@@ -73,6 +73,9 @@ dependencies:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
75
  version: '2.5'
76
+ - - "<"
77
+ - !ruby/object:Gem::Version
78
+ version: '2.7'
76
79
  type: :runtime
77
80
  prerelease: false
78
81
  version_requirements: !ruby/object:Gem::Requirement
@@ -80,6 +83,9 @@ dependencies:
80
83
  - - "~>"
81
84
  - !ruby/object:Gem::Version
82
85
  version: '2.5'
86
+ - - "<"
87
+ - !ruby/object:Gem::Version
88
+ version: '2.7'
83
89
  - !ruby/object:Gem::Dependency
84
90
  name: zeitwerk
85
91
  requirement: !ruby/object:Gem::Requirement
@@ -226,14 +232,14 @@ dependencies:
226
232
  requirements:
227
233
  - - ">="
228
234
  - !ruby/object:Gem::Version
229
- version: '5.2'
235
+ version: '6.0'
230
236
  type: :development
231
237
  prerelease: false
232
238
  version_requirements: !ruby/object:Gem::Requirement
233
239
  requirements:
234
240
  - - ">="
235
241
  - !ruby/object:Gem::Version
236
- version: '5.2'
242
+ version: '6.0'
237
243
  - !ruby/object:Gem::Dependency
238
244
  name: rspec
239
245
  requirement: !ruby/object:Gem::Requirement
@@ -420,7 +426,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
420
426
  - !ruby/object:Gem::Version
421
427
  version: '0'
422
428
  requirements: []
423
- rubygems_version: 3.4.10
429
+ rubygems_version: 3.5.11
424
430
  signing_key:
425
431
  specification_version: 4
426
432
  summary: Ruby gem for producing Kafka messages