ruby_event_store 1.2.0 → 1.2.1

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: 6b30f1a52e6c803267914de53968b2885b7262c96f86e8399749ffcf189ad967
4
- data.tar.gz: 9aa5d056ace06dec409e292e5562b3c6b177cdc4fceec2b98f1f936807b403cf
3
+ metadata.gz: d0c79f8dae2279ab828fb59a201d367d5cda8d4734a2013e3a0e619fc57de3c9
4
+ data.tar.gz: 4fee68b6561a59730c7cc5cadf000653fa216c88729326ee15e0040ce6ab0322
5
5
  SHA512:
6
- metadata.gz: f953e8453922bbc437efafab4716533172d1e1c4c14d0c9ed3c426b569ef4b415edb9095ec95fa47ca70dd92412ab57489111f8d22e216a20033fc838b2bf4e9
7
- data.tar.gz: b5ff8f63294fe88bcfe982ec494989c30f1748926990a68310a629b8eaa3c15b995c5ec015c373512c6f1ff3a6f46773d3f1c0f3a4a00b219fdb744f624c6ede
6
+ metadata.gz: c901d6cbf77e77b7e58de6af3ad2f74836cd85aee7b800a09357ea3b8661db57cfbab6497261fbe7399348efa230f36a11f15ebbbae267baa7d71e1b1b988994
7
+ data.tar.gz: bc368139eeeedfba76e52ecbaff4487a9d5c73b3f2bd313fe3bccd4afd298ceb0c6ad08cf10b14a0fad163fe51dc161fbe79c8d815dfcd47f8ede17a34f1df30
@@ -51,7 +51,8 @@ module RubyEventStore
51
51
 
52
52
  def update_messages(messages)
53
53
  messages.each do |new_msg|
54
- location = global.index{|m| new_msg.event_id.eql?(m.event_id)} or raise EventNotFound.new(new_msg.event_id)
54
+ location = global.index{|m| new_msg.event_id.eql?(m.event_id)}
55
+ raise EventNotFound.new(new_msg.event_id) unless location
55
56
  global[location] = new_msg
56
57
  streams.values.each do |str|
57
58
  location = str.index{|m| new_msg.event_id.eql?(m.event_id)}
@@ -69,7 +69,8 @@ module RubyEventStore
69
69
  acc[key] = encryption_metadata(data, value)
70
70
  when Proc
71
71
  key_identifier = value.call(data)
72
- encryption_key = key_repository.key_of(key_identifier) or raise MissingEncryptionKey.new(key_identifier)
72
+ encryption_key = key_repository.key_of(key_identifier)
73
+ raise MissingEncryptionKey.new(key_identifier) unless encryption_key
73
74
  acc[key] = {
74
75
  cipher: encryption_key.cipher,
75
76
  iv: encryption_key.random_iv,
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RubyEventStore
4
- VERSION = "1.2.0"
4
+ VERSION = "1.2.1"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby_event_store
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Arkency
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-10-30 00:00:00.000000000 Z
11
+ date: 2020-11-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: concurrent-ruby