deimos-ruby 2.0.0.pre.beta2 → 2.0.0.pre.beta4

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: 42ac705b5012248d24a0355f4fbb8ad3e66ed57b3ee08329aea148b57fe65a27
4
- data.tar.gz: d5e22a7400ed5471815ea8b14a86fe3253ea870c024c4c7ecfcacc5f80042085
3
+ metadata.gz: 5e88120ba741d308d17036ecefa3da7951dc66e38da1bed0f48860bcfa4d8e7c
4
+ data.tar.gz: 2b329bd8ec03e6fb59685653839b0f6cb8c04772336963ce1e55dfa4ec0f8124
5
5
  SHA512:
6
- metadata.gz: 0c6f493835cff025892932d7b8d6f0f2ad61f2d26eda7523fe2df217916187512cec3c3e5e21c08eaeaedfc2ede260acee03e0341ee844e13f28974a79de9913
7
- data.tar.gz: d74bad2d818f09bc81577c06eef13071bbe52d0f3bddec7b8067fa5e360200db96af50d4d1e7f477390d2dca4ba66ae9101ce281f312d6c6acdfedbd5b8efa0d
6
+ metadata.gz: 2347866bb7c43a6a58684d9a9cb5e5d4642546b799d25e21016bf0f413dc4977676e03e47ccbf5fbd9ba1de3a12f1a9e7a93ec699b3e998ba65d02028531e1c9
7
+ data.tar.gz: 4887e2a6cc9dd33f8b11ab89c45c1d9b6fe8406fcd80deeda8fff74a10be9d9a870212fe068937f4b22cdcef867fd082bf5eca21740288a9b6c66d483290a373
data/CHANGELOG.md CHANGED
@@ -6,7 +6,9 @@ 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
8
  ## UNRELEASED
9
- - Feature: Added `max_batch_size` config to producer to allow custom batch size for publishing.
9
+
10
+ ## 2.0.0 - TBA
11
+ - Full rewrite of Deimos to work with Karafka. Please see [Upgrading](./docs/UPGRADING.md) for full information.
10
12
 
11
13
  # 1.24.3 - 2024-05-13
12
14
  - Feature: Enable `producers.persistent_connections` phobos setting
@@ -36,6 +36,8 @@ module Deimos
36
36
  # @param force_send [Boolean]
37
37
  # @return [void]
38
38
  def send_events(records, force_send: false)
39
+ return if Deimos.producers_disabled?(self)
40
+
39
41
  primary_key = @record_class&.primary_key
40
42
  messages = records.map do |record|
41
43
  if record.respond_to?(:attributes)
@@ -45,8 +45,12 @@ module Deimos
45
45
  if m.respond_to?(:payload)
46
46
  m.key || m.payload['message_id']
47
47
  elsif m
48
- payload = m[:payload]&.with_indifferent_access
49
- m[:key] || m[:payload_key] || payload[:payload_key] || payload[:message_id]
48
+ if m[:payload].is_a?(String)
49
+ m[:key] || m[:payload_key]
50
+ else
51
+ payload = m[:payload]&.with_indifferent_access
52
+ m[:key] || m[:payload_key] || payload[:payload_key] || payload[:message_id]
53
+ end
50
54
  end
51
55
  end
52
56
  log_message.merge!(
@@ -126,7 +126,7 @@ module Deimos
126
126
  end
127
127
 
128
128
  def topic
129
- karafka_config.name
129
+ karafka_config&.name
130
130
  end
131
131
 
132
132
  # @param sync [Boolean]
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Deimos
4
- VERSION = '2.0.0-beta2'
4
+ VERSION = '2.0.0-beta4'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: deimos-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0.pre.beta2
4
+ version: 2.0.0.pre.beta4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Orner
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-12-13 00:00:00.000000000 Z
11
+ date: 2025-02-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: avro_turf