karafka-core 2.0.9 → 2.0.11

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: e72c7e94ff3ed4be1b9e895f05f5642b72421f7cc8a0f62de4b41c193398e69d
4
- data.tar.gz: 820738037d6ee277e8ce6a2c3786cfe7e26559836f3c71e46933feeeaff10081
3
+ metadata.gz: 5593ddb70f6e2cf57e058e2d8688dc55121ac02b9d6882358979edceff41dd87
4
+ data.tar.gz: f2d5546158923107a84934711c567e4beb0a8e3bfa8b7697505eb94b70d90a9f
5
5
  SHA512:
6
- metadata.gz: 17f4711778e4c0aa51355048100ae651eea92a8ca89b6ddaa7e8e312de14ee3770affb76fc88d7eb7780e73bf67bc6958de83bac9b62551743f5c254c35e15cb
7
- data.tar.gz: e68bf7877cd31eaca51fb4ef7f5759e36a52216d41bd7aab05b7195906a1b00c29514c8624ab82534d3ae57d57c87dafc09913953b2462dce606b833228ec015
6
+ metadata.gz: aaa78148833a7eda544fb5c03eb1f226422a439d27d08e8d431070ac944234b00d884fb9056e80f9327b461cc8dd80d44a782734655706a1a4841c4aa4b5f8c7
7
+ data.tar.gz: '008ddf1bb91fb5b237d531337eb216d0870dbb39dd2cfe646b6dac07046a2b14891be02efb3957e1f8dc9742eae5586eeb20a21b39380d0f445a58124f6599ae'
checksums.yaml.gz.sig CHANGED
Binary file
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 3.2.0
1
+ 3.2.1
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Karafka core changelog
2
2
 
3
+ ## 2.0.11 (2023-02-12)
4
+ - Set minimum `karafka-rdkafka` on `0.12.1`.
5
+
6
+ ## 2.0.10 (2023-02-01)
7
+ - Move `RspecLocator` to core.
8
+
3
9
  ## 2.0.9 (2023-01-11)
4
10
  - Use `karafka-rdkafka` instead of `rdkafka`. This change is needed to ensure that all consecutive releases are stable and compatible.
