ruby_event_store-rspec 2.11.1 → 2.12.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: 638fa1b511d0b28ae3d470dd541c5ad458094c30e228f7ccd9c4b07ff24deb34
4
- data.tar.gz: e46881c118a8b12c56e7c9330af7be6f791a1ee4fab787c5f8888b89f49968e7
3
+ metadata.gz: 69af3209715c2bcd5a5c26bcd503ae2b4a2a5c1cabb3cde8238a1e67b52d77c6
4
+ data.tar.gz: d16a38e470bdd77686669eeda8162e3436b6d640b7d7411068181eba102f4a59
5
5
  SHA512:
6
- metadata.gz: a0513e1c988889f15e1e158ca3a277341dfcf3c04f403065a3d19d4dad39286bd3f5ae9a75c10c34f0b091a67a4671a830791e679ed228edd1f9c1ade7245796
7
- data.tar.gz: 9578ca3dc081d16939cf10fb1b8d30a03c2558d0d5924825593ea1724fa30cd343934a8789a5d6bad44ec69c2f551aabf60ee952d5f0d257c44ba3d9f7a9207c
6
+ metadata.gz: 88962478d5312fc4b6477c63b788a379cdf12a802bdd54deafa60b06c4be86aa2c19b400274d77e64403490f1a516d28b3d6baf6fec5975049a0e5e892ff24cd
7
+ data.tar.gz: f31c223d820033cd92060d2d12ec8518de1ed563fbedbfb040d1020fc72a218b1a380938c907b2240bb5b239e052d7a50fef4a7de1de4c661ecfcc0d0b3a3e3e
@@ -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.1"
5
+ VERSION = "2.12.1"
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.1
4
+ version: 2.12.1
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-24 00:00:00.000000000 Z
11
+ date: 2023-09-05 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.17
74
+ rubygems_version: 3.3.7
75
75
  signing_key:
76
76
  specification_version: 4
77
77
  summary: RSpec matchers for RubyEventStore