ruby_event_store 1.1.0 → 1.1.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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6c14775d70ee44777790b8b916ceee3b7801439494711a701aabb5a8904e8270
|
4
|
+
data.tar.gz: 9c11cdd6cc8a13a8e16749928acb174c1cc11ca5a5e56aae2d9338fbbb42f842
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 15c4530f8da5f71f6e411296a7e228ccea5dc0a3b836cfa90d7ba6c9f1462881d85963d1f68e0995f7b86bf27f9ae4981a551e3fbd1aa8b5213238488144ecba
|
7
|
+
data.tar.gz: d925c31f958e72529c43fe4a006e74a0140b37bbddd667e1ac19cebca66963c59903a1aac136f1b080b2977b2019bb5e79c21bf9ab6bca5aa23c9f1db45293a8
|
@@ -10,9 +10,10 @@ module RubyEventStore
|
|
10
10
|
|
11
11
|
def each
|
12
12
|
return to_enum unless block_given?
|
13
|
+
|
13
14
|
0.step(total_limit - 1, batch_size) do |batch_offset|
|
14
|
-
batch_limit
|
15
|
-
result
|
15
|
+
batch_limit = [batch_size, total_limit - batch_offset].min
|
16
|
+
result = reader.call(batch_offset, batch_limit)
|
16
17
|
|
17
18
|
break if result.empty?
|
18
19
|
yield result
|
@@ -29,6 +30,6 @@ module RubyEventStore
|
|
29
30
|
|
30
31
|
private
|
31
32
|
|
32
|
-
|
33
|
+
attr_reader :batch_size, :total_limit, :reader
|
33
34
|
end
|
34
35
|
end
|
@@ -98,7 +98,7 @@ module RubyEventStore
|
|
98
98
|
case meta
|
99
99
|
when Leaf
|
100
100
|
value = data.fetch(attribute)
|
101
|
-
return
|
101
|
+
return if value.nil?
|
102
102
|
|
103
103
|
encryption_key = key_repository.key_of(meta.fetch(:identifier))
|
104
104
|
encryption_key.encrypt(serializer.dump(value), meta.fetch(:iv))
|
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.1.
|
4
|
+
version: 1.1.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-
|
11
|
+
date: 2020-08-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: concurrent-ruby
|