v0.33.0
RailsEventStore
-
Remove: Deprecated
RailsEventStore::Client#publish_event
,RailsEventStore::Client#publish_events
,RailsEventStore::Client#link_to_stream
andRailsEventStore::Client#append_to_stream
are no more. -
Change: Less chatty
RailsEventStore::Client
instance in console [#465]Please use
RailsEventStore::Client#publish
,RailsEventStore::Client#link
andRailsEventStore::Client#append
instead. -
Change: Unify read API further more by introducing
event_store.read.event
,event_store.read.event!
andevent_store.read.events
. Deprecatesevent_store.read_event
[#462]event_store = RailsEventStore::Client.new TweetPosted = Class.new(RubyEventStore::Event) event_store.publish(TweetPosted.new(event_id: '54994b0e-4fe3-4d58-8ffe-16755fcbc635', data: { message: 'Hello from @RailsEventStore!' })) event_store.read.event('54994b0e-4fe3-4d58-8ffe-16755fcbc635') # => #<TweetPosted:0x00007fce3cb166d0 @event_id="54994b0e-4fe3-4d58-8ffe-16755fcbc635", @metadata=#<RubyEventStore::Metadata:0x00007fce3cb16658 @h={:timestamp=>2018-10-12 17:50:27 UTC}>, @data={:message=>"Hello from @RailsEventStore!"}> event_store.read.event('54994b0e-4fe3-4d58-8ffe-xxxxx') # => nil event_store.read.event!('54994b0e-4fe3-4d58-8ffe-16755fcbc635') # => #<TweetPosted:0x00007fce3cb05498 @event_id="54994b0e-4fe3-4d58-8ffe-16755fcbc635", @metadata=#<RubyEventStore::Metadata:0x00007fce3cb05448 @h={:timestamp=>2018-10-12 17:50:27 UTC}>, @data={:message=>"Hello from @RailsEventStore!"}> event_store.read.event!('54994b0e-4fe3-4d58-8ffe-xxxxx') # => RailsEventStore::EventNotFound (Event not found: 54994b0e-4fe3-4d58-8ffe-xxxxx) event_store.read.events(['54994b0e-4fe3-4d58-8ffe-xxxxx', '54994b0e-4fe3-4d58-8ffe-16755fcbc635']).to_a # => [#<TweetPosted:0x00007fce3cab1a00 @event_id="54994b0e-4fe3-4d58-8ffe-16755fcbc635", @metadata=#<RubyEventStore::Metadata:0x00007fce3cab19b0 @h={:timestamp=>2018-10-12 17:50:27 UTC}>, @data={:message=>"Hello from @RailsEventStore!"}>]
RubyEventStore
-
Remove: Deprecated
RubyEventStore::Client#publish_event
,RubyEventStore::Client#publish_events
,RubyEventStore::Client#link_to_stream
andRubyEventStore::Client#append_to_stream
are no more.Please use
RubyEventStore::Client#publish
,RubyEventStore::Client#link
andRubyEventStore::Client#append
instead. -
Change: Less chatty
RubyEventStore::Client
instance in console [#465] -
Change: Unify read API further more by introducing
event_store.read.event
,event_store.read.event!
andevent_store.read.events
. Deprecatesevent_store.read_event
[#462]event_store = RubyEventStore::Client.new(repository: RubyEventStore::InMemoryRepository.new) TweetPosted = Class.new(RubyEventStore::Event) event_store.publish(TweetPosted.new(event_id: '54994b0e-4fe3-4d58-8ffe-16755fcbc635', data: { message: 'Hello from @RailsEventStore!' })) event_store.read.event('54994b0e-4fe3-4d58-8ffe-16755fcbc635') # => #<TweetPosted:0x00007fce3cb166d0 @event_id="54994b0e-4fe3-4d58-8ffe-16755fcbc635", @metadata=#<RubyEventStore::Metadata:0x00007fce3cb16658 @h={:timestamp=>2018-10-12 17:50:27 UTC}>, @data={:message=>"Hello from @RailsEventStore!"}> event_store.read.event('54994b0e-4fe3-4d58-8ffe-xxxxx') # => nil event_store.read.event!('54994b0e-4fe3-4d58-8ffe-16755fcbc635') # => #<TweetPosted:0x00007fce3cb05498 @event_id="54994b0e-4fe3-4d58-8ffe-16755fcbc635", @metadata=#<RubyEventStore::Metadata:0x00007fce3cb05448 @h={:timestamp=>2018-10-12 17:50:27 UTC}>, @data={:message=>"Hello from @RailsEventStore!"}> event_store.read.event!('54994b0e-4fe3-4d58-8ffe-xxxxx') # => RubyEventStore::EventNotFound (Event not found: 54994b0e-4fe3-4d58-8ffe-xxxxx) event_store.read.events(['54994b0e-4fe3-4d58-8ffe-xxxxx', '54994b0e-4fe3-4d58-8ffe-16755fcbc635']).to_a # => [#<TweetPosted:0x00007fce3cab1a00 @event_id="54994b0e-4fe3-4d58-8ffe-16755fcbc635", @metadata=#<RubyEventStore::Metadata:0x00007fce3cab19b0 @h={:timestamp=>2018-10-12 17:50:27 UTC}>, @data={:message=>"Hello from @RailsEventStore!"}>]
RailsEventStoreActiveRecord
- Fix: Make sure legacy schema presence is not checked when
event_store_events
table is not created yet. Improves situation when initializingRailsEventStore::EventRepository
would prevent a migration to create such table to execute [#464]
AggregateRoot
- no changes
RailsEventStore::RSpec
- no changes
BoundedContext
- no changes
RubyEventStore::Browser
- no changes
Just a reminder that RailsEventStore::Browser
is discontinued. RubyEventStore::Browser
can do the same and works in and outside of Rails. Read more on enabling browser in docs
RubyEventStore::ROM
- no changes
RailsEventStoreActiveRecord::Legacy
- no changes