karafka-testing 2.5.4 → 2.5.6

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.
@@ -1,12 +1,12 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'waterdrop'
4
- require 'karafka/testing'
5
- require 'karafka/testing/errors'
6
- require 'karafka/testing/helpers'
7
- require 'karafka/testing/spec_consumer_client'
8
- require 'karafka/testing/spec_producer_client'
9
- require 'karafka/testing/rspec/proxy'
3
+ require "waterdrop"
4
+ require "karafka/testing"
5
+ require "karafka/testing/errors"
6
+ require "karafka/testing/helpers"
7
+ require "karafka/testing/spec_consumer_client"
8
+ require "karafka/testing/spec_producer_client"
9
+ require "karafka/testing/rspec/proxy"
10
10
 
11
11
  module Karafka
12
12
  module Testing
@@ -42,8 +42,8 @@ module Karafka
42
42
  base.before(:context) do
43
43
  Karafka::Testing.ensure_karafka_initialized!
44
44
  @_karafka_shared_producer_client = WaterDrop::Clients::Dummy.new(-1)
45
- Karafka.producer.instance_variable_set(:'@client', @_karafka_shared_producer_client)
46
- Karafka.producer.instance_variable_set(:'@pid', ::Process.pid)
45
+ Karafka.producer.instance_variable_set(:@client, @_karafka_shared_producer_client)
46
+ Karafka.producer.instance_variable_set(:@pid, ::Process.pid)
47
47
  end
48
48
 
49
49
  base.prepend_before do
@@ -55,7 +55,7 @@ module Karafka
55
55
  # that patches are available because some users have Mocha as part of their
56
56
  # supply chain, but do not use it when running Karafka specs. In such cases, without
57
57
  # such check `karafka-testing` would falsely assume, that Mocha is in use.
58
- if Object.const_defined?('Mocha', false) && Karafka.producer.respond_to?(:stubs)
58
+ if Object.const_defined?("Mocha", false) && Karafka.producer.respond_to?(:stubs)
59
59
  Karafka.producer.stubs(:client).returns(_karafka_producer_client)
60
60
  else
61
61
  allow(Karafka.producer).to receive(:client).and_return(_karafka_producer_client)
@@ -105,10 +105,12 @@ module Karafka
105
105
  # end
106
106
  def _karafka_add_message_to_consumer_if_needed(message)
107
107
  consumer_obj = if defined?(consumer)
108
- consumer
109
- else
110
- @_karafka_consumer_mappings&.dig(message[:topic])
111
- end
108
+ consumer
109
+ elsif _karafka_described_class_is_consumer?
110
+ _karafka_resolve_subject_consumer || _karafka_find_consumer_for_message(message)
111
+ else
112
+ _karafka_find_consumer_for_message(message)
113
+ end
112
114
  # Consumer needs to be defined in order to pass messages to it
113
115
  return unless consumer_obj
114
116
  # We're interested in adding message to consumer only when it is a Karafka consumer
@@ -118,6 +120,9 @@ module Karafka
118
120
  # We target to the consumer only messages that were produced to it, since specs may also
119
121
  # produce other messages targeting other topics
120
122
  return unless message[:topic] == consumer_obj.topic.name
123
+ # If consumer_group is explicitly specified, verify it matches
124
+ return if message[:consumer_group] &&
125
+ message[:consumer_group].to_s != consumer_obj.topic.consumer_group.name
121
126
 
122
127
  # Build message metadata and copy any metadata that would come from the message
123
128
  metadata = _karafka_message_metadata_defaults(consumer_obj)
@@ -153,21 +158,32 @@ module Karafka
153
158
 
154
159
  # Produces message with a given payload to the consumer matching topic
155
160
  # @param payload [String] payload we want to dispatch
156
- # @param metadata [Hash] any metadata we want to dispatch alongside the payload
161
+ # @param metadata [Hash] any metadata we want to dispatch alongside the payload.
162
+ # Supports an `offset` key to set a custom offset for the message (otherwise
163
+ # offsets auto-increment from 0).
157
164
  def _karafka_produce(payload, metadata = {})
165
+ # Extract offset before passing to WaterDrop since it is not a valid
166
+ # WaterDrop message attribute (Kafka assigns offsets, not producers)
167
+ @_karafka_next_offset = metadata.delete(:offset)
168
+
158
169
  topic = if metadata[:topic]
