ruby_event_store 0.10.0 → 0.10.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -1
- data/lib/ruby_event_store/spec/event_repository_lint.rb +14 -0
- data/lib/ruby_event_store/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e5d5a1105e3ed5905fe587217042bd588bbac81c
|
4
|
+
data.tar.gz: a55182ec68362fe4f24bf8c994fea6eeb35910c2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0a693f7053f4a752571b40b49bdcacc1bcb6340fdd7d54062806cfa001019f3019b5b725c53c73947c75cb034a25cc24abe86f10d0680af5f5fcf5678ec4d876
|
7
|
+
data.tar.gz: ee61129d92405084c4fb6dca0f4044f8f2876dc171bfeb60e389398781e147ba70ae835da6ba776aca2705b4b85a6f8ea403887cac3265a94d379de7415bd06c
|
data/CHANGELOG.md
CHANGED
@@ -1,8 +1,12 @@
|
|
1
|
+
### 0.10.1 (12.07.2016)
|
2
|
+
|
3
|
+
* Added few new tests for repositories
|
4
|
+
|
1
5
|
### 0.10.0 (12.07.2016)
|
2
6
|
|
3
7
|
* Fix: When using `append_to_stream`, expected version is no longer compared using `equal?` commit bdbe4600073d278cbf1024e8d49801fec768f6a7
|
4
8
|
* Change: Creating events with data is now done using `data` keyword argument. Previously events were created using the syntax `OrderCreated.new(order_id: 123)`, now it has to be `OrderCreated.new(data: { order_id: 123 })`. PR #24
|
5
|
-
* Change: Access to `data` attributes in an event is now using `event.data.some_attribute` syntax PR #24
|
9
|
+
* Change: Access to `data` attributes in an event is now using `event.data.some_attribute` syntax. `event.data[:some_attribute]` won't work either. PR #24
|
6
10
|
* Change: Only events with the same name, event_id and data are equal - metadata is no longer taken into account PR #24
|
7
11
|
* Change: `metadata[:timestamp]` is now set when event is appended to the stream, not when it is initialized PR #24
|
8
12
|
* Change: Initialization of `RubyEventStore::Facade` is now using keyword arguments PR #24
|
@@ -20,6 +20,20 @@ RSpec.shared_examples :event_repository do |repository_class|
|
|
20
20
|
expect(repository.read_stream_events_forward('other_stream')).to be_empty
|
21
21
|
end
|
22
22
|
|
23
|
+
it 'data attributes are retrieved' do
|
24
|
+
event = TestDomainEvent.new(data: { order_id: 3 })
|
25
|
+
repository.create(event, 'stream')
|
26
|
+
retrieved_event = repository.read_all_streams_forward(:head, 1).first
|
27
|
+
expect(retrieved_event.data.order_id).to eq(3)
|
28
|
+
end
|
29
|
+
|
30
|
+
it 'metadata attributes are retrieved' do
|
31
|
+
event = TestDomainEvent.new(metadata: { request_id: 3 })
|
32
|
+
repository.create(event, 'stream')
|
33
|
+
retrieved_event = repository.read_all_streams_forward(:head, 1).first
|
34
|
+
expect(retrieved_event.metadata.request_id).to eq(3)
|
35
|
+
end
|
36
|
+
|
23
37
|
it 'does not have deleted streams' do
|
24
38
|
repository.create(TestDomainEvent.new, 'stream')
|
25
39
|
repository.create(TestDomainEvent.new, 'other_stream')
|