ruby_event_store-rspec 2.11.0 → 2.12.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: bd96de47753986d616e4a9f93fb573045020024649bb04b39d50b234eb9a67bc
4
- data.tar.gz: cdd2749c91ef66c1604fb74256072096d16aeca57cab53280d2310f4f18a73d0
3
+ metadata.gz: 9db5361e0890074eb6926b9d9174b41b7446e2e9904d09d286117600f1fa4ecf
4
+ data.tar.gz: 51b37d9506603fff2a4840b590bbe08c7ff62358a5c8183ab11a89281d427ec4
5
5
  SHA512:
6
- metadata.gz: f2856996ab50f79a1d530c7ddf34569584a25a3c3daf4fc3888868c3a9d43e0cf3fd6353885ec6632b547e275d8b7b6857c1c5845a6f35287c31c4e30ecadfe9
7
- data.tar.gz: 12088af66ef1d61251105438ce2f66c0b099b70b5a8a674659cf4188de5e23126cd0b4240e3b154784a8fcf07ba2b9ce3e52251003bc6b1e09c5efa71f56de58
6
+ metadata.gz: 6dbbf798201a07ab74a43715a5ecc547c62452a71205dff43b3f42d4865f0179706f9d240ac048624d437deffa93a30947a5138865ce3c232f0a9bb38b39ab7b
7
+ data.tar.gz: da2acd85438be4f50e530fe0597e02684d3fdccb51dc2975c129aa45c387588df73ad13351228f2a9c9516903d975330764da6ef96e259837d94cad819240134
@@ -15,10 +15,6 @@ module RubyEventStore
15
15
  @event_store = event_store
16
16
  end
17
17
 
18
- def from_last
19
- @start = call.last&.event_id
20
- end
21
-
22
18
  def call
23
19
  raise MissingEventStore if event_store.nil?
24
20
  events = event_store.read
@@ -7,6 +7,7 @@ module RubyEventStore
7
7
  @expected = ExpectedCollection.new(expected)
8
8
  @failure_message_formatter = failure_message_formatter
9
9
  @fetch_events = FetchEvents.new
10
+ @start_for_stream = {}
10
11
  end
11
12
 
12
13
  def in(event_store)
@@ -45,10 +46,16 @@ module RubyEventStore
45
46
  end
46
47
 
47
48
  def matches?(event_proc)
48
- fetch_events.from_last
49
+ stream_names.each do |stream_name|
50
+ fetch_events.stream(stream_name)
51
+ @start_for_stream[stream_name] = fetch_events.call.last&.event_id
52
+ end
53
+
49
54
  event_proc.call
55
+
50
56
  stream_names.all? do |stream_name|
51
57
  fetch_events.stream(stream_name)
58
+ fetch_events.from(@start_for_stream.fetch(stream_name))
52
59
  @published_events = fetch_events.call.to_a
53
60
  @failed_on_stream = stream_name
54
61
  MatchEvents.new.call(expected, published_events)
@@ -2,6 +2,6 @@
2
2
 
3
3
  module RubyEventStore
4
4
  module RSpec
5
- VERSION = "2.11.0"
5
+ VERSION = "2.12.0"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby_event_store-rspec
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.11.0
4
+ version: 2.12.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Arkency
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-07-20 00:00:00.000000000 Z
11
+ date: 2023-09-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec
@@ -71,7 +71,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
71
71
  - !ruby/object:Gem::Version
72
72
  version: '0'
73
73
  requirements: []
74
- rubygems_version: 3.4.10
74
+ rubygems_version: 3.4.17
75
75
  signing_key:
76
76
  specification_version: 4
77
77
  summary: RSpec matchers for RubyEventStore