159
- metadata[:topic]
160
- elsif defined?(consumer)
161
- consumer.topic.name
162
- else
163
- @_karafka_consumer_mappings&.keys&.last
164
- end
170
+ metadata[:topic]
171
+ elsif defined?(consumer)
172
+ consumer.topic.name
173
+ elsif _karafka_described_class_is_consumer? && (sub = _karafka_resolve_subject_consumer)
174
+ sub.topic.name
175
+ else
176
+ last_consumer = @_karafka_consumer_mappings&.values&.last
177
+ last_consumer&.topic&.name
178
+ end
165
179
  Karafka.producer.produce_sync(
166
180
  {
167
181
  topic: topic,
168
182
  payload: payload
169
183
  }.merge(metadata)
170
184
  )
185
+ ensure
186
+ @_karafka_next_offset = nil
171
187
  end
172
188
 
173
189
  # @return [Array<Hash>] messages that were produced
@@ -175,8 +191,81 @@ module Karafka
175
191
  _karafka_producer_client.messages
176
192
  end
177
193
 
194
+ # Produces message to a specific consumer instance
195
+ # Use when testing multiple consumers for the same topic
196
+ #
197
+ # @param consumer_instance [Object] the consumer to produce to
198
+ # @param payload [String] message content (usually serialized JSON) to deliver to the
199
+ # consumer
200
+ # @param metadata [Hash] any metadata to dispatch alongside the payload
201
+ #
202
+ # @example Produce to specific consumer when multiple exist for same topic
203
+ # let(:consumer1) { karafka.consumer_for(:events, :analytics_group) }
204
+ # let(:consumer2) { karafka.consumer_for(:events, :notifications_group) }
205
+ #
206
+ # before do
207
+ # karafka.produce_to(consumer1, { 'event' => 'click' }.to_json)
208
+ # end
209
+ def _karafka_produce_to(consumer_instance, payload, metadata = {})
210
+ _karafka_produce(
211
+ payload,
212
+ metadata.merge(
213
+ topic: consumer_instance.topic.name,
214
+ consumer_group: consumer_instance.topic.consumer_group.name
215
+ )
216
+ )
217
+ end
218
+
178
219
  private
179
220
 
221
+ # Checks if the RSpec described_class is a Karafka consumer class.
222
+ # When true, the implicit RSpec subject can be used as a consumer fallback.
223
+ #
224
+ # @return [Boolean] true if described_class inherits from Karafka::BaseConsumer
225
+ def _karafka_described_class_is_consumer?
226
+ respond_to?(:described_class) &&
227
+ described_class.is_a?(Class) &&
228
+ described_class < Karafka::BaseConsumer
229
+ end
230
+
231
+ # Resolves the RSpec implicit subject as a usable Karafka consumer instance.
232
+ # Returns nil if subject is not a properly configured consumer (e.g. a default
233
+ # described_class.new without topic setup via karafka.consumer_for).
234
+ #
235
+ # @return [Karafka::BaseConsumer, nil] the subject if it is a configured consumer
236
+ def _karafka_resolve_subject_consumer
237
+ candidate = subject
238
+
239
+ return nil unless candidate.is_a?(Karafka::BaseConsumer)
240
+ # Unconfigured consumers (default subject = described_class.new) have nil
241
+ # coordinator, so topic delegation would fail. Check coordinator presence first.
242
+ return nil unless candidate.coordinator
243
+
244
+ candidate.topic&.name ? candidate : nil
245
+ end
246
+
247
+ # Finds a consumer for the given message with backward-compatible fallback
248
+ # @param message [Hash] the message being routed
249
+ # @return [Object, nil] the consumer instance or nil
250
+ def _karafka_find_consumer_for_message(message)
251
+ return nil unless @_karafka_consumer_mappings
252
+
253
+ topic_name = message[:topic]
254
+ consumer_group = message[:consumer_group]
255
+
256
+ if consumer_group
257
+ # Explicit consumer group - find by composite key pattern
258
+ @_karafka_consumer_mappings.values.find do |c|
259
+ c.topic.name == topic_name && c.topic.consumer_group.name == consumer_group.to_s
260
+ end
261
+ else
262
+ # No consumer group specified - find all consumers for this topic
263
+ matching = @_karafka_consumer_mappings.values.select { |c| c.topic.name == topic_name }
264
+ # If exactly one consumer matches, use it (backward compatible)
265
+ (matching.size == 1) ? matching.first : nil
266
+ end
267
+ end
268
+
180
269
  # @param consumer_obj [Karafka::BaseConsumer] consumer reference
