karafka-testing 2.3.1 → 2.4.0.rc1

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: 5b5e94cc98b3418a25cd549e4e9f4851d22fa819b499b77185afb7ee1e1f10c6
4
- data.tar.gz: 415e32601301d2f07de6c575109c443af8f489c178041e387d6fe1d1530550ca
3
+ metadata.gz: 587bb151db13812b7c26215c9357264f21a3357448fffe542363042db19c7744
4
+ data.tar.gz: 2c624b601afc5384ae7ce43bf6b0ac19f27a8ec8b00aacd796c33da5e19fdd40
5
5
  SHA512:
6
- metadata.gz: 17eb73114b43f84c813ad176f8a8913fde8f175f0b41ecbe78bfd3bb20c30259aaab791cd9cb719c1aab9cef0daceed651d7c342201fffd227db495f5d55ce51
7
- data.tar.gz: e42445092d3ab33eb27d1145c9897f94b3758bd57b624935fd8d8fd3f37999d3333caf70b2c713196a672978b478a8dc4a5923aa6924387331c076334e14391f
6
+ metadata.gz: c70be00aeb884026f00025dc207219761ba5374e91980d89fffff2b4a76eef26098896cf60860d8f9dc088e8606569ab23c3b6ad6b75e31225ca6ad51f7296c4
7
+ data.tar.gz: 344b7a3176b89a1882656eb730a458093b580e25a4e6363472b3dd95f200999697c5216814fbecb4c214a50f231e6e32f46cca1af6c90a6274ce4b6b09f19e4d
checksums.yaml.gz.sig CHANGED
Binary file
@@ -22,7 +22,6 @@ jobs:
22
22
  - '3.2'
23
23
  - '3.1'
24
24
  - '3.0'
25
- - '2.7'
26
25
  include:
27
26
  - ruby: '3.3'
28
27
  coverage: 'true'
@@ -40,24 +39,14 @@ jobs:
40
39
 
41
40
  - name: Install latest bundler
42
41
  run: |
43
- if [[ "$(ruby -v | awk '{print $2}')" == 2.7.8* ]]; then
44
- gem install bundler -v 2.4.22 --no-document
45
- bundle config set version 2.4.22
46
- gem update --system 3.4.22 --no-document
47
- else
48
- gem install bundler --no-document
49
- gem update --system --no-document
50
- fi
42
+ gem install bundler --no-document
43
+ gem update --system --no-document
51
44
 
52
45
  bundle config set without 'tools benchmarks docs'
53
46
 
54
47
  - name: Bundle install
55
48
  run: |
56
- if [[ "$(ruby -v | awk '{print $2}')" == 2.7.8* ]]; then
57
- BUNDLER_VERSION=2.4.22 bundle install --jobs 4 --retry 3
58
- else
59
- bundle install --jobs 4 --retry 3
60
- fi
49
+ bundle install --jobs 4 --retry 3
61
50
 
62
51
  diffend:
63
52
  runs-on: ubuntu-latest
data/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Karafka Test gem changelog
2
2
 
3
+ ## 2.4.0 (Unreleased)
4
+ - **[Breaking]** Drop Ruby `2.7` support.
5
+ - [Fix] Support again `require: false` on gem loading.
6
+
7
+ ## 2.3.2 (2024-04-03)
8
+ - [Enhancement] Support `Minitest::Spec`.
9
+
3
10
  ## 2.3.1 (2024-03-07)
4
11
  - [Enhancement] Prevent usage of testing when Karafka is not loaded.
5
12
  - [Enhancement] Prevent usage of testing when Karafka is not initialized.
data/Gemfile.lock CHANGED
@@ -1,28 +1,28 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- karafka-testing (2.3.1)
5
- karafka (>= 2.3.0, < 2.4.0)
6
- waterdrop (>= 2.6.12)
4
+ karafka-testing (2.4.0.rc1)
5
+ karafka (>= 2.4.0.beta1, < 2.5.0)
6
+ waterdrop (>= 2.7.0.rc1)
7
7
 
8
8
  GEM
9
9
  remote: https://rubygems.org/
10
10
  specs:
11
11
  ffi (1.16.3)
