deimos-ruby 2.4.0.pre.beta3 → 2.4.0.pre.beta5

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: 007d1a747d8415fc8b369b6721ead5346e5a6556d396d538c25c0fdfd0a1c5bb
4
- data.tar.gz: 504b7550a329adc8915a4de9b310148d82bc16ac1dc0631c5e21dba7802b88b2
3
+ metadata.gz: f82fd1a982e9b2c8eac9c3419cebb1f3c7f269f8beb84241a301f94104547c6e
4
+ data.tar.gz: 29a41f818215c0fd4590ab312f6e721a758298e7ac8a59285967b8233c513419
5
5
  SHA512:
6
- metadata.gz: 1567b424f4f7a71220ff5f3c53d9f681ee822a737b8893390719d1969e37cfedd974da61f0afbbf0d0449ddb35fdcfed9a2e2f6c7bb2e94220bb900ea321b98e
7
- data.tar.gz: 0db626c956a074b8084843ec44e8763d6f6a6dce8efe93c7a71b24fd2179e2f34688fb28e8ebb37f34da87b74802dd2a38d9b7d1cc77d467a91f28651dfca760
6
+ metadata.gz: 553babfb56ebf8f02148930eba1932f841ca0e92326d886c322b9b924e8c90b4e2f605d4cf3bfd3addc3db4b20985f38d49c67ac849d2fd365b0cf5368149920
7
+ data.tar.gz: 7484a58ba468aa765b04174831fe2ade4e8702d5af7b918ccdfb71588f6b8f9f7054b791edc67e04bb4012149145e613e496d138d2222f9dec2089507af59328
@@ -48,7 +48,7 @@ module Deimos
48
48
 
49
49
  if @payload.respond_to?(:timestamp)
50
50
  if fields.include?('timestamp') && @payload.timestamp.blank?
51
- @payload.timestamp = Time.now.in_time_zone.to_s
51
+ @payload.timestamp = Time.now
52
52
  end
53
53
  elsif fields.include?('timestamp')
54
54
  @payload['timestamp'] ||= Time.now.in_time_zone.to_s
@@ -119,10 +119,10 @@ module Deimos
119
119
  topic: topic,
120
120
  partition_key: self.partition_key(p)
121
121
  }
122
- if m.dig(:payload, :key).present? && m.dig(:payload, :message).present?
123
- m[:key] = m[:payload][:key]
122
+ if payload.is_a?(Hash) && payload.key?(:key) && payload.key?(:message)
123
+ m[:key] = payload[:key]
124
124
  m[:key] = m[:key].to_h if m[:key].nil? || m[:key].is_a?(SchemaClass::Record)
125
- m[:payload] = m[:payload][:message]
125
+ m[:payload] = payload[:message]
126
126
  m[:payload] = m[:payload].to_h if m[:payload].nil? ||
127
127
  m[:payload].is_a?(SchemaClass::Record)
128
128
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Deimos
4
- VERSION = '2.4.0-beta3'
4
+ VERSION = '2.4.0-beta5'
5
5
  end
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.beta3
4
+ version: 2.4.0.pre.beta5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Orner