5
11
  - Relax Ruby requirement to `2.6`. It does not mean we officially support it but it may work. Go to [Versions Lifecycle and EOL](https://karafka.io/docs/Versions-Lifecycle-and-EOL/) for more details.
data/Gemfile.lock CHANGED
@@ -1,20 +1,20 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- karafka-core (2.0.9)
4
+ karafka-core (2.0.11)
5
5
  concurrent-ruby (>= 1.1)
6
- karafka-rdkafka (>= 0.12)
6
+ karafka-rdkafka (>= 0.12.1)
7
7
 
8
8
  GEM
9
9
  remote: https://rubygems.org/
10
10
  specs:
11
- activesupport (7.0.4)
11
+ activesupport (7.0.4.2)
12
12
  concurrent-ruby (~> 1.0, >= 1.0.2)
13
13
  i18n (>= 1.6, < 2)
14
14
  minitest (>= 5.1)
15
15
  tzinfo (~> 2.0)
16
16
  byebug (11.1.3)
17
- concurrent-ruby (1.1.10)
17
+ concurrent-ruby (1.2.0)
18
18
  diff-lcs (1.5.0)
19
19
  docile (1.4.0)
20
20
  factory_bot (6.2.1)
@@ -22,7 +22,7 @@ GEM
22
22
  ffi (1.15.5)
23
23
  i18n (1.12.0)
24
24
  concurrent-ruby (~> 1.0)
25
- karafka-rdkafka (0.12.0)
25
+ karafka-rdkafka (0.12.1)
26
26
  ffi (~> 1.15)
27
27
  mini_portile2 (~> 2.6)
28
28
  rake (> 12)
@@ -33,12 +33,12 @@ GEM
33
33
  rspec-core (~> 3.12.0)
34
34
  rspec-expectations (~> 3.12.0)
35
35
  rspec-mocks (~> 3.12.0)
36
- rspec-core (3.12.0)
36
+ rspec-core (3.12.1)
37
37
  rspec-support (~> 3.12.0)
38
- rspec-expectations (3.12.1)
38
+ rspec-expectations (3.12.2)
39
39
  diff-lcs (>= 1.2.0, < 2.0)
40
40
  rspec-support (~> 3.12.0)
41
- rspec-mocks (3.12.1)
41
+ rspec-mocks (3.12.3)
42
42
  diff-lcs (>= 1.2.0, < 2.0)
43
43
  rspec-support (~> 3.12.0)
44
44
  rspec-support (3.12.0)
@@ -48,11 +48,10 @@ GEM
48
48
  simplecov_json_formatter (~> 0.1)
49
49
  simplecov-html (0.12.3)
50
50
  simplecov_json_formatter (0.1.4)
51
- tzinfo (2.0.5)
51
+ tzinfo (2.0.6)
52
52
  concurrent-ruby (~> 1.0)
53
53
 
54
54
  PLATFORMS
55
- arm64-darwin-21
56
55
  x86_64-linux
57
56
 
58
57
  DEPENDENCIES
@@ -63,4 +62,4 @@ DEPENDENCIES
63
62
  simplecov
64
63
 
65
64
  BUNDLED WITH
66
- 2.4.2
65
+ 2.4.6
data/karafka-core.gemspec CHANGED
@@ -17,7 +17,7 @@ Gem::Specification.new do |spec|
17
17
  spec.licenses = %w[MIT]
18
18
 
19
19
  spec.add_dependency 'concurrent-ruby', '>= 1.1'
20
- spec.add_dependency 'karafka-rdkafka', '>= 0.12'
20
+ spec.add_dependency 'karafka-rdkafka', '>= 0.12.1'
21
21
 
22
22
  spec.required_ruby_version = '>= 2.6.0'
23
23
 
@@ -0,0 +1,69 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'fileutils'
4
+
5
+ module Karafka
6
+ module Core
7
+ module Helpers
8
+ # RSpec extension for the `RSpec.describe` subject class auto-discovery
9
+ # It automatically detects the class name that should be described in the given spec
10
+ # based on the spec file path.
11
+ # @example Just include it, extend with instantiation and use `RSpec#describe_current`
12
+ # instead of `RSpec#describe`
13
+ # RSpec.extend SupportEngine::RSpecLocator.new(__FILE__)
14
+ class RSpecLocator < Module
15
+ # @param spec_helper_file_path [String] path to the spec_helper.rb file
16
+ # @param inflections [Hash<String, String>] optional inflections map
17
+ def initialize(spec_helper_file_path, inflections = {})
18
+ super()
19
+ @inflections = inflections
20
+ @specs_root_dir = ::File.dirname(spec_helper_file_path)
21
+ end
22
+
23
+ # Builds needed API
24
+ # @param rspec [Module] RSpec main module
25
+ def extended(rspec)
26
+ super
27
+
28
+ this = self
29
+
30
+ # Allows "auto subject" definitions for the `#describe` method, as it will figure
31
+ # out the proper class that we want to describe
32
+ # @param block [Proc] block with specs
33
+ rspec.define_singleton_method :describe_current do |&block|
34
+ describe(this.inherited, &block)
35
+ end
36
+ end
37
+
38
+ # @return [Class] class name for the RSpec `#describe` method
39
+ def inherited
40
+ caller(2..2)
41
+ .first
42
+ .split(':')
43
+ .first
44
+ .gsub(@specs_root_dir, '')
45
+ .gsub('_spec.rb', '')
46
+ .split('/')
47
+ .delete_if(&:empty?)
48
+ .itself[1..]
49
+ .join('/')
50
+ .camelize
51
+ .then { |string| transform_inflections(string) }
52
+ .constantize
53
+ end
54
+
55
+ private
56
+
57
+ # @param string [String] string we want to cast
58
+ # @return [String] string after inflections
59
+ def transform_inflections(string)
60
+ string = string.dup
61
+
62
+ @inflections.each { |from, to| string.gsub!(from, to) }
63
+
64
+ string
65
+ end
66
+ end
67
+ end
68
+ end
69
+ 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.0.9'
7
+ VERSION = '2.0.11'
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.0.9
4
+ version: 2.0.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Maciej Mensfeld
@@ -35,7 +35,7 @@ cert_chain:
35
35
  Qf04B9ceLUaC4fPVEz10FyobjaFoY4i32xRto3XnrzeAgfEe4swLq8bQsR3w/EF3
36
36
  MGU0FeSV2Yj7Xc2x/7BzLK8xQn5l7Yy75iPF+KP3vVmDHnNl
37
37
  -----END CERTIFICATE-----
38
- date: 2023-01-11 00:00:00.000000000 Z
38
+ date: 2023-02-12 00:00:00.000000000 Z
39
39
  dependencies:
40
40
  - !ruby/object:Gem::Dependency
41
41
  name: concurrent-ruby
@@ -57,14 +57,14 @@ dependencies:
57
57
  requirements:
58
58
  - - ">="
59
59
  - !ruby/object:Gem::Version
60
- version: '0.12'
60
+ version: 0.12.1
61
61
  type: :runtime
62
62
  prerelease: false
63
63
  version_requirements: !ruby/object:Gem::Requirement
64
64
  requirements:
65
65
  - - ">="
66
66
  - !ruby/object:Gem::Version
67
- version: '0.12'
67
+ version: 0.12.1
68
68
  description: A toolset of small support modules used throughout the Karafka ecosystem
69
69
  email:
70
70
  - contact@karafka.io
@@ -101,6 +101,7 @@ files:
101
101
  - lib/karafka/core/contractable/contract.rb
102
102
  - lib/karafka/core/contractable/result.rb
103
103
  - lib/karafka/core/contractable/rule.rb
104
+ - lib/karafka/core/helpers/rspec_locator.rb
104
105
  - lib/karafka/core/helpers/time.rb
105
106
  - lib/karafka/core/instrumentation.rb
106
107
  - lib/karafka/core/instrumentation/callbacks_manager.rb
@@ -138,7 +139,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
138
139
  - !ruby/object:Gem::Version
139
140
  version: '0'
140
141
  requirements: []
141
- rubygems_version: 3.4.1
142
+ rubygems_version: 3.4.6
142
143
  signing_key:
143
144
  specification_version: 4
144
145
  summary: Karafka ecosystem core modules
metadata.gz.sig CHANGED
@@ -1 +1,3 @@
1
- �57�7/B��y3iV{�������Y1�l���<�h) x� 4Ȍ�Mـ���vU�uu�jWCF]�e�h+�'�������&K��{ff.�/�P�3"]���q���Q��v �lk([ f�Q
1
+ -<�BE�"���&��9l��qbQ3[ �]�AyJ4�|��f�����Ԍ�D �@� �� ���A*����=BVW��:�;��~�������$
2
+ G��Cġv�B)�c�}��b� M�TA�:��~�����g�'�!
3
+ ��9�B�"�P�1l�K,~����:l�53��fxx-M��9���+s�JOu@T�3't�pC�ΣSl&��i�}>{��R�)��]����St�4��!t��`As�i�?�|4�M{�<}}*?9^�f�Bm�ڶ�n�+�,1˃;�(h��~�3���<��f����c��t�v�C�i3�"�2�e�O�����4�H+���\ ��ъxWC�G��F���E?��u թ