event_store_client 0.1.16 → 0.1.17
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/event_store_client/data_decryptor.rb +2 -2
- data/lib/event_store_client/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: '049769fdedefd4418bf5416d98b7fc594402bc58d252322f0d4719991b606959'
|
4
|
+
data.tar.gz: 95e079d13ebc780e7f4aa0bbfc3552afaff18a757ef0e0c7f209e83f5d8b98da
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '038d09d78ca867bcc280035aea884556346e114d89776e5e98866cbb432b1de835bae795489a5041f53f1dd4dd9c3b380432fc9b630f40897169253ff4ff8ddb'
|
7
|
+
data.tar.gz: 0d95de8176178c7f7e2826db65a04ff9778fd63c30b7e620b1abcfd026a99d0c561af6526b4e91f66e6be3d1247a98078eb2295bd7b79d55d8d13814fc0c95b9
|
@@ -5,7 +5,7 @@ module EventStoreClient
|
|
5
5
|
KeyNotFoundError = Class.new(StandardError)
|
6
6
|
|
7
7
|
def call
|
8
|
-
return
|
8
|
+
return decrypted_data if encryption_metadata.empty?
|
9
9
|
|
10
10
|
decrypt_attributes(
|
11
11
|
key: find_key(encryption_metadata[:key]),
|
@@ -23,7 +23,7 @@ module EventStoreClient
|
|
23
23
|
def initialize(data:, schema:, repository:)
|
24
24
|
@decrypted_data = deep_dup(data).transform_keys!(&:to_sym)
|
25
25
|
@key_repository = repository
|
26
|
-
@encryption_metadata = schema
|
26
|
+
@encryption_metadata = schema&.transform_keys(&:to_sym) || {}
|
27
27
|
end
|
28
28
|
|
29
29
|
def decrypt_attributes(key:, data:, attributes:)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: event_store_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.17
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sebastian Wilgosz
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-04-
|
11
|
+
date: 2020-04-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dry-schema
|