181
270
  # @return [Hash] message default options
182
271
  def _karafka_message_metadata_defaults(consumer_obj)
@@ -185,7 +274,7 @@ module Karafka
185
274
  timestamp: Time.now,
186
275
  raw_headers: {},
187
276
  raw_key: nil,
188
- offset: _karafka_consumer_messages.size,
277
+ offset: @_karafka_next_offset.nil? ? _karafka_consumer_messages.size : @_karafka_next_offset,
189
278
  partition: 0,
190
279
  received_at: Time.now,
191
280
  topic: consumer_obj.topic.name
@@ -211,11 +300,11 @@ module Karafka
211
300
  consumer.coordinator = coordinators.find_or_create(topic.name, 0)
212
301
  consumer.coordinator.seek_offset = 0
213
302
  # Indicate usage as for tests no direct enqueuing happens
214
- consumer.instance_variable_set('@used', true)
303
+ consumer.instance_variable_set(:@used, true)
215
304
  expansions = processing_cfg.expansions_selector.find(topic)
216
305
  expansions.each { |expansion| consumer.singleton_class.include(expansion) }
217
306
 
218
- @_karafka_consumer_mappings[topic.name] = consumer
307
+ @_karafka_consumer_mappings[topic.id] = consumer
219
308
  consumer
220
309
  end
221
310
  end
@@ -11,14 +11,19 @@ module Karafka
11
11
  @rspec_example = rspec_example
12
12
  end
13
13
 
14
- # @param args Anything that the `#_karafka_consumer_for` accepts
15
- def consumer_for(*args)
16
- @rspec_example._karafka_consumer_for(*args)
14
+ # Forwards all arguments to `#_karafka_consumer_for`
15
+ def consumer_for(*)
16
+ @rspec_example._karafka_consumer_for(*)
17
17
  end
18
18
 
19
- # @param args Anything that `#_karafka_produce` accepts
20
- def produce(*args)
21
- @rspec_example._karafka_produce(*args)
19
+ # Forwards all arguments to `#_karafka_produce`
20
+ def produce(*)
21
+ @rspec_example._karafka_produce(*)
22
+ end
23
+
24
+ # Forwards all arguments to `#_karafka_produce_to`
25
+ def produce_to(*)
26
+ @rspec_example._karafka_produce_to(*)
22
27
  end
23
28
 
24
29
  # @return [Array<Hash>] messages produced via `Karafka#producer`
@@ -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.5.4'
7
+ VERSION = "2.5.6"
8
8
  end
9
9
  end
@@ -10,11 +10,11 @@ module Karafka
10
10
  # You should never use karafka-testing primitives when framework is not loaded because
11
11
  # testing lib stubs certain pieces of Karafka that need to be initialized.
12
12
  def ensure_karafka_loaded!
13
- return if ::Karafka.const_defined?('App', false)
13
+ return if ::Karafka.const_defined?("App", false)
14
14
 
15
15
  raise(
16
16
  Karafka::Testing::Errors::KarafkaNotLoadedError,
17
- 'Make sure to load Karafka framework prior to usage of the testing components.'
17
+ "Make sure to load Karafka framework prior to usage of the testing components."
18
18
  )
19
19
  end
20
20
 
@@ -27,7 +27,7 @@ module Karafka
27
27
 
28
28
  raise(
29
29
  Karafka::Testing::Errors::KarafkaNotInitializedError,
30
- 'Make sure to initialize Karafka framework prior to usage of the testing components.'
30
+ "Make sure to initialize Karafka framework prior to usage of the testing components."
31
31
  )
32
32
  end
33
33
  end
