deimos-ruby 2.4.0.pre.beta21 → 2.4.0.pre.beta22

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: 3538f51176c96ccc7e35373041819503e8cea97e4b2d11a1100ecca1858c47a5
4
- data.tar.gz: 0525e111044161dc58060070f8af1eaf62063c5a65357cf4048aef127c622dfc
3
+ metadata.gz: 28d698725082e6ddf9ae69668e2a30086c91b2f3684826127d8af32806a7d903
4
+ data.tar.gz: 63aa48456f8f9c5b6588e616eb382bae34975c43cb122b69b8845f1667c87083
5
5
  SHA512:
6
- metadata.gz: 75742a7355d1e16f3fb0a7f56d1b9a5bf72001d811e7ca6fafa605a7dba611751e88acab8c1554b03dcefe672385403aa82629f52803d1c355d94e93dde6f6a4
7
- data.tar.gz: 9b7d1deb519787f35d44fa5f0a2ea05c430076ffd419afd365281e4b71a4850795a6236827865d611de79fc2a91b78c275439d104c1bb7540746dd74e4662aa7
6
+ metadata.gz: e85bc10c0a70a1b254dc4df26d35f10a798575c980339416038fd1c1b4d6670faade53da1176d581c7627614bac2706485f25f984625d5c65c094d7731953851
7
+ data.tar.gz: 5fe362c6e616060fec466e00859dc36107bcff1ac94e4939b86209ff9a7d7df8f662e615755a7a41db7558cefaf5c4ff8e1162a21bf84673e7e5fa613c2a9cb3
data/CHANGELOG.md CHANGED
@@ -11,6 +11,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
11
11
  - Add `registry_url`, `registry_user` and `registry_password` per-topic configuration.
12
12
  - Added `have_sent_including` RSpec matcher to allow for Protobuf messages that use default values to be checked.
13
13
 
14
+ # 2.3.5 - 2026-02-23
15
+
16
+ - Fix: Non-batch consumers should now support string table names.
17
+
14
18
  # 2.3.4 - 2026-02-21
15
19
 
16
20
  - Fix/feature: Send `consumer.lags` and `consumer.lags_delta` metrics via MinimalDatadogListener.
@@ -42,6 +42,7 @@ module Deimos
42
42
  end
43
43
 
44
44
  klass = self.class.config[:record_class]
45
+ klass = klass.constantize if klass.is_a?(String)
45
46
  payload = message.payload
46
47
  if payload.is_a?(Hash) || payload.nil?
47
48
  payload = payload.to_h.with_indifferent_access
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Deimos
4
- VERSION = '2.4.0-beta21'
4
+ VERSION = '2.4.0-beta22'
5
5
  end
@@ -255,6 +255,29 @@ module ActiveRecordConsumerTest
255
255
  expect(Widget.find_by_test_id('id2').some_int).to eq(4)
256
256
  end
257
257
 
258
+ it 'should handle record_class as a string' do
259
+ consumer_class = Class.new(Deimos::ActiveRecordConsumer) do
260
+ record_class 'ActiveRecordConsumerTest::Widget'
261
+ end
262
+ stub_const('MyStringRecordClassConsumer', consumer_class)
263
+ Karafka::App.routes.redraw do
264
+ topic 'my-topic-string' do
265
+ consumer MyStringRecordClassConsumer
266
+ schema 'MySchema'
267
+ namespace 'com.my-namespace'
268
+ key_config plain: true
269
+ end
270
+ end
271
+
272
+ expect(Widget.count).to eq(0)
273
+ test_consume_message(MyStringRecordClassConsumer, {
274
+ test_id: 'abc',
275
+ some_int: 3
276
+ }, call_original: true, key: 5)
277
+ expect(Widget.count).to eq(1)
278
+ expect(Widget.last.test_id).to eq('abc')
279
+ end
280
+
258
281
  it 'should not create record of process_message returns false' do
259
282
  allow_any_instance_of(MyConsumer).to receive(:process_message?).and_return(false)
260
283
  expect(Widget.count).to eq(0)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: deimos-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.4.0.pre.beta21
4
+ version: 2.4.0.pre.beta22
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Orner