deimos-ruby 2.0.0.pre.alpha7 → 2.0.0.pre.beta1

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: '0940b779309de8eadfc2fe3b5a495690a83f90598045ce790d9bb50d82954909'
4
- data.tar.gz: ae6d40e15e06cb17070ce92421d1546f9d97bd4c4cddb909925d282db49be32c
3
+ metadata.gz: f5a771b9dee159bd0827bd8d3068cec505e8494e9b57a4e9c3038d0d48309dfc
4
+ data.tar.gz: 82cb497cc46f8cd3812399a36fd3520b7d7716c1f389d6474dac76326b5761be
5
5
  SHA512:
6
- metadata.gz: 60a19bd65c424f05e8061f8a0fb2e7a1648f6d7f8202cbbd4e40397e5d75cae5d4935d313133ebee6b0641f3505d4161681d7f4534bb0f665e06eca9f28f6d34
7
- data.tar.gz: 13974c3ee935306e72220149a943a5fef0554b332c5c7b81f348df584b7cba0756f9c9d4569856edc72e054981eebdb95789e605fbeddcca72a0b79b207bcae1
6
+ metadata.gz: 3a2ddfdae480ed35c08815d65d708e468e201c7421f9edca36c5df8c725c69821d4a2978c80544028539926fc24e52045a2eda67cafb19458798dadf91cb9c71
7
+ data.tar.gz: f8cbd6e123c31a69198fd4c20d2adbda9527258fa35048e15660604cf4aaecd607adfb639ad91d3d6e5b19784555e4096bbd388d2dad33b349b1f9ca4d79af2e
@@ -10,7 +10,7 @@ module Deimos
10
10
  message: message
11
11
  ) do
12
12
  config = Deimos.karafka_config_for(topic: message[:topic])
13
- return message if config.nil?
13
+ return message if config.nil? || config.schema.nil?
14
14
  return if message[:payload] && !message[:payload].is_a?(Hash) && !message[:payload].is_a?(SchemaClass::Record)
15
15
 
16
16
  m = Deimos::Message.new(message[:payload].to_h,
@@ -14,7 +14,7 @@ class Matcher
14
14
  def replay_on(topic_node)
15
15
  @applications.each do |method, kwargs|
16
16
  if method == :kafka
17
- topic_node.kafka = kwargs
17
+ topic_node.kafka = kwargs.is_a?(Array) ? kwargs[0] : kwargs
18
18
  next
19
19
  end
20
20
  if kwargs.is_a?(Hash)
@@ -42,7 +42,12 @@ module Deimos
42
42
  case payload_log
43
43
  when :keys
44
44
  keys = messages.map do |m|
45
- m.respond_to?(:payload) ? m.key || m.payload['message_id'] : m[:key] || m[:payload_key] || m[:payload]['message_id']
45
+ if m.respond_to?(:payload)
46
+ m.key || m.payload['message_id']
47
+ elsif m
48
+ payload = m[:payload]&.with_indifferent_access
49
+ m[:key] || m[:payload_key] || payload[:payload_key] || payload[:message_id]
50
+ end
46
51
  end
47
52
  log_message.merge!(
48
53
  payload_keys: keys
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Deimos
4
- VERSION = '2.0.0-alpha7'
4
+ VERSION = '2.0.0-beta1'
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.alpha7
4
+ version: 2.0.0.pre.beta1
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-11 00:00:00.000000000 Z
11
+ date: 2024-12-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: avro_turf