12
- karafka (2.3.3)
13
- karafka-core (>= 2.3.0, < 2.4.0)
14
- waterdrop (>= 2.6.12, < 3.0.0)
12
+ karafka (2.4.0.beta1)
13
+ karafka-core (>= 2.4.0.rc1, < 2.5.0)
14
+ waterdrop (>= 2.7.0.rc1, < 3.0.0)
15
15
  zeitwerk (~> 2.3)
16
- karafka-core (2.3.0)
17
- karafka-rdkafka (>= 0.14.8, < 0.15.0)
18
- karafka-rdkafka (0.14.10)
16
+ karafka-core (2.4.0.rc1)
17
+ karafka-rdkafka (>= 0.15.0.rc1, < 0.16.0)
18
+ karafka-rdkafka (0.15.0.rc1)
19
19
  ffi (~> 1.15)
20
20
  mini_portile2 (~> 2.6)
21
21
  rake (> 12)
22
22
  mini_portile2 (2.8.5)
23
- rake (13.1.0)
24
- waterdrop (2.6.14)
25
- karafka-core (>= 2.2.3, < 3.0.0)
23
+ rake (13.2.1)
24
+ waterdrop (2.7.0.rc1)
25
+ karafka-core (>= 2.4.0.rc1, < 3.0.0)
26
26
  zeitwerk (~> 2.3)
27
27
  zeitwerk (2.6.13)
28
28
 
@@ -34,4 +34,4 @@ DEPENDENCIES
34
34
  karafka-testing!
35
35
 
36
36
  BUNDLED WITH
37
- 2.5.6
37
+ 2.5.7
@@ -24,8 +24,10 @@ Gem::Specification.new do |spec|
24
24
  spec.signing_key = File.expand_path('~/.ssh/gem-private_key.pem')
25
25
  end
26
26
 
27
- spec.add_dependency 'karafka', '>= 2.3.0', '< 2.4.0'
28
- spec.add_dependency 'waterdrop', '>= 2.6.12'
27
+ spec.add_dependency 'karafka', '>= 2.4.0.beta1', '< 2.5.0'
28
+ spec.add_dependency 'waterdrop', '>= 2.7.0.rc1'
29
+
30
+ spec.required_ruby_version = '>= 3.0.0'
29
31
 