@@ -1,3 +1,3 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'karafka/testing'
3
+ require "karafka/testing"
data/package-lock.json ADDED
@@ -0,0 +1,331 @@
1
+ {
2
+ "name": "karafka-testing",
3
+ "version": "1.0.0",
4
+ "lockfileVersion": 3,
5
+ "requires": true,
6
+ "packages": {
7
+ "": {
8
+ "name": "karafka-testing",
9
+ "version": "1.0.0",
10
+ "devDependencies": {
11
+ "lostconf": "0.4.0"
12
+ }
13
+ },
14
+ "node_modules/@nodelib/fs.scandir": {
15
+ "version": "2.1.5",
16
+ "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz",
17
+ "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==",
18
+ "dev": true,
19
+ "license": "MIT",
20
+ "dependencies": {
21
+ "@nodelib/fs.stat": "2.0.5",
22
+ "run-parallel": "^1.1.9"
23
+ },
24
+ "engines": {
25
+ "node": ">= 8"
26
+ }
27
+ },
28
+ "node_modules/@nodelib/fs.stat": {
29
+ "version": "2.0.5",
30
+ "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz",
31
+ "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==",
32
+ "dev": true,
33
+ "license": "MIT",
34
+ "engines": {
35
+ "node": ">= 8"
36
+ }
37
+ },
38
+ "node_modules/@nodelib/fs.walk": {
39
+ "version": "1.2.8",
40
+ "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz",
41
+ "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==",
42
+ "dev": true,
43
+ "license": "MIT",
44
+ "dependencies": {
45
+ "@nodelib/fs.scandir": "2.1.5",
46
+ "fastq": "^1.6.0"
47
+ },
48
+ "engines": {
49
+ "node": ">= 8"
50
+ }
51
+ },
52
+ "node_modules/braces": {
53
+ "version": "3.0.3",
54
+ "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz",
55
+ "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==",
56
+ "dev": true,
57
+ "license": "MIT",
58
+ "dependencies": {
59
+ "fill-range": "^7.1.1"
60
+ },
61
+ "engines": {
62
+ "node": ">=8"
63
+ }
64
+ },
65
+ "node_modules/chalk": {
66
+ "version": "5.6.2",
67
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.6.2.tgz",
68
+ "integrity": "sha512-7NzBL0rN6fMUW+f7A6Io4h40qQlG+xGmtMxfbnH/K7TAtt8JQWVQK+6g0UXKMeVJoyV5EkkNsErQ8pVD3bLHbA==",
69
+ "dev": true,
70
+ "license": "MIT",
71
+ "engines": {
72
+ "node": "^12.17.0 || ^14.13 || >=16.0.0"
73
+ },
74
+ "funding": {
75
+ "url": "https://github.com/chalk/chalk?sponsor=1"
76
+ }
77
+ },
78
+ "node_modules/commander": {
79
+ "version": "12.1.0",
80
+ "resolved": "https://registry.npmjs.org/commander/-/commander-12.1.0.tgz",
81
+ "integrity": "sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA==",
82
+ "dev": true,
83
+ "license": "MIT",
84
+ "engines": {
85
+ "node": ">=18"
86
+ }
87
+ },
88
+ "node_modules/fast-glob": {
89
+ "version": "3.3.3",
90
+ "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz",
91
+ "integrity": "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==",
92
+ "dev": true,
93
+ "license": "MIT",
94
+ "dependencies": {
95
+ "@nodelib/fs.stat": "^2.0.2",
96
+ "@nodelib/fs.walk": "^1.2.3",
97
+ "glob-parent": "^5.1.2",
98
+ "merge2": "^1.3.0",
99
+ "micromatch": "^4.0.8"
100
+ },
101
+ "engines": {
102
+ "node": ">=8.6.0"
103
+ }
104
+ },
105
+ "node_modules/fastq": {
106
+ "version": "1.20.1",
107
+ "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.20.1.tgz",
108
+ "integrity": "sha512-GGToxJ/w1x32s/D2EKND7kTil4n8OVk/9mycTc4VDza13lOvpUZTGX3mFSCtV9ksdGBVzvsyAVLM6mHFThxXxw==",
109
+ "dev": true,
110
+ "license": "ISC",
111
+ "dependencies": {
112
+ "reusify": "^1.0.4"
113
+ }
114
+ },
115
+ "node_modules/fill-range": {
116
+ "version": "7.1.1",
117
+ "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz",
118
+ "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==",
119
+ "dev": true,
120
+ "license": "MIT",
121
+ "dependencies": {
122
+ "to-regex-range": "^5.0.1"
123
+ },
124
+ "engines": {
125
+ "node": ">=8"
126
+ }
127
+ },
128
+ "node_modules/glob-parent": {
129
+ "version": "5.1.2",
130
+ "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz",
131
+ "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==",
132
+ "dev": true,
133
+ "license": "ISC",
134
+ "dependencies": {
135
+ "is-glob": "^4.0.1"
136
+ },
137
+ "engines": {
138
+ "node": ">= 6"
139
+ }
140
+ },
141
+ "node_modules/is-extglob": {
142
+ "version": "2.1.1",
143
+ "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
144
+ "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==",
145
+ "dev": true,
146
+ "license": "MIT",
147
+ "engines": {
148
+ "node": ">=0.10.0"
149
+ }
150
+ },
151
+ "node_modules/is-glob": {
152
+ "version": "4.0.3",
153
+ "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz",
154
+ "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==",
155
+ "dev": true,
156
+ "license": "MIT",
157
+ "dependencies": {
158
+ "is-extglob": "^2.1.1"
159
+ },
160
+ "engines": {
161
+ "node": ">=0.10.0"
162
+ }
163
+ },
164
+ "node_modules/is-number": {
165
+ "version": "7.0.0",
166
+ "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",
167
+ "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==",
168
+ "dev": true,
169
+ "license": "MIT",
170
+ "engines": {
171
+ "node": ">=0.12.0"
172
+ }
173
+ },
174
+ "node_modules/lostconf": {
175
+ "version": "0.4.0",
176
+ "resolved": "https://registry.npmjs.org/lostconf/-/lostconf-0.4.0.tgz",
177
+ "integrity": "sha512-VNbUnirRU7uESqMHslIRHTcuyx/rr4OZK+L7EQXtYUe5PorBgqBYvPu+6xOr0CoUy4n34NNUKO6BBH6TgwwGTA==",
178
+ "dev": true,
179
+ "license": "MIT",
180
+ "dependencies": {
181
+ "chalk": "^5.3.0",
182
+ "commander": "^12.1.0",
183
+ "fast-glob": "^3.3.2",
184
+ "micromatch": "^4.0.8",
185
+ "smol-toml": "^1.3.0",
186
+ "yaml": "^2.5.0"
187
+ },
188
+ "bin": {
189
+ "lostconf": "dist/cli.js"
190
+ },
191
+ "engines": {
192
+ "node": ">=18.0.0"
193
+ }
194
+ },
195
+ "node_modules/merge2": {
196
+ "version": "1.4.1",
197
+ "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz",
198
+ "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==",
199
+ "dev": true,
200
+ "license": "MIT",
201
+ "engines": {
202
+ "node": ">= 8"
203
+ }
204
+ },
205
+ "node_modules/micromatch": {
206
+ "version": "4.0.8",
207
+ "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz",
208
+ "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==",
209
+ "dev": true,
210
+ "license": "MIT",
211
+ "dependencies": {
212
+ "braces": "^3.0.3",
213
+ "picomatch": "^2.3.1"
214
+ },
215
+ "engines": {
216
+ "node": ">=8.6"
217
+ }
218
+ },
219
+ "node_modules/picomatch": {
220
+ "version": "2.3.2",
221
+ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.2.tgz",
222
+ "integrity": "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==",
223
+ "dev": true,
224
+ "license": "MIT",
225
+ "engines": {
226
+ "node": ">=8.6"
227
+ },
228
+ "funding": {
229
+ "url": "https://github.com/sponsors/jonschlinkert"
230
+ }
231
+ },
232
+ "node_modules/queue-microtask": {
233
+ "version": "1.2.3",
234
+ "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz",
235
+ "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==",
236
+ "dev": true,
237
+ "funding": [
238
+ {
239
+ "type": "github",
240
+ "url": "https://github.com/sponsors/feross"
241
+ },
242
+ {
243
+ "type": "patreon",
244
+ "url": "https://www.patreon.com/feross"
245
+ },
246
+ {
247
+ "type": "consulting",
248
+ "url": "https://feross.org/support"
249
+ }
250
+ ],
251
+ "license": "MIT"
252
+ },
253
+ "node_modules/reusify": {
254
+ "version": "1.1.0",
255
+ "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.1.0.tgz",
256
+ "integrity": "sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==",
257
+ "dev": true,
258
+ "license": "MIT",
259
+ "engines": {
260
+ "iojs": ">=1.0.0",
261
+ "node": ">=0.10.0"
262
+ }
263
+ },
264
+ "node_modules/run-parallel": {
265
+ "version": "1.2.0",
266
+ "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz",
267
+ "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==",
268
+ "dev": true,
269
+ "funding": [
270
+ {
271
+ "type": "github",
272
+ "url": "https://github.com/sponsors/feross"
273
+ },
274
+ {
275
+ "type": "patreon",
276
+ "url": "https://www.patreon.com/feross"
277
+ },
278
+ {
279
+ "type": "consulting",
280
+ "url": "https://feross.org/support"
281
+ }
282
+ ],
283
+ "license": "MIT",
284
+ "dependencies": {
285
+ "queue-microtask": "^1.2.2"
286
+ }
287
+ },
288
+ "node_modules/smol-toml": {
289
+ "version": "1.6.0",
290
+ "resolved": "https://registry.npmjs.org/smol-toml/-/smol-toml-1.6.0.tgz",
291
+ "integrity": "sha512-4zemZi0HvTnYwLfrpk/CF9LOd9Lt87kAt50GnqhMpyF9U3poDAP2+iukq2bZsO/ufegbYehBkqINbsWxj4l4cw==",
292
+ "dev": true,
293
+ "license": "BSD-3-Clause",
294
+ "engines": {
295
+ "node": ">= 18"
296
+ },
297
+ "funding": {
298
+ "url": "https://github.com/sponsors/cyyynthia"
299
+ }
300
+ },
301
+ "node_modules/to-regex-range": {
302
+ "version": "5.0.1",
303
+ "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
304
+ "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",
305
+ "dev": true,
306
+ "license": "MIT",
307
+ "dependencies": {
308
+ "is-number": "^7.0.0"
309
+ },
310
+ "engines": {
311
+ "node": ">=8.0"
312
+ }
313
+ },
314
+ "node_modules/yaml": {
315
+ "version": "2.8.2",
316
+ "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.8.2.tgz",
317
+ "integrity": "sha512-mplynKqc1C2hTVYxd0PU2xQAc22TI1vShAYGksCCfxbn/dFwnHTNi1bvYsBTkhdUNtGIf5xNOg938rrSSYvS9A==",
318
+ "dev": true,
319
+ "license": "ISC",
320
+ "bin": {
321
+ "yaml": "bin.mjs"
322
+ },
323
+ "engines": {
324
+ "node": ">= 14.6"
325
+ },
326
+ "funding": {
327
+ "url": "https://github.com/sponsors/eemeli"
328
+ }
329
+ }
330
+ }
331
+ }
data/package.json ADDED
@@ -0,0 +1,9 @@
1
+ {
2
+ "name": "karafka-testing",
3
+ "version": "1.0.0",
4
+ "description": "CI dependencies for karafka-testing",
5
+ "private": true,
6
+ "devDependencies": {
7
+ "lostconf": "0.4.0"
8
+ }
9
+ }
data/renovate.json CHANGED
@@ -3,16 +3,29 @@
3
3
  "extends": [
4
4
  "config:recommended"
5
5
  ],
6
+ "minimumReleaseAge": "7 days",
7
+ "includePaths": [
8
+ ".ruby-version",
9
+ "Gemfile",
10
+ "Gemfile.lint",
11
+ "package.json",
12
+ ".github/workflows/**"
13
+ ],
6
14
  "github-actions": {
7
15
  "enabled": true,
8
16
  "pinDigests": true
9
17
  },
10
18
  "packageRules": [
11
19
  {
12
- "matchManagers": [
13
- "github-actions"
20
+ "description": "Group ruby/setup-ruby action with ruby version updates",
21
+ "matchPackageNames": [
22
+ "ruby/setup-ruby",
23
+ "ruby"
14
24
  ],
15
- "minimumReleaseAge": "7 days"
25
+ "groupName": "ruby setup"
16
26
  }
27
+ ],
28
+ "labels": [
29
+ "dependencies"
17
30
  ]
18
31
  }