Skip to content

Releases: RailsEventStore/rails_event_store

v0.32.0

27 Sep 09:23

Choose a tag to compare

RailsEventStore

  • Change: Deprecate RailsEventStore::ActiveJobDispatcher and RailsEventStore::ActiveJobDispatcher::ActiveJobScheduler. Read RubyEventStore changelog below to learn how to use new dispatchers, and use new RailsEventStore::ActiveJobScheduler scheduler.

  • Change: Deprecate RailsEventStore::AsyncProxyStrategy::AfterCommit. Use AfterCommitAsyncDispatcher instead.

  • Change: RailsEventStore default dispatcher has now changed to use new dispatchers, but still preserving old overall behaviour (dispatch asynchronous if possible, synchronous otherwise)

  • Add: Instrumentation for dispatchers. Read more in docs for an overview and list of available hooks. [#455, #244]

    regular_dispatcher = 
      RubyEventStore::ComposedDispatcher.new(
        RubyEventStore::ImmediateAsyncDispatcher.new(scheduler: ActiveJobScheduler.new),
        RubyEventStore::PubSub::Dispatcher.new
      )
    instrumented_dispatcher = 
      RubyEventStore::InstrumentedDispatcher.new(
        dispatcher, 
        ActiveSupport::Notifications
      )
    
    name = "call.dispatcher.rails_event_store"
    ActiveSupport::Notifications.subscribe(name) do |name, start, finish, id, payload|
      metric = ActiveSupport::Notifications::Event.new(name, start, finish, id, payload)
      NewRelic::Agent.record_metric('custom/RES/dispatch', metric.duration)
    end
  • Add: Instrumentation for repositories. Read more in docs for an overview and list of available hooks. [#423, #244]

    repository = RailsEventStoreActiveRecord::EventRepository.new
    RubyEventStore::Client.new(
      repository: InstrumentedRepository.new(repository, ActiveSupport::Notifications)
    )
    
    name = "append_to_stream.repository.rails_event_store"
    ActiveSupport::Notifications.subscribe(name) do |name, start, finish, id, payload|
      metric = ActiveSupport::Notifications::Event.new(name, start, finish, id, payload)
      NewRelic::Agent.record_metric('custom/RES/append_to_stream', metric.duration)
    end
  • Remove: Deprecated read API has been finally removed. [1778b3c]

  • Remove: Dead initializer argument page_size: removed. [d179a3b]

RubyEventStore

  • Fix: Enclosed SRecord into RubyEventStore namespace [#394].

  • Change: Deprecate old AsyncDispatcher and AsyncProxyStrategy::Inline. Now if you want to have only asynchronous inline dispatch, you can use ImmediateAsyncDispatcher. If you want to have old behaviour (both async and sync dispatcher), use ComposedDispatcher.new(ImmediateAsyncDispatcher.new(scheduler: scheduler), PubSub::Dispatcher.new)

  • Change: Dispatchers should no longer raise errors on verify, but return true/false instead. It is especially important if you want to use new ComposedDispatcher, not relevant otherwise.

  • Change: Schedulers API for new dispatchers change, it now use verify instead of async_handler? to verify whether handler is correct for given scheduler.

  • Add: ComposedDispatcher — new dispatcher, which accepts at least one dispatcher and dispatch the event to the first dispatcher which accepts the subscriber.

  • Add: Linter for schedulers.

  • Fix: RubyEventStore::InvalidHandler now does not return very customized (and often wrong) error message, it's now simple error inheriting on StandardError.

  • Add: RubyEventStore::Specification#first and RubyEventStore::Specification#last. That allows more idiomatic reading of edge events over frequently used enumerator-to-array conversion of even_store.read.each.to_a.last. [#399]

    first_event_in_dummy_stream = event_store.read.stream("Dummy").first
    last_event_published        = event_store.read.last
  • Fix: Ensure immutability in RubyEventStore::Specification result passed to repository. [#416]

  • Change: RubyEventStore::Client#publish, RubyEventStore::Client#append and RubyEventStore::Client#delete_stream return self instead of :ok. That is more useful in happy path as it allows chaining. [#413]

  • Add: RubyEventStore::Client#streams_of new API to get a list of all streams where event of given id is stored or linked. [#452]

  • Remove: Deprecated RubyEventStore::MethodNotDefined const is no more. [60cf00d]

  • Remove: Deprecated read API has been finally removed. [1778b3c]

  • Remove: Dead initializer argument page_size: removed. [d179a3b]

  • Change: Refactor RubyEventStore::Specification & RubyEventStore::SpecificationResult. RubyEventStore::Specification is just a builder of RubyEventStore::SpecificationResult that is passed to event repository. [#417] Closes [#398]

  • Add: RubyEventStore#overwrite(events) to overwrite the events which were already stored -- useful when events schema changes. Requires repository to implement update_messages(events) method.

RailsEventStoreActiveRecord

  • Add: Introduce PgLinearizedEventRepository. This repository uses lock (released at the end of a transaction) to guarantee only one batch of events written concurrently. More on its rationale and limitations can be found in docs [#106, #403].

  • Remove: V1-to-V2 schema migration code is now hosted in rails_event_store_active_record-legacy gem. [#412, #333]

  • Add: support for streams_of - fetching a list of streams where event of given id is stored or linked [#441]

  • Add: support for overwriting events feature. For details, read changelog of RubyEventStore.

AggregateRoot

  • no changes

RailsEventStore::RSpec

  • no changes

BoundedContext

  • no changes

RailsEventStore::Browser

  • Add: Display event data and metadata in collapsible tree widget. [#414]
  • Change: Deprecate rails_event_store-browser gem. This has been replaced by ruby_event_store-browser which works not only with Rails, but also any other Rack-based app. To be removed on next release.

RubyEventStore::Browser

First release of rails_event_store-browser successor. This Browser has the same functionality but offers much wider applicability, beyond Rails. It can be used as a standalone app or mounted inside existing one.

In Rails:

Rails.application.routes.draw do
  mount  RubyEventStore::Browser::App.for(
    event_store_locator: -> { Rails.configuration.event_store },
    host: 'http://localhost:3000',
    path: '/res'
  ) => '/res' if Rails.env.development?
end

Standalone config.ru:

require 'ruby_event_store/browser/app'

event_store = RubyEventStore::Client.new(
  repository: RubyEventStore::InMemoryRepository.new
)

run RubyEventStore::Browser::App.for(
  event_store_locator: -> { event_store },
  host: 'http://localhost:4567'
)

See browser docs for more.

RubyEventStore::ROM

  • Add: support for streams_of – fetching a list of streams where event of given id is stored or linked [#441]

RailsEventStoreActiveRecord::Legacy

  • Add: Host V1-to-V2 schema migration code. [#412, #333]

  • Add: support for streams_of – fetching a list of streams where event of given id is stored or linked [#441]

v0.31.1

17 Jul 21:48

Choose a tag to compare

RailsEventStore

  • Fix: Don't use deprecated link_to_stream in RailsEventStore::LinkByMetadata, RailsEventStore::LinkByCorrelationId, RailsEventStore::LinkByCausationId [37df713]

RubyEventStore

  • Fix: Don't use deprecated link_to_stream in RubyEventStore::LinkByMetadata, RubyEventStore::LinkByCorrelationId, RubyEventStore::LinkByCausationId [37df713]

RailsEventStoreActiveRecord

  • no changes

AggregateRoot

  • no changes

RailsEventStore::RSpec

  • no changes

BoundedContext

  • no changes

RailsEventStore::Browser

  • no changes

RubyEventStore::ROM

  • no changes

RailsEventStoreActiveRecord::Legacy

  • no changes

v0.31.0

17 Jul 20:53

Choose a tag to compare

Warning

  • When upgrading from v0.30 to v0.31, make sure all events serialized when using the old version are already processed by all async handlers and new events are not generated.
  • Rolling deploy of a new version might cause issues due to slight changes on how events are serialized for async handlers.

RailsEventStore

  • Add: Correlation between events in synchronous event handlers. When you publish events, their metadata will be enriched with correlation_id and causation_id [#374]. You can read more about correlation and causation in our documentation.

  • Change: Subtle change in metadata assignment disallowing overwriting key, once it is present. [#374]

  • Change: Signature change of RailsEventStore::ActiveJobDispatcher#call from (subscriber, event) to (subscriber, event, serialized_event). Dispatcher receives now also a serialized event (serialization happens via configured mapper, by default that is still YAML) [#363]

  • Change: Signature change of RailsEventStore::AsyncProxyStrategy::Inline#call and RailsEventStore::AsyncProxyStrategy::AfterCommit#call from (klass, event) to (klass, serialized_event). Strategies no longer perform serialization on their own, eliminating duplication of effort and using chosen mapper. [#363]

  • Add: RubyEventStore::Client#deserialize(event_type:, event_id:, data:, metadata:) [#363]

    For existing asynchronous handlers you need to perform following change from:

    class SendOrderEmail < ActiveJob::Base
      def perform(payload)
        event = YAML.load(payload)
        email = event.data.fetch(:customer_email)
        OrderMailer.notify_customer(email).deliver_now!
      end
    end

    to:

    class SendOrderEmail < ActiveJob::Base
      def perform(payload)
        event = event_store.deserialize(payload)
        email = event.data.fetch(:customer_email)
        OrderMailer.notify_customer(email).deliver_now!
      end
    
      private
      def event_store
        Rails.configuration.event_store
      end
    end

    or you can use RailsEventStore::AsyncHandler

    class SendOrderEmail < ActiveJob::Base
      prepend RailsEventStore::AsyncHandler
    
      def perform(event)
        email = event.data.fetch(:customer_email)
        OrderMailer.notify_customer(email).deliver_now!
      end
    end
  • Add: Introduce RailsEventStore::LinkByMetadata, RailsEventStore::LinkByCorrelationId, RailsEventStore::LinkByCausationId, RailsEventStore::LinkByEventType. These event handlers allow to partition streams by particular quality. Streams formed by these handlers are made by linking events, therefore are cheap [#382, #346]

  • Change: Deprecate RailsEventStore::Client#publish_event and RailsEventStore::Client#publish_events. They're now just RailsEventStore::Client#publish [#366, #377]

  • Change: Deprecate RailsEventStore::Client#link_to_stream. This is now RailsEventStore::Client#link [#388]

  • Change: Deprecate RailsEventStore::Client#append_to_stream . This is now RailsEventStore::Client#append [#387]

  • Add: Introduce RailsEventStore::AsyncHandler and RailsEventStore::CorrelatedHandler to help with correlating events coming from async handlers [#379, #346]. You can read more about correlation and causation in our documentation.

  • Add: Introduce RailsEventStore::CorrelatedCommands to aid correlating commands going through command_bus with events [#375, #346]. You can read more about correlation and causation in our documentation.

  • Change: Breaking change of RailsEventStore::Client#initialize signature. Out is event_broker:, in subscriptions: and dispatcher:. Dispatcher is no longer an event broker dependency [#389, #265]

RubyEventStore

  • Remove: Deprecated RubyEventStore::Client#metadata_proc has been removed. Similar functionality available via RubyEventStore::Client#with_metadata [#373]

  • Add: Correlation between events in synchronous event handlers. When you publish events, their metadata will be enriched with correlation_id and causation_id [#374]

  • Change: Subtle change in metadata assignment disallowing overwriting key, once it is present. [#374]

  • Change: Signature change of RubyEventStore::PubSub::Dispatcher#call from (subscriber, event) to (subscriber, event, serialized_event). Dispatcher receives now also a serialized event (serialization happens via configured mapper, by default that is still YAML) [#363]

  • Change: Signature change of RubyEventStore:: PubSub::Broker#notify_subscribers from (event) to (event, serialized_event) [#346]

  • Add: RubyEventStore::Client#deserialize(event_type:, event_id:, data:, metadata:) [#346]

  • Add: Introduce RubyEventStore::LinkByMetadata, RubyEventStore::LinkByCorrelationId, RubyEventStore::LinkByCausationId, RubyEventStore::LinkByEventType. These event handlers allow to partition streams by particular quality. Streams formed by these handlers are made by linking events, therefore are cheap [#382, #346]

  • Change: Deprecate RubyEventStore::Client#publish_event and RubyEventStore::Client#publish_events. They're now just RubyEventStore::Client#publish [#366, #377]

  • Change: Deprecate RubyEventStore::Client#link_to_stream. This is now RubyEventStore::Client#link [#388]

  • Change: Deprecate RubyEventStore::Client#append_to_stream . This is now RubyEventStore::Client#append [#387]

  • Add: Introduce RubyEventStore::CorrelatedCommands to aid correlating commands going through command_bus with events [#375, #346]. You can read more about correlation and causation in our documentation.

  • Change: Breaking change of RubyEventStore::Client#initialize signature. Out is event_broker:, in subscriptions: and dispatcher:. Dispatcher is no longer an event broker dependency [#389, #265]

  • Add: Introduce RubyEventStore::AsyncDispatcher. Previously the only implementation of asynchronous dispatcher was present in form of RailsEventStore::ActiveJobDispatcher. This new class allows you to have all benefits of asynchronous dispatch while only requiring you to provide details of your background queue implementation [#381, #383]

    As an example this is howRailsEventStore::ActiveJobDispatcher can be implemented (and thus similar SidekiqDispatcher):

    require 'active_job'
    
    module RailsEventStore
    
      class ActiveJobDispatcher < AsyncDispatcher
        def initialize(proxy_strategy: AsyncProxyStrategy::Inline.new)
          super(proxy_strategy: proxy_strategy, scheduler: ActiveJobScheduler.new)
        end
    
        class ActiveJobScheduler
          def call(klass, serialized_event)
            klass.perform_later(serialized_event.to_h)
          end
    
          def async_handler?(klass)
            Class === klass && klass < ActiveJob::Base
          end
        end
      end
    end

RailsEventStoreActiveRecord

  • no changes

AggregateRoot

  • Change: Ensure publish does not incidentally receive an Enumerator (ade8f84)

RailsEventStore::RSpec

  • Add: publish matcher to verify expectation on given block of code. Disregards events published before expect { } block [#370]

    expect {
      MyService.new.call
    }.to publish(an_event(FooEvent)).in_stream("Foo$1234").in(event_store)

BoundedContext

  • no changes

RailsEventStore::Browser

  • no changes

RubyEventStore::ROM

  • Add: ROM Memory adapter implementation to allow easily adding alternate ROM implementations. This implements the ROM Memory adapter as an alternative to the ROM SQL adapter. Tests are structured to test ROM implementations easily. A new ROM adapter simply needs to implement the two relations required [#365]

RailsEventStoreActiveRecord::Legacy

  • no changes

v0.30.0

31 May 13:17

Choose a tag to compare

RailsEventStore

  • Change: Introduce new read API with fluent interface [#184]

    Was:

    client = Rails.configuration.event_store
    
    client.read_all_streams_forward(count:  count, start: start)
    client.read_all_streams_backward(count:  count, start: start)
    client.read_events_forward(stream_name, count:  count, start: start)
    client.read_events_backward(stream_name, count:  count, start: start)
    client.read_stream_events_forward(stream_name)
    client.read_stream_events_backward(stream_name)

    Is now:

    client = Rails.configuration.event_store
    
    client.read.from(start).limit(count).each.to_a
    client.read.from(start).limit(count).backward.each.to_a
    client.read.stream(stream_name).from(start).limit(count).each.to_a
    client.read.stream(stream_name).from(start).limit(count).backward.each.to_a
    client.read.stream(stream_name).each.to_a
    client.read.stream(stream_name).backward.each.to_a

    Building query starts from read. You can append limit, stream, forward, backward and from to refine the query further. Finally calling each executes the read, returning enumerator.

    By default forward and from(:head) are applied when you don't specify anything. Beware, queries are not bounded unless you say so with limit.

    Old reader methods are now deprecated and will be removed in future releases.
    To help with migration:

    • warnings remind of deprecated API usage with some hints on new API equivalent
    • script to rewrite old API to new one is distributed with ruby_event_store gem

    Usage for dry run that outputs changes to stderr without modifying source:

    bundle exec res-deprecated-read-api-migrator FILE_OR_DIRECTORY
    

    Usage for in-place file modification:

    bundle exec res-deprecated-read-api-migrator -m FILE_OR_DIRECTORY
    

    When in doubt, you can also use this script to translate queries from STDIN, i.e.

    bundle exec res-deprecated-read-api-migrator -e 'client.read_all_streams_forward'
    
  • Add: Batch API to retrieve data in batches of given size (by default of 100) [#349]
    Used internally in RailsEventStore::Projection and AggregateRoot.

    Usage:

    client = Rails.configuration.event_store
    
    client.read.in_batches.each do |event|
      # do something with event, handling batches transparently
    end
    
    client.read.in_batches.each_batch do |batch|
      # do something with batch of default size
    end
    
    client.read.in_batches_of(1000).each_batch do |batch|
      # do something with batch of size 1000
    end
  • Add: RailsEventStore::Event#correlate_with(event_or_command), RailsEventStore::Event#correlation_id and RailsEventStore::Event#causation_id. You can now correlate messages together which makes debugging much easier [#364]

  • Remove: Deprecated subscribe and subscribe_to_all_events syntax is no more [#350]

RubyEventStore

  • Change: Introduce new read API with fluent interface. See usage and migration steps above [#184]
  • Add: Introduce batch API. See usage and migration steps above [#349]
  • Add: RubyEventStore::Event#correlate_with(event_or_command), RubyEventStore::Event#correlation_id and RubyEventStore::Event#causation_id. You can now correlate messages together which makes debugging much easier [#364]
  • Remove: Deprecated subscribe and subscribe_to_all_events syntax is no more [#350]

RailsEventStoreActiveRecord

  • no changes

AggregateRoot

  • Change: Use newly-introduced batch reading API to load stream events. This minimizes the risk of huge aggregates allocating lots of memory when reading aggregate stream [#360]

RailsEventStore::RSpec

  • Add: have_published(...).from(start) matcher can now assert on events read from particular starting point in stream. This correlates with client.read.from(start) on client read API [c582f2a]

  • Add: have_published(...).strict and have_applied(...).strict matchers to check if only events given as an expectation have been returned and nothing else [6c44cc8, 5e0e548, #119]

  • Change: Improve phrasing in documentation format [#358, #355]

  • Change: have_published matcher now reads stream events forward (from the oldest published) and without limit. Previously we did have a backward read (from the newest published) up to 100 events in order to avoid situation were lastly published event would not fit in (over 100) and not be matched.

    expect(event_store).to have_published(FooEvent, BarEvent)

    should have published events that have to (be a FooEvent and be a BarEvent)

    expect(FooEvent.new(data: { foo: "bar" }, metadata: { timestamp: Time.now }))
            .to(be_event(FooEvent).with_data(foo: "bar")
              .and(be_event(FooEvent).with_metadata(timestamp: kind_of(Time))))

    should be an event FooEvent (with data including {:foo=>"bar"}) and be an event FooEvent (with metadata including {:timestamp=>kind of Time})

BoundedContext

  • no changes

RailsEventStore::Browser

  • no changes

RubyEventStore::ROM

  • no changes

RailsEventStoreActiveRecord::Legacy

  • no changes

v0.29.0

06 May 16:52

Choose a tag to compare

RailsEventStore

  • Change: Rewrote the middleware so that it now uses RubyEventStore::Client#with_metadata to enrich published events' metadata when using a RailsEventStore::Client from Rails.application.config.event_store. By default metadata is enriched with remote_ip and request_id, you can set your own lambda in request_metadata keyword argument when initializing a client

RubyEventStore

  • Add: Added RubyEventStore::Client#with_metadata method that enriches all events published inside a block with metadata set with method argument. with_metadata calls can be nested, in such case metadata from all levels are merged
  • Change: Deprecated metadata_proc keyword argument in RubyEventStore::Client - with_metadata method should be used instead

RailsEventStoreActiveRecord

  • no changes

AggregateRoot

  • no changes

RailsEventStore::RSpec

  • Fix: Matchers now have description, making them usable with --format documentation [#127, #282, #326, #342]

  • Fix: Matchers now have failure_message_when_negated, making them usable with expect(...).not_to [#326, #342]

BoundedContext

  • no changes

RailsEventStore::Browser

  • no changes

RubyEventStore::ROM

  • Change: Lock in dry-types to 0.12 #332 #339

RailsEventStoreActiveRecord::Legacy

  • no changes

v0.28.2

06 May 15:48

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

  • no changes

RubyEventStore::ROM

  • no changes

RailsEventStoreActiveRecord::Legacy

  • Fix: Avoid doubled serialization of data and metadata in RailsEventStoreActiveRecord::Legacy::EventRepository #345 #348

v0.28.1

05 May 09:09

Choose a tag to compare

RailsEventStore

  • Fix: Allow nil in event metadata #343 #344

RubyEventStore

  • Fix: Allow nil in event metadata #343 #344

RailsEventStoreActiveRecord

  • no changes

AggregateRoot

  • no changes

RailsEventStore::RSpec

  • no changes

BoundedContext

  • no changes

RailsEventStore::Browser

  • no changes

RubyEventStore::ROM

  • no changes

RailsEventStoreActiveRecord::Legacy

  • no changes

v0.28.0

01 May 23:00

Choose a tag to compare

RailsEventStore

  • Add: Support Rails 5.2

  • Change: Mappers (and serializers) now operate above the repository layer. If you have custom mapper or serializer move its configuration. [#257]

    Was:

    RailsEventStore::Client.new(
      repository: RailsEventStoreActiveRecord::EventRepository.new(
        mapper: RubyEventStore::Mappers::Default.new(
          serializer: JSON 
        )
      )
    )

    is now:

    RailsEventStore::Client.new(
      mapper: RubyEventStore::Mappers::Default.new(
        serializer: JSON 
      )
    )

    Read more in the documentation

RubyEventStore

  • Change: Mappers (and serializers) now operate above the repository layer. If you have custom mapper or serializer move its configuration. [#257]

    Was:

    RubyEventStore::Client.new(
      repository: RailsEventStoreActiveRecord::EventRepository.new(
        mapper: RubyEventStore::Mappers::Default.new(
          serializer: JSON 
        )
      )
    )

    is now:

    RubyEventStore::Client.new(
      mapper: RubyEventStore::Mappers::Default.new(
        serializer: JSON 
      )
    )

    Read more in the documentation

  • Add: NullMapper mapper. Useful in pair with InMemoryRepository for faster unit tests. Setup and usage in docs [#321] [#240]

  • Fixed: Protobuf mapper can be used with async handlers [#228]

  • Fixed: Documented InMemoryRepository which can be used for faster unit tests [#240] [#321]

  • Change: RubyEventStore#publish_event, RubyEventStore#publish_events and RubyEventStore#append_to_stream now raise IncorrectStreamData when passednil or empty stream name [#267]

  • Breaking: Metadata keys are limited to symbols. Metadata values are limited to [String, Integer, Float, Date, Time, TrueClass, FalseClass]. Using Hash, 'Array` or custom objects is no longer supported. [#271]

  • Breaking: Using protobuf mapper requires manual migration of columns to binary format [#280]

    change_column :event_store_events, :data,     :binary, null: true
    change_column :event_store_events, :metadata, :binary, null: true
  • Breaking: Using protobuf mapper requires adding protobuf_nested_struct gem to Gemfile [#280]

  • Breaking: When using protobuf mapper, the event_id is no longer stored in event's data [#280]

  • Breaking: When using protobuf mapper, the metadata fields are no longer stored in event's data [#280]

  • Breaking: When using protobuf mapper you need to use RubyEventStore::Proto class [#280]

    Was:

    event = MyApp::OrderPlaced.new(
      event_id: "f90b8848-e478-47fe-9b4a-9f2a1d53622b",
      customer_id: 123,
      order_id: "K3THNX9"
    )
    event_store.publish_event(event, stream_name: "Order-K3THNX9")

    Is now:

    event = RubyEventStore::Proto.new(
      data: MyApp::OrderPlaced.new(
        customer_id: 123,
        order_id: "K3THNX9",
      )
    )
    event_store.publish_event(event, stream_name: "Order-K3THNX9")

    Read more in the documentation

  • Remove: Custom mappers no longer should implement add_metadata method [#280]

  • Remove: Remove API to get all stream names RubyEventStore::Client#get_all_streams (8d7d3bc)

  • Breaking: Custom repositories should expect RubyEventStore::Stream and RubyEventStore::ExpectedVersion where previously stream_name and expected_version primitives were passed, in example:

    Was:

    def append_to_stream(events, stream_name, expected_version)
      # stream_name
      # expected_version
    end

    Is now:

    def append_to_stream(events, stream, expected_version)
      # stream.name
      # expected_version.any?
    end
  • Breaking: Custom repositories are expected to respond to read(specification) and return an Enumerator. The RubyEventStore::Specification::Result struct describes query conditions. This API replaces previous reader methods on repository [#184]:

    • read_events_forward(stream, after_event_id, count)
    • read_events_backward(stream, before_event_id, count)
    • read_stream_events_forward(stream)
    • read_stream_events_backward(stream)
    • read_all_streams_forward(after_event_id, count)
    • read_all_streams_backward(before_event_id, count)

RailsEventStoreActiveRecord

  • Add: Support Rails 5.2
  • Remove: LegacyEventRepository has been moved to separate rails_event_store_active_record-legacy gem, not installed as a dependency. See RailsEventStoreActiveRecord::Legacy section below.
  • Remove: Remove API to get all stream names RailsEventStoreActiveRecord::EventRepository [8d7d3bc]
  • Change: Restricted access to internal stream all with methods not intended to read from global stream. This stream name is an implementation detail of RailsEventStoreActiveRecord::EventRepository repository and reading from it using non-global stream API might result in different order of events. RubyEventStore::ReservedInternalName is raised when read_events_forward('all') is used over desired read_all_streams_forward.

AggregateRoot

  • Change: Dropped dependency on activesupport gem [#288]

RailsEventStore::RSpec

  • Add: Support Rails 5.2

BoundedContext

  • Fix: Generate better folders structure [#243]
  • Add: Support Rails 5.2

RailsEventStore::Browser

  • Add: Support Rails 5.2
  • Change: Remove stream names browsing and start with global stream events as a main screen. This is a workaround to avoid problem with inefficient API when browsing huge number of stream names. [#212, #298]

RubyEventStore::ROM

First release of Ruby Object Model (ROM) implementation of events repository for Ruby Event Store. This version of the ROM adapter supports rom-sql at this time. It is an alternative to the Active Record events repository implementation from rails_event_store_active_record gem.

Read the docs to get started.

RailsEventStoreActiveRecord::Legacy

Release of LegacyEventRepository as a separate gem. This repository has been deprecated and is compatible with single-table database schema we no longer support. If you haven't migrated and you're stuck with events repository schema from version below v0.19 then this is your option to defer it a bit more:

require 'rails_event_store_active_record/legacy'

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

v0.27.1

26 Mar 18:51

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: Re-release with correctly-built Browser javascript that failed when releasing 0.27.0 (#209)

v0.27.0

26 Mar 18:45

Choose a tag to compare

RailsEventStore

RubyEventStore

  • Add: Allow using ruby_event_store with repository from rails_event_store_active_record without rails - #236

    Documentation: http://railseventstore.org/docs/without_rails/

  • Add: ruby_event_store no longer uses active_support as dependency #232

  • Breaking: We dropped support for Ruby 2.2. It might continue to work, but we no longer test it and we don't guarantee it anymore.

RailsEventStoreActiveRecord

  • Add: Allow using rails_event_store_active_record without rails. - #236

    Documentation: http://railseventstore.org/docs/without_rails/

  • Breaking: We dropped support for Ruby 2.2. It might continue to work, but we no longer test it and we don't guarantee it anymore.

AggregateRoot

  • Breaking: We dropped support for Ruby 2.2. It might continue to work, but we no longer test it and we don't guarantee it anymore.

RailsEventStore::RSpec

  • Breaking: We dropped support for Ruby 2.2. It might continue to work, but we no longer test it and we don't guarantee it anymore.

BoundedContext

  • Breaking: We dropped support for Ruby 2.2. It might continue to work, but we no longer test it and we don't guarantee it anymore.

RailsEventStore::Browser

  • Breaking: We dropped support for Ruby 2.2. It might continue to work, but we no longer test it and we don't guarantee it anymore.