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 +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/deimos/utils/schema_class.rb +3 -1
- data/lib/deimos/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7052c11e5277eb8b2844e56f13c08921d1be7e3da28db5307b2b64e17b8b918a
|
|
4
|
+
data.tar.gz: 02fee15de11ebe50518ae96c91649d9d2341613967462348b4cfcebde3f8218d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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
|
|
data/lib/deimos/version.rb
CHANGED
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.
|
|
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-
|
|
11
|
+
date: 2022-05-26 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: avro_turf
|