event_store_client 0.1.20 → 0.1.21
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e63a5d88b91862505ce054c8fc0f4f1de5d278eed17a5801d6c82802b5726beb
|
4
|
+
data.tar.gz: 84d01e2aa79b63f629896141d0943a4b7e3417fe819d0c79cd79f2b2b3efe659
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b712980458d8f5d48b74917a27dbe33a45e3fc720849985fc10265ef1b4395e64ed750bfe33f8f963d8a5169080c7d4c3e9fae8acba13839f5b3cf3a59153ffa
|
7
|
+
data.tar.gz: 77cf61b14fe014e4acd42a296f505985f11ab9d44f431e031e9442c793e47e103f43b8563e6f5ceb815e97112d10782174ae1c6edb5ce2172f9193c14a12b86a
|
@@ -22,18 +22,18 @@ module EventStoreClient
|
|
22
22
|
attr_reader :key_repository
|
23
23
|
|
24
24
|
def initialize(data:, schema:, repository:)
|
25
|
-
@encrypted_data = deep_dup(data).transform_keys!(&:
|
25
|
+
@encrypted_data = deep_dup(data).transform_keys!(&:to_s)
|
26
26
|
@key_repository = repository
|
27
27
|
@encryption_metadata = EncryptionMetadata.new(data: data, schema: schema).call
|
28
28
|
end
|
29
29
|
|
30
30
|
def encrypt_attributes(key:, data:, attributes:)
|
31
|
-
text = JSON.generate(data.select { |hash_key, _value| attributes.include?(hash_key) })
|
31
|
+
text = JSON.generate(data.select { |hash_key, _value| attributes.include?(hash_key.to_s) })
|
32
32
|
encrypted = key_repository.encrypt(
|
33
33
|
key_id: key.id, text: text, cipher: key.cipher, iv: key.iv
|
34
34
|
)
|
35
|
-
attributes.each { |att| data[att] = 'es_encrypted' if data.key?(att) }
|
36
|
-
data[
|
35
|
+
attributes.each { |att| data[att.to_s] = 'es_encrypted' if data.key?(att.to_s) }
|
36
|
+
data['es_encrypted'] = encrypted
|
37
37
|
data
|
38
38
|
end
|
39
39
|
|
@@ -84,7 +84,7 @@ module EventStoreClient
|
|
84
84
|
headers = long_poll.positive? ? { 'ES-LongPoll' => long_poll.to_s } : {}
|
85
85
|
headers['Content-Type'] = 'application/vnd.eventstore.competingatom+json'
|
86
86
|
headers['Accept'] = 'application/vnd.eventstore.competingatom+json'
|
87
|
-
headers['ES-
|
87
|
+
headers['ES-ResolveLinktos'] = resolve_links.to_s
|
88
88
|
|
89
89
|
make_request(
|
90
90
|
:get,
|
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.21
|
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-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dry-schema
|