karafka-core 2.4.8 → 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: 0e34bcf6353effd741851f89dd7fe24f4d7f4ac40e98fb9de47cf0c5d07fe291
4
- data.tar.gz: 9519a4504aa364fdc85bf5b7f276388c7af768fd2d5b31cc352f299161e0f2ca
3
+ metadata.gz: d0e90f463a548ad08a58967cd865248a1b3b0bffff728f2b3c03d603e2262880
4
+ data.tar.gz: af754176e11801b8bbb0154e832e5becf7206c96c62c13e4a6751ea01bf23e38
5
5
  SHA512:
6
- metadata.gz: ee543eedc383def47ddf55ac798c4af4bdcce119ed569f930469c6b67a0599aa84fa40256fd2b63c543239a259de908e1c7ed5b14ccc2d4be53b2cf864ba40aa
7
- data.tar.gz: a716f13946143d35ffee0ad080e9418f68a7deba717578b05ed8ecdccefb6757ea2408a038872f9b9008d3dfa98e3ecca241b75e45d080e9893d510e733b44da
6
+ metadata.gz: 2aa2d5fbb1fac0a05846ba767c77469f154e3b3db91743ad3e056896eed578ff6ccf3f9fa8cdb52a136f6d421b2a3d20a18e9369ac0eab543cc6ff3e7488ebdd
7
+ data.tar.gz: fc819a1e76de4d77c9cccd6aaaede1b8796105ab8d570dfa35f38fdde7a484945138839d4178c1628d6a9fabe615e75a417f22001a8169d1a65bea41d2449bb4
checksums.yaml.gz.sig CHANGED
Binary file
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 3.4.1
1
+ 3.4.2
data/CHANGELOG.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # Karafka Core Changelog
2
2
 
3
+ ## 2.4.9 (2025-03-03)
4
+ - [Enhancement] Remove `RspecLocator` dependency on `activesupport`.
5
+
3
6
  ## 2.4.8 (2024-12-26)
4
7
  - [Maintenance] Declare `logger` as a dependency.
5
8
 
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,53 +1,39 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- karafka-core (2.4.8)
4
+ karafka-core (2.4.9)
5
5
  karafka-rdkafka (>= 0.17.6, < 0.19.0)
6
6
  logger (>= 1.6.0)
7
7
 
8
8
  GEM
9
9
  remote: https://rubygems.org/
10
10
  specs:
11
- activesupport (8.0.1)
12
- base64
13
- benchmark (>= 0.3)
14
- bigdecimal
15
- concurrent-ruby (~> 1.0, >= 1.3.1)
16
- connection_pool (>= 2.2.5)
17
- drb
18
- i18n (>= 1.6, < 2)
19
- logger (>= 1.4.2)
20
- minitest (>= 5.1)
21
- securerandom (>= 0.3)
22
- tzinfo (~> 2.0, >= 2.0.5)
23
- uri (>= 0.13.1)
24
- base64 (0.2.0)
25
- benchmark (0.4.0)
26
- bigdecimal (3.1.8)
27
11
  byebug (11.1.3)
28
- concurrent-ruby (1.3.4)
29
- connection_pool (2.4.1)
30
- diff-lcs (1.5.1)
12
+ diff-lcs (1.6.0)
31
13
  docile (1.4.1)
32
- drb (2.2.1)
33
- factory_bot (6.5.0)
34
- activesupport (>= 5.0.0)
35
- ffi (1.17.0)
36
- i18n (1.14.6)
37
- concurrent-ruby (~> 1.0)
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)
38
25
  karafka-rdkafka (0.18.1)
39
26
  ffi (~> 1.15)
40
27
  mini_portile2 (~> 2.6)
41
28
  rake (> 12)
42
- logger (1.6.4)
29
+ logger (1.6.6)
43
30
  mini_portile2 (2.8.8)
44
- minitest (5.25.4)
45
31
  rake (13.2.1)
46
32
  rspec (3.13.0)
47
33
  rspec-core (~> 3.13.0)
48
34
  rspec-expectations (~> 3.13.0)
49
35
  rspec-mocks (~> 3.13.0)
50
- rspec-core (3.13.2)
36
+ rspec-core (3.13.3)
51
37
  rspec-support (~> 3.13.0)
52
38
  rspec-expectations (3.13.3)
53
39
  diff-lcs (>= 1.2.0, < 2.0)
@@ -56,27 +42,31 @@ GEM
56
42
  diff-lcs (>= 1.2.0, < 2.0)
57
43
  rspec-support (~> 3.13.0)
58
44
  rspec-support (3.13.2)
59
- securerandom (0.4.1)
60
45
  simplecov (0.22.0)
61
46
  docile (~> 1.1)
62
47
  simplecov-html (~> 0.11)
63
48
  simplecov_json_formatter (~> 0.1)
64
49
  simplecov-html (0.13.1)
65
50
  simplecov_json_formatter (0.1.4)
66
- tzinfo (2.0.6)
67
- concurrent-ruby (~> 1.0)
68
- uri (1.0.2)
69
51
 
70
52
  PLATFORMS
53
+ aarch64-linux-gnu
54
+ aarch64-linux-musl
55
+ arm-linux-gnu
56
+ arm-linux-musl
57
+ arm64-darwin
71
58
  ruby
72
- 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
73
64
 
74
65
  DEPENDENCIES
75
66
  byebug
76
- factory_bot
77
67
  karafka-core!
78
68
  rspec
79
69
  simplecov
80
70
 
81
71
  BUNDLED WITH
82
- 2.6.1
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
@@ -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.8'
7
+ VERSION = '2.4.9'
8
8
  end
9
9
  end
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: karafka-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.4.8
4
+ version: 2.4.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Maciej Mensfeld
@@ -34,7 +34,7 @@ cert_chain:
34
34
  i9zWxov0mr44TWegTVeypcWGd/0nxu1+QHVNHJrpqlPBRvwQsUm7fwmRInGpcaB8
35
35
  ap8wNYvryYzrzvzUxIVFBVM5PacgkFqRmolCa8I7tdKQN+R1
36
36
  -----END CERTIFICATE-----
37
- date: 2024-12-26 00:00:00.000000000 Z
37
+ date: 2025-03-03 00:00:00.000000000 Z
38
38
  dependencies:
39
39
  - !ruby/object:Gem::Dependency
40
40
  name: karafka-rdkafka
metadata.gz.sig CHANGED
Binary file