ruby_event_store 0.10.0 → 0.10.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
  SHA1:
3
- metadata.gz: 38cf4f49d0019cc3d1c4d613c6c29730dda6941f
4
- data.tar.gz: fa880c595c0adaf4a45b6ff13cbaf1f38d1718d6
3
+ metadata.gz: e5d5a1105e3ed5905fe587217042bd588bbac81c
4
+ data.tar.gz: a55182ec68362fe4f24bf8c994fea6eeb35910c2
5
5
  SHA512:
6
- metadata.gz: c6f0017ba2975ebf997db54d1fb21ae721ee805cebfaccf55b4723f435f7bd626bd3dad3cdf14276ff4a6a6c94dcb9a1e4f2105750473cfb7f9bb39c9779f42e
7
- data.tar.gz: 8fbb2c47e171ee20c180643108ec77c5684afab845062a158d5ea60a7216cb1b082238fdb6f7da31985441f164aa0334ebddf279eabf8745b8032861431b1dcd
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')
@@ -1,3 +1,3 @@
1
1
  module RubyEventStore
2
- VERSION = '0.10.0'
2
+ VERSION = '0.10.1'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby_event_store
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.0
4
+ version: 0.10.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Arkency