Rails Event Store v0.37.0 Release Notes

Release Date: 2019-03-05 // 11 months ago
  • 🚅 RailsEventStore

    ✂ Remove: Deprecated RailsEventStore::Client#read_event is no more

    Add: Convenience Enumerable#map and Enumerable#reduce on read API [#538]

    Was:

    event\_store.read.stream(stream\_name).each.reduce {|\_, ev| apply(ev) }
    

    Becomes:

    event\_store.read.stream(stream\_name).reduce {|\_, ev| apply(ev) }
    

    💎 RubyEventStore

    💎 Remove: Deprecated RubyEventStore::Client#read_event, RubyEventStore::SpecificationResult#count, RubyEventStore::SpecificationResult#direction, RubyEventStore::SpecificationResult#stream_name and RubyEventStore::SpecificationResult#global_stream? are no more [#534]

    Remove: Migrator script from deprecated read API removed [#534]

    Add: Convenience Enumerable#map and Enumerable#reduce on read API [#538]

    Was:

    event\_store.read.stream(stream\_name).each.reduce {|\_, ev| apply(ev) }
    

    Becomes:

    event\_store.read.stream(stream\_name).reduce {|\_, ev| apply(ev) }
    

    Add: RubyEventStore::Mappers::InstrumentedMapper to allow instrumenting serialization and deserialization [#540]

    👍 Usage with ActiveSupport::Notifications:

    RubyEventStore::Client.new( mapper: RubyEventStore::Mappers::InstrumentedMapper.new( mapper, ActiveSupport::Notifications ) )ActiveSupport::Notifications.subscribe("serialize.mapper.rails\_event\_store") do ...endActiveSupport::Notifications.subscribe("deserialize.mapper.rails\_event\_store") do ...end
    

    🚅 Change: RubyEventStore::Specification#of_type accepts now also a single event type in addition to an array of event types [#542]

    Add: Introduce RubyEventStore::Specification#to in order to specify stop point for the read operation [#528, #529]

    Add: Minimal linter (in form of shared RSpec tests) to verify event interface. Useful when you intend to implement your own Event class [#550, #553]

    🚅 RailsEventStoreActiveRecord

    • no changes

    AggregateRoot

    • Change: Restore AggregateRoot::Repository and shift persistence responsibility back to it from aggregate. Deprecates load and store methods on AggregateRoot module [#547]

    🚅 RailsEventStore::RSpec

    • no changes

    BoundedContext

    • no changes

    💎 RubyEventStore::Browser

    • Change: Migrate to Elm 0.19, no change in functionality [#548]

    💎 RubyEventStore::ROM

    • no changes