rails_event_store_active_record-legacy 0.29.0 → 0.30.0
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: 6ed86e078cbea863e39cc1e4e009a6f34aff0eb566231c5ab27d0cc1fde1172d
|
4
|
+
data.tar.gz: 4525df4964a5da84b61ea74e4865c800647994593e7ffb8e91e1d5168212595d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 35a61887f1ec70dd3af1b5c1e950936bd276b3d1adadda0b2cd73c2b12d80399d53b5c69e9f33d8d9594cefca280f66ca1e53a2f337680bac5be61435ed120e1
|
7
|
+
data.tar.gz: e8c933f7750da1762fe94a03efbf90da78e69c2278b3054261c9d51fb82642cb66207622f138ca4c821aae1bce1ff7d6f097bef934cae141dc91ac58361a4cab
|
@@ -65,11 +65,20 @@ instead:
|
|
65
65
|
stream = stream.where(start_condition(spec)) unless spec.head?
|
66
66
|
stream = stream.where(stream: spec.stream_name) unless spec.global_stream?
|
67
67
|
|
68
|
-
|
68
|
+
if spec.batched?
|
69
|
+
batch_reader = ->(offset, limit) { stream.offset(offset).limit(limit).map(&method(:build_event_entity)) }
|
70
|
+
RubyEventStore::BatchEnumerator.new(spec.batch_size, total_limit(spec), batch_reader).each
|
71
|
+
else
|
72
|
+
stream.map(&method(:build_event_entity)).each
|
73
|
+
end
|
69
74
|
end
|
70
75
|
|
71
76
|
private
|
72
77
|
|
78
|
+
def total_limit(specification)
|
79
|
+
specification.limit? ? specification.count : Float::INFINITY
|
80
|
+
end
|
81
|
+
|
73
82
|
def start_condition(specification)
|
74
83
|
event_record =
|
75
84
|
LegacyEvent.find_by!(event_id: specification.start)
|
@@ -38,7 +38,7 @@ Gem::Specification.new do |spec|
|
|
38
38
|
spec.add_development_dependency 'childprocess'
|
39
39
|
spec.add_development_dependency 'mutant-rspec', '~> 0.8.14'
|
40
40
|
|
41
|
-
spec.add_dependency 'ruby_event_store', '= 0.
|
41
|
+
spec.add_dependency 'ruby_event_store', '= 0.30.0'
|
42
42
|
spec.add_dependency 'activesupport', '>= 3.0'
|
43
43
|
spec.add_dependency 'activemodel', '>= 3.0'
|
44
44
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails_event_store_active_record-legacy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.30.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Arkency
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-05-
|
11
|
+
date: 2018-05-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -142,14 +142,14 @@ dependencies:
|
|
142
142
|
requirements:
|
143
143
|
- - '='
|
144
144
|
- !ruby/object:Gem::Version
|
145
|
-
version: 0.
|
145
|
+
version: 0.30.0
|
146
146
|
type: :runtime
|
147
147
|
prerelease: false
|
148
148
|
version_requirements: !ruby/object:Gem::Requirement
|
149
149
|
requirements:
|
150
150
|
- - '='
|
151
151
|
- !ruby/object:Gem::Version
|
152
|
-
version: 0.
|
152
|
+
version: 0.30.0
|
153
153
|
- !ruby/object:Gem::Dependency
|
154
154
|
name: activesupport
|
155
155
|
requirement: !ruby/object:Gem::Requirement
|