ruby_event_store-rom 0.32.0 → 0.33.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: 995fff6b726e0326b38e8bfbcd9be6d919b402934768e828b57cd8db164ed7a2
4
- data.tar.gz: 8ceb98b10e4da72899199c28f8e1626f28e946140ae58c2f937d03b0600a4c68
3
+ metadata.gz: cf7fcd100ff0863664f590d9ef69af407eed14c9585feb968f9f5500d37e0a8b
4
+ data.tar.gz: 5f4cc0861cdccd36e5111eefb3142f28dcb6a340e0b9d3de41a2c99fb87b78c3
5
5
  SHA512:
6
- metadata.gz: bb9acb2c016ad4bc3d5987cbd0ad07e47de32d5c07e0f3acc34a8f813221ea40099af95c34e22d9360a533e250c66b9883749b63fbe604d2c37a8c3322b82c31
7
- data.tar.gz: 3c3ca41d2308e2a55e8fe61904b845dab7953b6586b52848d6b09182f9896a920d94e74e0e20a0b0841a50aed61b426f60464df017f1648294a38743e38b8d35
6
+ metadata.gz: 0fa33ce4ece74345cb3a4efd2b31d270cb0ef569b0991d20f3be492ee892d9ef1bc52958509fb4968df2555a6b80195111a2cd5fc78c2d578e8ae876fae10484
7
+ data.tar.gz: 612de166e303aa23350f86d6af73eea4c5c04dc921ab627817a07f56c640ef48987edfb60f6e6f649411e2d03ce3c5591c748147b5e5e81bb1843a95689713e2
@@ -20,7 +20,7 @@ module RubyEventStore
20
20
  SERIALIZED_GLOBAL_STREAM_NAME = 'all'.freeze
21
21
 
22
22
  def offset(num)
23
- num.zero? ? self : new(dataset.slice(num..-1))
23
+ num.zero? ? self : new(dataset.slice(num..-1) || [])
24
24
  end
25
25
 
26
26
  def take(num)
@@ -75,12 +75,6 @@ module RubyEventStore
75
75
  @events.last_stream_event(stream)
76
76
  end
77
77
 
78
- def read_event(event_id)
79
- guard_for(:not_found, event_id) do
80
- @events.by_id(event_id)
81
- end
82
- end
83
-
84
78
  def read(specification)
85
79
  raise ReservedInternalName if specification.stream.name.eql?(@stream_entries.stream_entries.class::SERIALIZED_GLOBAL_STREAM_NAME)
86
80
 
@@ -47,13 +47,17 @@ module RubyEventStore
47
47
  end
48
48
 
49
49
  direction = specification.forward? ? :forward : :backward
50
+
50
51
  limit = specification.limit if specification.limit?
52
+
51
53
  if specification.last? && specification.head?
52
54
  direction = specification.forward? ? :backward : :forward
53
55
  end
54
56
 
55
57
  query = stream_entries.ordered(direction, specification.stream, offset_entry_id)
56
58
 
59
+ query = query.by_event_id(specification.with_ids) if specification.with_ids
60
+
57
61
  if specification.batched?
58
62
  reader = ->(offset, limit) do
59
63
  query_builder(query, offset: offset, limit: limit).to_ary
@@ -1,5 +1,5 @@
1
1
  module RubyEventStore
2
2
  module ROM
3
- VERSION = "0.32.0"
3
+ VERSION = "0.33.0"
4
4
  end
5
5
  end
@@ -36,7 +36,7 @@ Gem::Specification.new do |spec|
36
36
  spec.add_development_dependency 'childprocess'
37
37
  spec.add_development_dependency 'google-protobuf', '~> 3.5.1.2'
38
38
 
39
- spec.add_dependency 'ruby_event_store', '= 0.32.0'
39
+ spec.add_dependency 'ruby_event_store', '= 0.33.0'
40
40
  spec.add_dependency 'sequel', '>= 4.49'
41
41
  spec.add_dependency 'dry-types', '~> 0.12.2'
42
42
  spec.add_dependency 'dry-initializer', '= 2.5.0'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby_event_store-rom
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.32.0
4
+ version: 0.33.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joel Van Horn
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-09-27 00:00:00.000000000 Z
11
+ date: 2018-10-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -156,14 +156,14 @@ dependencies:
156
156
  requirements:
157
157
  - - '='
158
158
  - !ruby/object:Gem::Version
159
- version: 0.32.0
159
+ version: 0.33.0
160
160
  type: :runtime
161
161
  prerelease: false
162
162
  version_requirements: !ruby/object:Gem::Requirement
163
163
  requirements:
164
164
  - - '='
165
165
  - !ruby/object:Gem::Version
166
- version: 0.32.0
166
+ version: 0.33.0
167
167
  - !ruby/object:Gem::Dependency
168
168
  name: sequel
169
169
  requirement: !ruby/object:Gem::Requirement
@@ -312,7 +312,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
312
312
  version: '0'
313
313
  requirements: []
314
314
  rubyforge_project:
315
- rubygems_version: 2.7.6
315
+ rubygems_version: 3.0.0.beta1
316
316
  signing_key:
317
317
  specification_version: 4
318
318
  summary: ROM events repository for Ruby Event Store