event_store_client 2.0.4 → 2.0.5
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 +5 -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: 4fb2aa608fd561e6504dcf828cf7f79bbbec475a68f73e97a28075548036f2fd
|
4
|
+
data.tar.gz: 96e18fab23a42511ac7d9460ee770dcf07cab910fbdd88dbf26b77d7870f8024
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c21debe01e60efa49f91b850e13ed594d6eca83ca0e96be2844b389f1d02c612a068d7c356565e064eade560dc44aff436fcf66308ff6159d35692bddba89797
|
7
|
+
data.tar.gz: c44edabff17c8a6d8321d3c536ffabfd7a22b935847bc0847b64e7ec97b5500d41d89624c6330f780bbaba12b5bfa7339f00934c1be4b2aab6553082c6725a3a
|
@@ -10,9 +10,11 @@ module EventStoreClient
|
|
10
10
|
|
11
11
|
def call
|
12
12
|
return encrypted_data if encryption_metadata.empty?
|
13
|
+
result = find_key(encryption_metadata['key'])
|
14
|
+
return encrypted_data unless result.success?
|
13
15
|
|
14
16
|
decrypt_attributes(
|
15
|
-
key:
|
17
|
+
key: result.value!,
|
16
18
|
data: encrypted_data,
|
17
19
|
attributes: encryption_metadata['attributes']
|
18
20
|
)
|
@@ -49,8 +51,9 @@ module EventStoreClient
|
|
49
51
|
dupl
|
50
52
|
end
|
51
53
|
|
54
|
+
# @return [Dry::Monads::Result]
|
52
55
|
def find_key(identifier)
|
53
|
-
key_repository.find(identifier)
|
56
|
+
key_repository.find(identifier)
|
54
57
|
end
|
55
58
|
end
|
56
59
|
end
|
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: 2.0.
|
4
|
+
version: 2.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sebastian Wilgosz
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-10
|
11
|
+
date: 2022-11-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dry-configurable
|