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: 9a1523984d9601529ea9e8d6f846cdc63b080f8882e403ef8253da2c260e56da
4
- data.tar.gz: a4822ae5ba6b0b7f5e702d5731c7308941d7508549dd77bb57f1fbf67eec49ec
3
+ metadata.gz: e63a5d88b91862505ce054c8fc0f4f1de5d278eed17a5801d6c82802b5726beb
4
+ data.tar.gz: 84d01e2aa79b63f629896141d0943a4b7e3417fe819d0c79cd79f2b2b3efe659
5
5
  SHA512:
6
- metadata.gz: 06bc60c9b3d0143654653854e0d3f32094c0c099472eb18072610fca5edda4d3d68dcf1b4b4f0371dcc418545f93c0e52d889bc63ced7d3a182795a93095cb19
7
- data.tar.gz: b694e621ad6c366297853c2b12bc1b4dde86cebb96cc5b3744f6979d1aeab64b23abdc6bec469455789f4da02e23a0479594bafc93c5b165accf3584da86d575
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!(&:to_sym)
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[:es_encrypted] = encrypted
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-ResolveLinkTos'] = resolve_links.to_s
87
+ headers['ES-ResolveLinktos'] = resolve_links.to_s
88
88
 
89
89
  make_request(
90
90
  :get,
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EventStoreClient
4
- VERSION = '0.1.20'
4
+ VERSION = '0.1.21'
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: 0.1.20
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-17 00:00:00.000000000 Z
11
+ date: 2020-04-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dry-schema