karafka-core 2.4.7 → 2.4.9

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: ca8cee16c1b8042cb0b3366599aeff212260c3164c42345295eb70c74ced6e43
4
- data.tar.gz: 7df540c0cc569c96dff46fd30d5c5d40e733663cf948ab8c3617ecfc01e32a54
3
+ metadata.gz: d0e90f463a548ad08a58967cd865248a1b3b0bffff728f2b3c03d603e2262880
4
+ data.tar.gz: af754176e11801b8bbb0154e832e5becf7206c96c62c13e4a6751ea01bf23e38
5
5
  SHA512:
6
- metadata.gz: 6e32ff4af24a4000615db1420a3659d8f9c3babc4542ca16da4b642c4df0e6de28e7e4ff4d69ced8f75422792c0bbba34b59302d8571d42700a11fb2ca67ac10
7
- data.tar.gz: d37dac3d63d93dca63c17a0c4b3256fd9afa2eec3f742fbb5cf18a18bfcccc59f3a7bcbf696500e6d0900cf199e0de98d105c41d39ded7afe6522b721c0e2038
6
+ metadata.gz: 2aa2d5fbb1fac0a05846ba767c77469f154e3b3db91743ad3e056896eed578ff6ccf3f9fa8cdb52a136f6d421b2a3d20a18e9369ac0eab543cc6ff3e7488ebdd
7
+ data.tar.gz: fc819a1e76de4d77c9cccd6aaaede1b8796105ab8d570dfa35f38fdde7a484945138839d4178c1628d6a9fabe615e75a417f22001a8169d1a65bea41d2449bb4
checksums.yaml.gz.sig CHANGED
@@ -1,4 +1,3 @@
1
- <eB�9�!G(Ʊ��#�C�:�0�fJ=���B�w&�v��)��|�6kq��Q\ث�&����Q���0�g�1k��\��HF@��)}����f|u��
2
- �p���
3
- o�[��!���&����r¤U��P*l�3z���wؒ{app���Gz��Ԝ@E�&m����&�ON|����&�ȏ�O�{bz�4��+���2+��咒 �,E�>�y?_�r��.�t9ę�����ڏ�/�ĎE�E��~����o �ʭ�o˕���o�t5��K���T�6~NX��<�
4
- ��Vd8\�A�g�d�:��5e���qʑ|z���ɮ�@�^��?������.�*k����ֲ���=�y��ͮ�\���Lr��{�u �}����v
1
+ 1m*�� �
2
+ RRM&�谀Z1�@f쟚n$YO��IS9�(�N�a=bZ���]@V(YR�tH�%v�{ѫG� u��Nƿ@�~�'ȇ��vP n��>��h���L�o��;�q/�v�-��e"A6~|B�a:_m�O������O!O��N��g�R�;�[ �#�U�@wSC�E��®�-��;+���~�Jx��wNBg���<�JjS#�� ��q�Q}O�R�����˞�}hj J�$��O�$�|Bu�Sy�-I=�A�y��;�Tɕ ���V0�g!��Ew�����ݧV�
3
+ 4$ ��+z؄�����B��(�:��*�&?��Lb*�D26����
@@ -18,12 +18,12 @@ jobs:
18
18
  fail-fast: false
19
19
  matrix:
20
20
  ruby:
21
- - '3.4.0-preview2'
21
+ - '3.4'
22
22
  - '3.3'
23
23
  - '3.2'
24
24
  - '3.1'
25
25
  include:
26
- - ruby: '3.3'
26
+ - ruby: '3.4'
27
27
  coverage: 'true'
28
28
  steps:
29
29
  - uses: actions/checkout@v4
@@ -62,7 +62,7 @@ jobs:
62
62
  - name: Set up Ruby
63
63
  uses: ruby/setup-ruby@v1
64
64
  with:
65
- ruby-version: 3.3
65
+ ruby-version: 3.4
66
66
  - name: Install latest bundler
67
67
  run: gem install bundler --no-document
68
68
  - name: Install Diffend plugin
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 3.3.6
1
+ 3.4.2
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Karafka Core Changelog
2
2
 
3
+ ## 2.4.9 (2025-03-03)
4
+ - [Enhancement] Remove `RspecLocator` dependency on `activesupport`.
5
+
6
+ ## 2.4.8 (2024-12-26)
7
+ - [Maintenance] Declare `logger` as a dependency.
8
+
3
9
  ## 2.4.7 (2024-11-26)
4
10
  - [Fix] Make sure that `karafka-core` works with older versions of `karafka-rdkafka` that do not support macos fork mitigation.
5
11
 
data/Gemfile CHANGED
@@ -8,7 +8,6 @@ gemspec
8
8
 
9
9
  group :test do
10
10
  gem 'byebug'
11
- gem 'factory_bot'
12
11
  gem 'rspec'
13
12
  gem 'simplecov'
14
13
  end
data/Gemfile.lock CHANGED
@@ -1,77 +1,72 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- karafka-core (2.4.7)
4
+ karafka-core (2.4.9)
5
5
  karafka-rdkafka (>= 0.17.6, < 0.19.0)
6
+ logger (>= 1.6.0)
6
7
 
7
8
  GEM
8
9
  remote: https://rubygems.org/
9
10
  specs:
10
- activesupport (7.2.1)
11
- base64
12
- bigdecimal
13
- concurrent-ruby (~> 1.0, >= 1.3.1)
14
- connection_pool (>= 2.2.5)
15
- drb
16
- i18n (>= 1.6, < 2)
17
- logger (>= 1.4.2)
18
- minitest (>= 5.1)
19
- securerandom (>= 0.3)
20
- tzinfo (~> 2.0, >= 2.0.5)
21
- base64 (0.2.0)
22
- bigdecimal (3.1.8)
23
11
  byebug (11.1.3)
24
- concurrent-ruby (1.3.4)
25
- connection_pool (2.4.1)
26
- diff-lcs (1.5.1)
27
- docile (1.4.0)
28
- drb (2.2.1)
29
- factory_bot (6.5.0)
30
- activesupport (>= 5.0.0)
31
- ffi (1.17.0)
32
- i18n (1.14.5)
33
- concurrent-ruby (~> 1.0)
34
- karafka-rdkafka (0.18.0)
12
+ diff-lcs (1.6.0)
13
+ docile (1.4.1)
14
+ ffi (1.17.1)
15
+ ffi (1.17.1-aarch64-linux-gnu)
16
+ ffi (1.17.1-aarch64-linux-musl)
17
+ ffi (1.17.1-arm-linux-gnu)
18
+ ffi (1.17.1-arm-linux-musl)
19
+ ffi (1.17.1-arm64-darwin)
20
+ ffi (1.17.1-x86-linux-gnu)
21
+ ffi (1.17.1-x86-linux-musl)
22
+ ffi (1.17.1-x86_64-darwin)
23
+ ffi (1.17.1-x86_64-linux-gnu)
24
+ ffi (1.17.1-x86_64-linux-musl)
25
+ karafka-rdkafka (0.18.1)
35
26
  ffi (~> 1.15)
36
27
  mini_portile2 (~> 2.6)
37
28
  rake (> 12)
38
- logger (1.6.1)
29
+ logger (1.6.6)
39
30
  mini_portile2 (2.8.8)
40
- minitest (5.25.1)
41
31
  rake (13.2.1)
42
32
  rspec (3.13.0)
43
33
  rspec-core (~> 3.13.0)
44
34
  rspec-expectations (~> 3.13.0)
45
35
  rspec-mocks (~> 3.13.0)
46
- rspec-core (3.13.0)
36
+ rspec-core (3.13.3)
47
37
  rspec-support (~> 3.13.0)
48
- rspec-expectations (3.13.1)
38
+ rspec-expectations (3.13.3)
49
39
  diff-lcs (>= 1.2.0, < 2.0)
50
40
  rspec-support (~> 3.13.0)
51
- rspec-mocks (3.13.1)
41
+ rspec-mocks (3.13.2)
52
42
  diff-lcs (>= 1.2.0, < 2.0)
53
43
  rspec-support (~> 3.13.0)
54
- rspec-support (3.13.1)
55
- securerandom (0.3.1)
44
+ rspec-support (3.13.2)
56
45
  simplecov (0.22.0)
57
46
  docile (~> 1.1)
58
47
  simplecov-html (~> 0.11)
59
48
  simplecov_json_formatter (~> 0.1)
60
- simplecov-html (0.12.3)
49
+ simplecov-html (0.13.1)
61
50
  simplecov_json_formatter (0.1.4)
62
- tzinfo (2.0.6)
63
- concurrent-ruby (~> 1.0)
64
51
 
65
52
  PLATFORMS
53
+ aarch64-linux-gnu
54
+ aarch64-linux-musl
55
+ arm-linux-gnu
56
+ arm-linux-musl
57
+ arm64-darwin
66
58
  ruby
67
- x86_64-linux
59
+ x86-linux-gnu
60
+ x86-linux-musl
61
+ x86_64-darwin
62
+ x86_64-linux-gnu
63
+ x86_64-linux-musl
68
64
 
69
65
  DEPENDENCIES
70
66
  byebug
71
- factory_bot
72
67
  karafka-core!
73
68
  rspec
74
69
  simplecov
75
70
 
76
71
  BUNDLED WITH
77
- 2.5.14
72
+ 2.6.2
@@ -4,6 +4,9 @@ en:
4
4
  missing: needs to be present
5
5
  id_format: needs to be a String
6
6
  nested.id2_format: needs to be a String
7
+ id_format: needs to be a String
8
+ test_format: needs to be 5
9
+ details.id_format: needs to be a String
7
10
 
8
11
  config:
9
12
  missing: needs to be present
data/karafka-core.gemspec CHANGED
@@ -17,6 +17,7 @@ Gem::Specification.new do |spec|
17
17
  spec.licenses = %w[MIT]
18
18
 
19
19
  spec.add_dependency 'karafka-rdkafka', '>= 0.17.6', '< 0.19.0'
20
+ spec.add_dependency 'logger', '>= 1.6.0'
20
21
 
21
22
  spec.required_ruby_version = '>= 3.1.0'
22
23
 
@@ -24,9 +24,7 @@ module Karafka
24
24
  # @param rspec [Module] RSpec main module
25
25
  def extended(rspec)
26
26
  super
27
-
28
27
  this = self
29
-
30
28
  # Allows "auto subject" definitions for the `#describe` method, as it will figure
31
29
  # out the proper class that we want to describe
32
30
  # @param block [Proc] block with specs
@@ -47,9 +45,9 @@ module Karafka
47
45
  .delete_if(&:empty?)
48
46
  .itself[1..]
49
47
  .join('/')
50
- .camelize
48
+ .then { |path| custom_camelize(path) }
51
49
  .then { |string| transform_inflections(string) }
52
- .constantize
50
+ .then { |class_name| custom_constantize(class_name) }
53
51
  end
54
52
 
55
53
  private
@@ -58,11 +56,48 @@ module Karafka
58
56
  # @return [String] string after inflections
59
57
  def transform_inflections(string)
60
58
  string = string.dup
61
-
62
59
  @inflections.each { |from, to| string.gsub!(from, to) }
63
-
64
60
  string
65
61
  end
62
+
63
+ # Custom implementation of camelize without ActiveSupport
64
+ # @param string [String] underscored string to convert to CamelCase
65
+ # @return [String] camel-case string
66
+ def custom_camelize(string)
67
+ # First, replace slashes with :: for proper namespacing
68
+ string = string.gsub('/', '::')
69
+
70
+ # Then camelize each segment
71
+ string.gsub(/(?:^|_|::)([a-z])/) do |match|
72
+ # If it's a namespace separator, keep it and uppercase the following letter
73
+ if match.include?('::')
74
+ "::#{match[-1].upcase}"
75
+ else
76
+ match[-1].upcase
77
+ end
78
+ end
79
+ end
80
+
81
+ # Custom implementation of constantize without ActiveSupport
82
+ # @param string [String] string representing a constant name
83
+ # @return [Class, Module] the constant
84
+ def custom_constantize(string)
85
+ names = string.split('::')
86
+ constant = Object
87
+ regexp = /^[A-Z][a-zA-Z0-9_]*$/
88
+
89
+ names.each do |name|
90
+ # Make sure we're dealing with a valid constant name
91
+ raise NameError, "#{name} is not a valid constant name!" unless name.match?(regexp)
92
+
93
+ # Get the constant from its parent
94
+ constant = constant.const_get(name)
95
+ end
96
+
97
+ constant
98
+ rescue NameError => e
99
+ raise NameError, "Uninitialized constant #{string}: #{e.message}"
100
+ end
66
101
  end
67
102
  end
68
103
  end
@@ -4,6 +4,6 @@ module Karafka
4
4
  module Core
5
5
  # Current Karafka::Core version
6
6
  # We follow the versioning schema of given Karafka version
7
- VERSION = '2.4.7'
7
+ VERSION = '2.4.9'
8
8
  end
9
9
  end
data/lib/karafka-core.rb CHANGED
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  %w[
4
+ logger
4
5
  yaml
5
6
  rdkafka
6
7
 
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,11 +1,10 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: karafka-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.4.7
4
+ version: 2.4.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Maciej Mensfeld
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain:
11
10
  - |
@@ -35,7 +34,7 @@ cert_chain:
35
34
  i9zWxov0mr44TWegTVeypcWGd/0nxu1+QHVNHJrpqlPBRvwQsUm7fwmRInGpcaB8
36
35
  ap8wNYvryYzrzvzUxIVFBVM5PacgkFqRmolCa8I7tdKQN+R1
37
36
  -----END CERTIFICATE-----
38
- date: 2024-11-26 00:00:00.000000000 Z
37
+ date: 2025-03-03 00:00:00.000000000 Z
39
38
  dependencies:
40
39
  - !ruby/object:Gem::Dependency
41
40
  name: karafka-rdkafka
@@ -57,6 +56,20 @@ dependencies:
57
56
  - - "<"
58
57
  - !ruby/object:Gem::Version
59
58
  version: 0.19.0
59
+ - !ruby/object:Gem::Dependency
60
+ name: logger
61
+ requirement: !ruby/object:Gem::Requirement
62
+ requirements:
63
+ - - ">="
64
+ - !ruby/object:Gem::Version
65
+ version: 1.6.0
66
+ type: :runtime
67
+ prerelease: false
68
+ version_requirements: !ruby/object:Gem::Requirement
69
+ requirements:
70
+ - - ">="
71
+ - !ruby/object:Gem::Version
72
+ version: 1.6.0
60
73
  description: A toolset of small support modules used throughout the Karafka ecosystem
61
74
  email:
62
75
  - contact@karafka.io
@@ -119,7 +132,6 @@ metadata:
119
132
  source_code_uri: https://github.com/karafka/karafka-core
120
133
  documentation_uri: https://karafka.io/docs
121
134
  rubygems_mfa_required: 'true'
122
- post_install_message:
123
135
  rdoc_options: []
124
136
  require_paths:
125
137
  - lib
@@ -134,8 +146,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
134
146
  - !ruby/object:Gem::Version
135
147
  version: '0'
136
148
  requirements: []
137
- rubygems_version: 3.5.22
138
- signing_key:
149
+ rubygems_version: 3.6.2
139
150
  specification_version: 4
140
151
  summary: Karafka ecosystem core modules
141
152
  test_files: []
metadata.gz.sig CHANGED
Binary file