30
32
  spec.metadata = {
31
33
  'funding_uri' => 'https://karafka.io/#become-pro',
@@ -1,5 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require 'karafka/testing'
3
4
  require 'karafka/testing/errors'
4
5
  require 'karafka/testing/spec_consumer_client'
5
6
  require 'karafka/testing/spec_producer_client'
@@ -16,19 +17,27 @@ module Karafka
16
17
  # Adds all the needed extra functionalities to the minitest group
17
18
  # @param base [Class] Minitest example group we want to extend
18
19
  def included(base)
19
- base.class_eval do
20
- setup do
21
- Karafka::Testing.ensure_karafka_initialized!
20
+ eval_flow = lambda do
21
+ Karafka::Testing.ensure_karafka_initialized!
22
22
 
23
- @karafka = Karafka::Testing::Minitest::Proxy.new(self)
24
- @_karafka_consumer_messages = []
25
- @_karafka_consumer_client = Karafka::Testing::SpecConsumerClient.new
26
- @_karafka_producer_client = Karafka::Testing::SpecProducerClient.new(self)
23
+ @karafka = Karafka::Testing::Minitest::Proxy.new(self)
24
+ @_karafka_consumer_messages = []
25
+ @_karafka_consumer_client = Karafka::Testing::SpecConsumerClient.new
26
+ @_karafka_producer_client = Karafka::Testing::SpecProducerClient.new(self)
27
27
 
28
- @_karafka_consumer_messages.clear
29
- @_karafka_producer_client.reset
28
+ @_karafka_consumer_messages.clear
29
+ @_karafka_producer_client.reset
30
30
 
31
- Karafka.producer.stubs(:client).returns(@_karafka_producer_client)
31
+ Karafka.producer.stubs(:client).returns(@_karafka_producer_client)
32
+ end
33
+
34
+ if base.to_s == 'Minitest::Spec'
35
+ base.class_eval do
36
+ before(&eval_flow)
37
+ end
38
+ else
39
+ base.class_eval do
40
+ setup(&eval_flow)
32
41
  end
33
42
  end
34
43
  end
@@ -129,10 +138,10 @@ module Karafka
129
138
  # @return [Hash] message default options
130
139
  def _karafka_message_metadata_defaults
131
140
  {
132
- deserializer: @consumer.topic.deserializer,
141
+ deserializers: @consumer.topic.deserializers,
133
142
  timestamp: Time.now,
134
- headers: {},
135
- key: nil,
143
+ raw_headers: {},
144
+ raw_key: nil,
136
145
  offset: @_karafka_consumer_messages.size,
137
146
  partition: 0,
138
147
  received_at: Time.now,
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'waterdrop'
4
+ require 'karafka/testing'
4
5
  require 'karafka/testing/errors'
5
6
  require 'karafka/testing/spec_consumer_client'
6
7
  require 'karafka/testing/spec_producer_client'
@@ -146,10 +147,10 @@ module Karafka
146
147
  # @return [Hash] message default options
147
148
  def _karafka_message_metadata_defaults
148
149
  {
149
- deserializer: consumer.topic.deserializer,
150
+ deserializers: consumer.topic.deserializers,
150
151
  timestamp: Time.now,
151
- headers: {},
152
- key: nil,
152
+ raw_headers: {},
153
+ raw_key: nil,
153
154
  offset: _karafka_consumer_messages.size,
154
155
  partition: 0,
155
156
  received_at: Time.now,
@@ -4,6 +4,6 @@
4
4
  module Karafka
5
5
  module Testing
6
6
  # Current version of gem. It should match Karafka framework version
7
- VERSION = '2.3.1'
7
+ VERSION = '2.4.0.rc1'
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-testing
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.1
4
+ version: 2.4.0.rc1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Maciej Mensfeld
@@ -35,7 +35,7 @@ cert_chain:
35
35
  AnG1dJU+yL2BK7vaVytLTstJME5mepSZ46qqIJXMuWob/YPDmVaBF39TDSG9e34s
36
36
  msG3BiCqgOgHAnL23+CN3Rt8MsuRfEtoTKpJVcCfoEoNHOkc
37
37
  -----END CERTIFICATE-----
38
- date: 2024-03-07 00:00:00.000000000 Z
38
+ date: 2024-04-10 00:00:00.000000000 Z
39
39
  dependencies:
40
40
  - !ruby/object:Gem::Dependency
41
41
  name: karafka
@@ -43,34 +43,34 @@ dependencies:
43
43
  requirements:
44
44
  - - ">="
45
45
  - !ruby/object:Gem::Version
46
- version: 2.3.0
46
+ version: 2.4.0.beta1
47
47
  - - "<"
48
48
  - !ruby/object:Gem::Version
49
- version: 2.4.0
49
+ version: 2.5.0
50
50
  type: :runtime
51
51
  prerelease: false
52
52
  version_requirements: !ruby/object:Gem::Requirement
53
53
  requirements:
54
54
  - - ">="
55
55
  - !ruby/object:Gem::Version
56
- version: 2.3.0
56
+ version: 2.4.0.beta1
57
57
  - - "<"
58
58
  - !ruby/object:Gem::Version
59
- version: 2.4.0
59
+ version: 2.5.0
60
60
  - !ruby/object:Gem::Dependency
61
61
  name: waterdrop
62
62
  requirement: !ruby/object:Gem::Requirement
63
63
  requirements:
64
64
  - - ">="
65
65
  - !ruby/object:Gem::Version
66
- version: 2.6.12
66
+ version: 2.7.0.rc1
67
67
  type: :runtime
68
68
  prerelease: false
69
69
  version_requirements: !ruby/object:Gem::Requirement
70
70
  requirements:
71
71
  - - ">="
72
72
  - !ruby/object:Gem::Version
73
- version: 2.6.12
73
+ version: 2.7.0.rc1
74
74
  description: Library which provides helpers for easier Karafka consumers tests
75
75
  email:
76
76
  - contact@karafka.io
@@ -124,7 +124,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
124
124
  requirements:
125
125
  - - ">="
126
126
  - !ruby/object:Gem::Version
127
- version: '0'
127
+ version: 3.0.0
128
128
  required_rubygems_version: !ruby/object:Gem::Requirement
129
129
  requirements:
130
130
  - - ">="
metadata.gz.sig CHANGED
Binary file