Skip to content

Releases: RailsEventStore/rails_event_store

v0.25.0

09 Feb 15:36
Compare
Choose a tag to compare

RailsEventStore

  • no changes

RubyEventStore

  • no changes

RailsEventStoreActiveRecord

  • Change: get_all_streams now explicitly sorts by id

AggregateRoot

  • no changes

RailsEventStore::RSpec

  • no changes

BoundedContext

  • no changes

RailsEventStore::Browser

  • Change: Streams and events are finally paginated on server-side. As a consequence we can no longer filter streams and events on client-side, so search functionality was removed.
  • Fix: Encode stream names and event ids for URLs. An unescaped URL with slashes would be incorrectly interpreted by browser backend.

v0.24.0

24 Jan 14:34
Compare
Choose a tag to compare

RailsEventStore

  • Fix: Handle publishing events after commit in case of nested transactions. Fixes AsyncRecord missing add_to_transaction method needed for Rails 5 integration (#181, #182).

RubyEventStore

  • no changes

RailsEventStoreActiveRecord

  • no changes

AggregateRoot

  • no changes

RailsEventStore::RSpec

  • no changes

BoundedContext

  • no changes

RailsEventStore::Browser

  • Change: JSON API exchange format between Browser's backend and frontend

v0.23.0

11 Jan 23:42
Compare
Choose a tag to compare

RailsEventStore

  • Change: Include bounded_context gem as a dependency of rails_event_store (#146)
  • Add: Test on Ruby 2.5.0

RubyEventStore

  • Fix: RubyEventStore::Projection#run parameter count is now correctly a page limit. Previously it would hard limit the number of process events by projection with a default set to 100 (#173)
  • Add: Test on Ruby 2.5.0

RailsEventStoreActiveRecord

  • Add: Test on Ruby 2.5.0

AggregateRoot

  • Add: Test on Ruby 2.5.0

RailsEventStore::RSpec

  • Add: Test on Ruby 2.5.0

BoundedContext

  • Add: Test on Ruby 2.5.0

RailsEventStore::Browser

  • Fix: Remove obsolete puts that somehow made it into the release.
  • Add: Test on Ruby 2.5.0

v0.22.1

04 Jan 21:04
Compare
Choose a tag to compare

RailsEventStore

  • no changes

RubyEventStore

  • no changes

RailsEventStoreActiveRecord

  • no changes

AggregateRoot

  • no changes

RailsEventStore::RSpec

  • no changes

BoundedContext

  • no changes

RailsEventStore::Browser

  • Fix: Include new assets directory within released gem package (aa0f1e1).

v0.22.0

04 Jan 21:00
Compare
Choose a tag to compare

RailsEventStore

  • Add: Introduce API to link published event in other streams RailsEventStore#link_to_stream (#177)

    This allows aggregating published events in multiple streams and using such streams as a kind of index. Useful for event-sourced process managers.

    Main qualities:

    • linking an existing, published event to given stream does not trigger event handlers
    • you cannot link same event more than once in a given stream
    • linking follows the same rules regarding expected_version as publishing an event for the first time

RubyEventStore

  • Add: Introduce API to link published event in other streams RubyEventStore#link_to_stream (#177)
  • Fix: disallow publishing same event twice using InMemoryRepository (0f4dddc)

RailsEventStoreActiveRecord

  • Add: Introduce API to link published event in other streams RailsEventStoreActiveRecord#link_to_stream (#177)

AggregateRoot

  • no changes

RailsEventStore::RSpec

  • no changes

BoundedContext

  • no changes

RailsEventStore::Browser

  • Change: Browser no longer relies on Sprockets and Asset Pipeline to deliver static files. Instead ActionDispatch::Static is used to serve scripts.

v0.21.0

22 Dec 18:16
a98cdf8
Compare
Choose a tag to compare

RailsEventStore

  • no changes

RubyEventStore

  • Add: RubyEventStore#when method to handle events array (6adf082)
  • Add: Introduce API to get all stream names RubyEventStore::Client#get_all_streams (b063b59)
  • Add: Introduce API to retrieve single event RubyEventStore::Client#read_event (23a7050)

RailsEventStoreActiveRecord

  • Add: Introduce API to get all stream names RailsEventStoreActiveRecord::EventRepository#get_all_streams (b063b59)
  • Add: Introduce API to retrieve single event RailsEventStoreActiveRecord::EventRepository#read_event (23a7050)

AggregateRoot

  • no changes

RailsEventStore::RSpec

  • no changes

BoundedContext

  • no changes

RailsEvenStore::Browser

First release of a Rails Engine allowing to browse events via web interface

Add this line to your application's Gemfile:

gem 'rails_event_store-browser'

And then execute:

$ bundle

Add to your routes.rb:

Rails.application.routes.draw do
  mount RailsEventStore::Browser::Engine => "/res"
end

Start using it!

Assumptions:

  • you don't need pagination (just not yet implemented in this iteration, beware large streams)
  • you have event store configured at Rails.configuration.event_store (like we recommend in docs)
  • you use Rails with Asset Pipeline (engine delivers assets with AP in this iteration)

v0.20.0

24 Nov 12:44
7a2b523
Compare
Choose a tag to compare

RailsEventStore

  • no changes

RubyEventStore

  • Add: default mapper RubyEventStore::Mappers::Default which is responsible for mapping fields of event from/to record via RubyEventStore::SerializedRecord and configurable serialization. Mapper has configured YAML serializer by default. Serializer can be replaced by custom one, following dump and load contract.

RailsEventStoreActiveRecord

  • Fix: Primary key in SQLite on Rails 4.2 not being unique (945419b)
  • Deprecate: LegacyEventRepository (2423ba3)
  • Fix: Specify minimum working activerecord-import version (2e2c08b)
  • Change: RailsEventStoreActiveRecord::EventRepository implementation to use default mapper RubyEventStore::Mappers::Default provided by RubyEventStore. Mapper can be replaced by custom one. In RailsEventStoreActiveRecord::Event implicit serialization was removed (now is configured and can be customised via mapper).

AggregateRoot

  • no changes

RailsEventStore::RSpec

  • no changes

BoundedContext

  • no changes

v0.19.0

06 Nov 11:10
b8f5122
Compare
Choose a tag to compare

RailsEventStore

  • Add: publish_events(events) API which allows publishing a collection of events. Handlers are executed in the order the events were provided. First all handlers to the 1st event, then all handlers to the 2nd event and so on...

    publish_events([e0, e1]) is equivalent to publish_event([e0]); publish_event([e1]) but the events are stored transactionally (when using RailsEventStoreActiveRecord).

RubyEventStore

  • Add: publish_events(events) API which allows publishing a collection of events.
  • Fix: Fix one-shot (dynamic) subscribers behavior when exception occurs during processing a block. A dynamic subscriber was not unsubscribed when an exception happened. Not it will be unsubscribed.
  • Fix: RubyEventStore::Event#hash method was implemented. Now identical events (in terms of class, event_id and data) can be safely used as keys in Hash or members of a Set. Notice: metadata is ignored when comparing events.
  • Change: RubyEventStore::InMemoryRepository uses append_to_stream(events, stream_name, expected_version) API instead of create(event, stream_name)
  • Change: RubyEventStore::InMemoryRepository can detect concurrent writes to the same stream

RailsEventStoreActiveRecord

  • Breaking: Uses two tables instead of one to save events and events in streams separately. Use following commands to migrate schema and data:

    rails generate rails_event_store_active_record:v1_v2_migration
    rake db:migrate
    

    This migration is intended to be run in offline mode. You need to edit this migration file and fill out the def preserve_positions?(stream_name) method based on the instructions you will find there.

    If by any chance you cannot migrate the schema right now you can (for some limited) time switch to old repository, available as RailsEventStoreActiveRecord::LegacyEventRepository:

    Rails.application.configure do
      config.to_prepare do
        Rails.configuration.event_store = RailsEventStore::Client.new(
          repository: RailsEventStoreActiveRecord::LegacyEventRepository.new
        )
      end
    end

    Mind that we're going to eventually remove RailsEventStoreActiveRecord::LegacyEventRepository in one of next major releases.

  • Breaking: Passing UUID is no longer accepted as expected_version of previous event in a stream. Use integers as sequence numbers for that purpose.

  • Breaking: delete_stream no longer removes an events. The new behaviour is as follows:

    • EventRepository#delete_stream will unlink events from given stream, leave it in others
    • LegacyEventRepository#delete_stream will move events from given stream to global stream named all
  • Change: 3 ways of providing expected_version. Read more at our expected_version option explained article in the documentation

  • Change: Properly detects race conditions in case of concurrent writes to the same stream using optimistic locking strategy when a proper expected_version is used. Read more at our expected_version option explained article in the documentation

  • Change: append_to_stream(events, stream_name, expected_version) API instead of create(event, stream_name) which allows storing a collection of events transactionally and optimistic locking

  • Add: LegacyEventRepository to support old database schema and allow to prepare for migration to new schema used by EventRepository.

  • Breaking: RailsEventStoreActiveRecord::EventRepository cannot be initialized with an adapter.

  • Add: RailsEventStoreActiveRecord::EventRepository can append the same event to multiple streams without the need to duplicate the event with a different UUID.

AggregateRoot

  • Change: Properly provides lower layer with expected_version to detect concurrent writes to the same stream. Can raise RubyEventStore::EventDuplicatedInStream (aliased as RailsEventStore::EventDuplicatedInStream) when there is a concurrency conflict.
  • Change: unpublished_events is publicly available, read-only iterator.

RailsEventStore::RSpec

  • no changes

BoundedContext

  • no changes

v0.18.2

18 Oct 11:13
Compare
Choose a tag to compare

RailsEventStore

  • no changes

RubyEventStore

  • no changes

RailsEventStoreActiveRecord

  • Fix: Improve Async dispatcher compatibility with Rails 5.1 - #132

AggregateRoot

  • no changes

RailsEventStore::RSpec

  • no changes

BoundedContext

  • no changes

v0.18.1

11 Oct 17:59
Compare
Choose a tag to compare

RailsEventStore

  • no changes

RubyEventStore

  • no changes

RailsEventStoreActiveRecord

  • no changes

AggregateRoot

  • no changes

RailsEventStore::RSpec

  • Fix: Bump rails_event_store dependency to point to the latest release. Before 18a7b96 it was impossible to resolve rails_event_store and rails_event_store-rspec of the same version number.

BoundedContext

  • no changes