deimos-ruby 1.14.1 → 1.14.2

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: 1d94fcbeb955de22fde06b29f63809cae7305d91f029ba8ec0b36e4dbbe037a2
4
- data.tar.gz: 611e5cc68a5d9e661ff692f05692d7ba24e4804f5761479802a632cbdd2a0fd7
3
+ metadata.gz: 7052c11e5277eb8b2844e56f13c08921d1be7e3da28db5307b2b64e17b8b918a
4
+ data.tar.gz: 02fee15de11ebe50518ae96c91649d9d2341613967462348b4cfcebde3f8218d
5
5
  SHA512:
6
- metadata.gz: 5100b19ede901f0b7a4e20f0aa6c15d487e9355d95ea46d984c8fcb587039be4be9529991197148e630ad3670c65d79ab0653ff57c28e224236a4d966bebe7e1
7
- data.tar.gz: '082ad2e7be4d85fa3e8e242cdc7f192a35f99424675f5bddc3e11a3c19477ce5abf0df629117ca4f714ca107ea5be0a93a8aa5041a1f67cc628517f451005bb1'
6
+ metadata.gz: 2f9f38797fbd74e5958f3910d4886144ca4ae329cbadaa5cb6474acdb4eeefdfd6edac59d79f3a1081df4fd24ae5766329b0d00649b613c13c44204a85e3b6b7
7
+ data.tar.gz: c5dd68694b23e7cdb10a2a2b6fe1163fe6f84f4c3b9de64eaea61c6b50f3ffc08642d72764e5550cf19f56bb14da7913611f45f6cd48a132e4707d5b6a201816
data/CHANGELOG.md CHANGED
@@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## UNRELEASED
9
9
 
10
+ # 1.14.2 - 2022-05-26
11
+
12
+ - Fix crash with `test_consume_message` when passing in an instance of a schema class instead of a hash.
13
+
10
14
  # 1.14.1 - 2022-05-25
11
15
 
12
16
  - Fix: When using key schemas, ActiveRecordConsumers were not finding the record by default.
@@ -6,10 +6,12 @@ module Deimos
6
6
  module SchemaClass
7
7
  class << self
8
8
  # Converts a raw payload into an instance of the Schema Class
9
- # @param payload [Hash]
9
+ # @param payload [Hash, Deimos::SchemaClass::Base]
10
10
  # @param schema [String]
11
11
  # @return [Deimos::SchemaClass::Record]
12
12
  def instance(payload, schema)
13
+ return payload if payload.is_a?(Deimos::SchemaClass::Base)
14
+
13
15
  klass = "Schemas::#{schema.underscore.camelize}".safe_constantize
14
16
  return payload if klass.nil? || payload.nil?
15
17
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Deimos
4
- VERSION = '1.14.1'
4
+ VERSION = '1.14.2'
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: 1.14.1
4
+ version: 1.14.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Orner
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-05-25 00:00:00.000000000 Z
11
+ date: 2022-05-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: avro_turf