All Versions
19
Latest Version
Avg Release Cycle
40 days
Latest Release
1356 days ago

Changelog History
Page 2

  • v0.40.1 Changes

    June 27, 2019

    ๐Ÿš… RailsEventStore

    • no changes

    ๐Ÿ’Ž RubyEventStore

    • no changes

    ๐Ÿš… RailsEventStoreActiveRecord

    • no changes

    AggregateRoot

    • Fix: AggregateRoot module is not opinionated on aggregate initializer and its arguments [7c64c02]

    ๐Ÿš… RailsEventStore::RSpec

    • no changes

    BoundedContext

    • no changes

    ๐Ÿ’Ž RubyEventStore::Browser

    • no changes

    ๐Ÿ’Ž RubyEventStore::ROM

    • no changes
  • v0.40.0 Changes

    June 25, 2019

    ๐Ÿš… RailsEventStore

    • no changes

    ๐Ÿ’Ž RubyEventStore

    ๐Ÿš… Change: RubyEventStore::Event#correlate_with returns self to allow chaining [#601]

    Change: Deprecate RubyEventStore::Mappers::MissingEncryptionKey const. It has been moved to RubyEventStore::Mappers::Transformation::Encryption::MissingEncryptionKey where it is used. Old const continues to work until next release [#619]

    Add: Introduce the concept of mapper pipeline. That allows composing mapper transformations. RES mappers now consist of such transformations [#572, #600]

    Usage:

    module RubyEventStoremodule Mappersclass Default \< PipelineMapperdef initialize(serializer: YAML, events\_class\_remapping: {}) super(Pipeline.new( transformations: [Transformation::EventClassRemapper.new(events\_class\_remapping), Transformation::SymbolizeMetadataKeys.new, Transformation::Serialization.new(serializer: serializer),] )) endendendend
    
    module RubyEventStoremodule Mappersclass EncryptionMapper \< PipelineMapperdef initialize(key\_repository, serializer: YAML, forgotten\_data: ForgottenData.new) super(Pipeline.new( transformations: [Transformation::Encryption.new(key\_repository, serializer: serializer, forgotten\_data: forgotten\_data), Transformation::Serialization.new(serializer: serializer),] )) endendendend
    

    Change: All errors are now descendant of RubyEventStore::Error [#620]

    Change: Deprecate RubyEventStore::PubSub::Dispatcher, RubyEventStore::PubSub::Subscriptions and RubyEventStore::PubSub::Broker consts. They have been moved to RubyEventStore::Dispatcher, RubyEventStore::Subscriptions and RubyEventStore::Broker respectively. Old consts continues to work until next release [#624]

    ๐Ÿš… RailsEventStoreActiveRecord

    Add: Support JSON data types in ActiveRecord database migration [#598]

    Usage:

    rails generate rails\_event\_store\_active\_record:migration --data\_type=jsonb # or json
    

    AggregateRoot

    Change: AggregateRoot.on now depends on RubyEventStore::Event#type [#578, #579]

    Add: New way to specify custom apply strategy [#584, #587, #597]

    Was:

    class OrderWithCustomStrategyinclude AggregateRootdef apply\_strategy@apply\_strategy ||= CustomOrderApplyStrategy.newendend
    

    Is now:

    class OrderWithCustomStrategyinclude AggregateRoot.with\_strategy(-\>{ CustomOrderApplyStrategy.new })end
    

    Fix: Allow specifying AggregateRoot.on arguments as strings, in addition to passing event class. This opens possibility to use this API with Proto events [#578, #588]

    Usage:

     Google::Protobuf::DescriptorPool.generated\_pool.build do add\_message "res\_testing.OrderPaid" do# ...endendmodule ResTestingOrderPaid= Google::Protobuf::DescriptorPool.generated\_pool.lookup("res\_testing.OrderPaid").msgclass endclass Orderinclude AggregateRoot on 'res\_testing.OrderPaid' do |\_event| @status = :paidendend order = ResTesting::Order.new order\_paid =RubyEventStore::Proto.new( event\_id: "f90b8848-e478-47fe-9b4a-9f2a1d53622b", data: ResTesting::OrderPaid.new ) order.apply(order\_paid)
    

    Remove: Deprecated AggregateRoot#load and AggregateRoot#store are gone [1ea7d2f]

    ๐Ÿš… Add: Instrumentation for AggregateRoot::Repository#load, AggregateRoot::Repository#store and AggregateRoot::Repository#with_aggregate methods [#591]

    Usage:

    ar\_repository = InstrumentedRepository.new( AggregateRoot::Repository.new(event\_store), ActiveSupport::Notifications)
    

    ๐Ÿš… RailsEventStore::RSpec

    • no changes

    BoundedContext

    • no changes

    ๐Ÿ’Ž RubyEventStore::Browser

    Change: Browser's API now returns error 404 when event not found (previously it was error 500) [#603]

    ๐Ÿ“‡ Add: Show link to correlation stream, if correlation_id present. For now, it only supports default correlation metadata field (correlation_id) and prefix ($by_correlation_id_) [#609]

    ๐Ÿ“‡ Add: Show link to causation stream, if causation_id present. For now, it only supports default correlation metadata field (causation_id) and prefix ($by_causation_id_) [#610]

    Add: Show limited (to 20 events) list of caused events by viewed event. [5c462f4]

    Change: Display timestamps in more readable format [#613]

    Change: Display more accurate browser <title /> (instead of hardcoded RubyEventStore::Browser) [#613]

    Add: Show link to the event which caused viewed event [#614]

    Add: Show link to event type stream (for example: $by_type_DummyEvent). For now only supports default prefix. [#617]

    ๐Ÿ’Ž RubyEventStore::ROM

    • Change: Update required versions of dry-types, rom and rom-sql dependencies. It may affect your project if you depend on those gems [#595]
  • v0.39.0 Changes

    April 24, 2019

    ๐Ÿš… RailsEventStore

    • ๐Ÿš… Remove: Deprecated from(:head) has been removed from read specification. When from(event_id) is not specified, we always read from head [#565]

    ๐Ÿ’Ž RubyEventStore

    ๐Ÿš… Remove: Deprecated from(:head) has been removed from read specification. When from(event_id) is not specified, we always read from head [#565]

    Change: New default cipher (aes-256-gcm) for RubyEventStore::Mappers::EncryptionMapper. From now on we follow OpenSSL recommendation for using an Authenticated Encryption mode. This change is backwards-compatible, you can still decrypt ciphertext encrypted with previous cipher as this is stored within encryption metadata [#567, a13658c]

    Fix: RubyEventStore::Mappers::NullMapper now follows behaviour of mappers more strictly by turning events into serialized records on serialization. It still does not perform serialization and is thus recommended for use in testing [#552, #575]

    If you've relied on NullMapper + InMemoryRepository returning objects of the same object_id, this is a breaking change. You may replicate that behaviour with:

    class NULLdef self.serialized\_record\_to\_event(record) record enddef self.event\_to\_serialized\_record(event) event endend
    

    โ†ช Bear in mind though such workaround will not support many already existing repository features (i.e. of_type) and may become even more trouble in the future.

    ๐Ÿš… RailsEventStoreActiveRecord

    • ๐Ÿš… Add: Migrating existing events is now supported on sqlite (version 3.24 or newer is required) [#446, #574]

    AggregateRoot

    • no changes

    ๐Ÿš… RailsEventStore::RSpec

    • no changes

    BoundedContext

    • no changes

    ๐Ÿ’Ž RubyEventStore::Browser

    • no changes

    ๐Ÿ’Ž RubyEventStore::ROM

    • no changes

    โœ… In this release we've also ended testing support for Ruby 2.3. This means that while Rails Event Store might continue to work without issues on that Ruby version, new development won't be targeting compatibility with it.

  • v0.38.1 Changes

    March 12, 2019

    ๐Ÿš… RailsEventStore

    • no changes

    ๐Ÿ’Ž RubyEventStore

    • Fix: RubyEventStore::Mappers::EncryptionKey#decrypt forces UTF-8 encoding on decrypted message [ec23b10]

    ๐Ÿš… RailsEventStoreActiveRecord

    • no changes

    AggregateRoot

    • no changes

    ๐Ÿš… RailsEventStore::RSpec

    • no changes

    BoundedContext

    • no changes

    ๐Ÿ’Ž RubyEventStore::Browser

    • no changes

    ๐Ÿ’Ž RubyEventStore::ROM

    • no changes
  • v0.38.0 Changes

    March 08, 2019

    ๐Ÿš… RailsEventStore

    • no changes

    ๐Ÿ’Ž RubyEventStore

    Add: Introducing RubyEventStore::Mappers::EncryptionMapper to allow partial encryption of event data attributes [#451, #361]

    ๐Ÿ“š More in GDPR documentation.

    ๐Ÿš… RailsEventStoreActiveRecord

    • no changes

    AggregateRoot

    • no changes

    ๐Ÿš… RailsEventStore::RSpec

    • no changes

    BoundedContext

    • no changes

    ๐Ÿ’Ž RubyEventStore::Browser

    • no changes

    ๐Ÿ’Ž RubyEventStore::ROM

    • no changes
  • v0.37.0 Changes

    March 05, 2019

    ๐Ÿš… 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
  • v0.36.0 Changes

    January 22, 2019

    ๐Ÿš… RailsEventStore

    Remove: Deprecated RailsEventStore::ActiveJobDispatcher, RailsEventStore::ActiveJobDispatcher::ActiveJobScheduler and RailsEventStore::AsyncProxyStrategy::AfterCommit are no more [#518]

    ๐Ÿš… Fix: Ensure dispatch for after commit strategy works in case of raise in after_commit callback [#519, #183]

    Fix: Ensure RailsEventStore::AsyncHandler covers use case of background job systems integrated without ActiveJob interface [#507, 7d249f5]

    ๐Ÿ’Ž RubyEventStore

    • Remove: Deprecated RubyEventStore:: AsyncDispatcher and RubyEventStore::AsyncProxyStrategy::Inline are no more [#518]

    ๐Ÿš… RailsEventStoreActiveRecord

    • no changes

    AggregateRoot

    • no changes

    ๐Ÿš… RailsEventStore::RSpec

    • no changes

    BoundedContext

    • no changes

    ๐Ÿ’Ž RubyEventStore::Browser

    • no changes

    ๐Ÿ’Ž RubyEventStore::ROM

    Add: JSON support in migrations to allow specifying JSON or JSONB for data and metadata columns [#524]

    Add: Upsert capability for updating events [#476]

    ๐Ÿš… RailsEventStoreActiveRecord::Legacy

    ๐Ÿš€ No longer released from now on (deprecated in release 0.18.0).

  • v0.35.0 Changes

    December 07, 2018

    ๐Ÿš… RailsEventStore

    ๐Ÿš… Add: APP_TEMPLATE to bootstrap Rails applications with rails_event_store gem.

    Usage:

    rails new -m https://raw.githubusercontent.com/RailsEventStore/rails_event_store/master/APP_TEMPLATE my_rails_app
    

    ๐Ÿ’Ž RubyEventStore

    Add: Support for Hash and Array as allowed types in RubyEventStore::Metadata [#501]

    Add: Debugging API to get size of a stream to read [#503]

    client.read.stream('GoldCustomers').of\_type([Customer::GoldStatusGranted]).count# =\> 42
    

    ๐Ÿš… RailsEventStoreActiveRecord

    Change: Default column type for event data and metadata is now binary. This allows wider range of exchangeable components (i.e. encryption mapper). In general it is more suitable type to store anything [#490, #308]

    As it always is with data schema changes, a migration is required for existing data. Running migration:

    rails g rails_event_store_active_record:binary_data_and_metadata
    rails db:migrate
    

    ๐Ÿ†“ Feel free to inspect and change generated migration. Make sure to check if your RDBMS can run this migration online and whether that meets your operational requirements.
    https://dev.mysql.com/doc/refman/5.7/en/innodb-online-ddl-operations.html#online-ddl-column-operations

    ๐Ÿš… You can defer this migration for some time if you don't plan to use Protobuf at the moment. The future code in Rails Event Store and its extensions will however assume the columns are binary from now on and can't guarantee full compatibility.

    AggregateRoot

    ๐Ÿ’Ž Change: Make aggregate_root depend on ruby_event_store [4926dc4]

    Initially, when introducing this gem the event store API was simpler and we had plans to swap with with http_event_store. This has changed over the years and now aggregate_root is released along other RES gems.

    ๐Ÿš… RailsEventStore::RSpec

    • no changes

    BoundedContext

    • no changes

    ๐Ÿ’Ž RubyEventStore::Browser

    • no changes

    ๐Ÿ’Ž RubyEventStore::ROM

    • no changes

    ๐Ÿš… RailsEventStoreActiveRecord::Legacy

    • no changes
  • v0.34.0 Changes

    November 23, 2018

    ๐Ÿš… RailsEventStore

    Add: New read API to filter read events by type event_store.read.of_type [#472]

     event\_store = RailsEventStore::Client.newTweetPosted = Class.new(RubyEventStore::Event) TweetRetweeted = Class.new(RubyEventStore::Event) TweetLiked = Class.new(RubyEventStore::Event) event\_store.publish(TweetPosted.new(event\_id: '54994b0e-4fe3-4d58-8ffe-16755fcbc635', data: { message: 'Hello from @RailsEventStore!' })) event\_store.publish(TweetRetweeted.new(event\_id: '3d67e05d-04c6-4771-bdcc-d22d385390cb', data: { ... })) event\_store.read.of\_type([TweetPosted]).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!"}\>] event\_store.read.of\_type([TweetLiked]).to\_a # =\> []
    

    ๐Ÿ”ง Change: RailsEventStore::Event#initialize no longer calls to_h on data: argument. Default value for this argument stays effectively the same (which is {}). One now has an option to pass struct or any other object as data, provided your configured mapper knows how to handle it for serialization [#395, #480]

    Add: Bring back RailsEventStore::Browser. This time not as a separate gem, rather a thin wrapper over RubyEventStore::Browser. It is no longer needed with rails_event_store to add browser as an explicit dependency. As a bonus RailsEventStore::Browser already has event_store_locator: pre-configured to typical Rails.configuration.event_store [#497]

    ๐Ÿš… The whole process of mounting Browser in Rails is as simple as following:

    Rails.application.routes.draw do mount RailsEventStore::Browser =\> '/res' if Rails.env.development?end
    

    ๐Ÿ’Ž RubyEventStore

    Add: New read API to filter read events by type event_store.read.of_type [#472]

     event\_store = RailsEventStore::Client.newTweetPosted = Class.new(RubyEventStore::Event) TweetRetweeted = Class.new(RubyEventStore::Event) TweetLiked = Class.new(RubyEventStore::Event) event\_store.publish(TweetPosted.new(event\_id: '54994b0e-4fe3-4d58-8ffe-16755fcbc635', data: { message: 'Hello from @RailsEventStore!' })) event\_store.publish(TweetRetweeted.new(event\_id: '3d67e05d-04c6-4771-bdcc-d22d385390cb', data: { ... })) event\_store.read.of\_type([TweetPosted]).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!"}\>] event\_store.read.of\_type([TweetLiked]).to\_a # =\> []
    

    Fix: Do not compare object instances of event id while looking for streams of event [#492]

    Fix: read.events([]) returning whole dataset of stored events [#498]

    ๐Ÿ”ง Change: RubyEventStore::Event#initialize no longer calls to_h on data: argument. Default value for this argument stays effectively the same (which is {}). One now has an option to pass struct or any other object as data, provided your configured mapper knows how to handle it for serialization [#395, #480]

    Add: Explicit RubyEventStore::ProtobufEncodingFailed raised when event's data is not serializable by RubyEventStore::Mappers::Protobuf [#481]

    Fix: RubyEventStore::Mappers::Default#serialized_record_to_event now symbolizes metadata keys. This helps when your serializer cannot distinguish symbols from strings (i.e. when you choose JSON as a serializer) [#367, #489]

    0๏ธโƒฃ When using RubyEventStore::Mappers::Default.new(serializer: JSON) it is advisable to make following or similar adjustment to your base Event class. That way you'll shield yourself from JSON turning symbols intro strings:

    class MyEvent \< RailsEventStore::Eventdef dataActiveSupport::HashWithIndifferentAccess.new(super) endendOrderPlaced = Class.new(MyEvent)
    

    ๐Ÿ”ง More on configuring a different serializer section.

    ๐Ÿš… RailsEventStoreActiveRecord

    Add: Support for filtering by event type [#472]

    ๐ŸŽ Add: New migration generator to add an index on event_type attribute. Strongly recommended to apply if you plan to use filtering by event types โ€” otherwise performance when using event_store.read.of_type(...) might be degraded. Added in default schema creation generator for new deployments. [#472]

    โš™ Running migration:

    rails g rails_event_store_active_record:index_by_event_type
    rails db:migrate
    

    ๐Ÿ‘‰ Feel free to inspect and change generated migration. Make sure to check if your RDBMS can run this migration online and whether that meets your operational requirements.
    https://dev.mysql.com/doc/refman/5.7/en/innodb-online-ddl-operations.html#online-ddl-index-operations

    Add: New migration generator to add a limit on event_id attribute in event_store_events_in_streams table. Applicable for MySQL and Sqlite databases. This migration is skipped on PostgreSQL. Feel free to skip this migration if it's too problematic to apply on existing data. Added in default schema creation generator for new deployments. [#479]

    โš™ Running migration:

    rails g rails_event_store_active_record:limit_for_event_id
    rails db:migrate
    

    ๐Ÿ‘‰ Feel free to inspect and change generated migration. Make sure to check if your RDBMS can run this migration online and whether that meets your operational requirements.
    https://dev.mysql.com/doc/refman/5.7/en/innodb-online-ddl-operations.html#online-ddl-column-operations

    Add: to_a implementation for read specification. Allows to avoid commonly used event_store.read.each.to_a by just using event_store.read.to_a. Also added to_a & first methods to BatchEnumerator. Closes #496. [#499]

    AggregateRoot

    • no changes

    ๐Ÿš… RailsEventStore::RSpec

    • no changes

    BoundedContext

    • no changes

    ๐Ÿ’Ž RubyEventStore::Browser

    Fix: Ensure Browser works with non-default metadata serialization [#491]

    Change: Provide default arguments to RubyEventStore::Browser::App.for for less required setup in typical use case [#483]

    Now only event_store_locator: is required when mounting Browser inside existing app.

    require 'ruby\_event\_store/browser/app'Rails.application.routes.draw do mount RubyEventStore::Browser::App.for( event\_store\_locator: -\> { Rails.configuration.event\_store }, ) =\> '/res' if Rails.env.development?end
    

    ๐Ÿ’Ž RubyEventStore::ROM

    • Support for filtering by event type [#472]

    ๐Ÿš… RailsEventStoreActiveRecord::Legacy

    • Support for filtering by event type [#472]