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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 857f587d240bbcb824b885cb5fa2c0b077351fcb12dead2d074ba23036252460
4
- data.tar.gz: fa56d9d29c29faf05ddc1b20d9de6f1aec46d9d80a330184131b5902238f3310
3
+ metadata.gz: 4fb2aa608fd561e6504dcf828cf7f79bbbec475a68f73e97a28075548036f2fd
4
+ data.tar.gz: 96e18fab23a42511ac7d9460ee770dcf07cab910fbdd88dbf26b77d7870f8024
5
5
  SHA512:
6
- metadata.gz: c584fa5f7817f4631a6f73e91f7a2ee99b153e49b9b56980317f4a61f4d87ae197037b56e204f6f71729006f5c493404510136f131fa8efcca3c1b150cc18c5a
7
- data.tar.gz: 3f995f97559e9b305eac4d0cf7ba0bbef9c6e85a399a2109385f9cab03669791e3a2915c5a3b7564b3956f2d216370dcd8150814a38001a5219994873a8d0c3a
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: find_key(encryption_metadata['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).value!
56
+ key_repository.find(identifier)
54
57
  end
55
58
  end
56
59
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EventStoreClient
4
- VERSION = '2.0.4'
4
+ VERSION = '2.0.5'
5
5
  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
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-27 00:00:00.000000000 Z
11
+ date: 2022-11-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dry-configurable