deimos-ruby 2.4.0.pre.beta21 → 2.4.0

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: f8ba2f3149ce2a7c10a5af09c4d7c07f25e33c8bac9f9783953e10bbbca5e74d
4
+ data.tar.gz: 3a5a112a7886b3acdf0b1aa0f18f984fbe93aa9e83f6912a667aa1eb113bbc5d
5
5
  SHA512:
6
- metadata.gz: 75742a7355d1e16f3fb0a7f56d1b9a5bf72001d811e7ca6fafa605a7dba611751e88acab8c1554b03dcefe672385403aa82629f52803d1c355d94e93dde6f6a4
7
- data.tar.gz: 9b7d1deb519787f35d44fa5f0a2ea05c430076ffd419afd365281e4b71a4850795a6236827865d611de79fc2a91b78c275439d104c1bb7540746dd74e4662aa7
6
+ metadata.gz: e5796d8f41a4a6f86be7659d7dde670bc30651a32124fd2434ff90263fa418bb56478ef25e620e0b59a5e55d88c21d01e6ce77444b8b34aba523d924be452807
7
+ data.tar.gz: 107c63551a2606108e02dc0414d6ade8466b53dc89f6a54af12e02a1eff76386c8f864aca7746c27c2ff1a8bfad279b40d8efeff01938f5f5b4ee55b737f30d3
data/CHANGELOG.md CHANGED
@@ -5,12 +5,16 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
- ## UNRELEASED
8
+ ## 2.4.0 - 2026-03-02
9
9
 
10
10
  - Major change: Switch from using `avro_turf` and `proto_turf` to use `schema_registry_client`, which handles both Avro and Protobuf.
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'
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
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Orner