Releases: RailsEventStore/rails_event_store
v1.1.1
RailsEventStore
- no changes
RubyEventStore
- no changes
RailsEventStoreActiveRecord
- Change: Use Event.import instead of making N save calls [#749]
- Change: Use primary key value based offset for batched reads [#750]
- Fix: During encryption boolean values set to false have been replaced by nils - issue [#754] fixed in [04f33ea]
AggregateRoot
- no changes
RailsEventStore::RSpec
- no changes
BoundedContext
- no changes
RubyEventStore::Browser
- no changes
RubyEventStore::ROM
- no changes
v.1.1.0
RailsEventStore
- Change: Bump protobuf to at least 3.12.2 [65dea8f]
- Change: Do not use keyword args as last parameter in method calls [#635]
RubyEventStore
- Change: No-op for Projection when no handlers have been provided [d40829c]
- Change: Skip missing attributes when encrypting/decrypting event's payload [#743]
- Change: Bump protobuf to at least 3.12.2 [65dea8f]
- Allow to pass data and metadata instances to event linter [#734]
- Struct-like protobuf classes eql? and hash on board [protocolbuffers/protobuf/issues/4455] [4b0dab4]
RailsEventStoreActiveRecord
- no changes
AggregateRoot
- Change: Bump protobuf to at least 3.12.2 [65dea8f]
RailsEventStore::RSpec
- no changes
BoundedContext
- no changes
RubyEventStore::Browser
- Change: Dependencies upgrade [#744]
- Change: Don't display "Related streams" header on the bottom if the feature is not used [#731]
RubyEventStore::ROM
- Change: Do not use keyword args as last parameter in method calls [#635]
v1.0.0
Can you imagine this project has started in April, 2015? 5 years, 3496 commits from 54 contributors and 71 releases later we've finally reached version v1.0.0 ✨
Happy hacking with Rails Event Store!
PS. To be honest that could have happened much earlier 😅
v0.44.0
RailsEventStore
- no changes
RubyEventStore
-
Change: Make use of of_type in projections to skip irrelevant events [#709]
Closes: #681, #682, #569 -
Change: Minimize API: remove
to_h
fromRubyEventStore::Event
. [#726] -
Change: Rename
type
toevent_type
inRubyEventStore::Event
andRubyEventStore::Proto
to avoid asymmetry withRubyEventStore::SerializedRecord
. [#724]The
type
method will be kept for now for backward compatibility until another release. Generates a deprecation warning.
RailsEventStoreActiveRecord
- no changes
AggregateRoot
- no changes
RailsEventStore::RSpec
-
Add: New
apply
matcher for testing AggregateRoot.
Instead of checking what have_applied by aggregate action this matcher
will check what have applied during the action.aggregate = SomeAggregate.new aggregate.do_something expect { aggregate.do_anything_else }.to apply(an_event(SomeEvent)).in(aggregate)
More: https://railseventstore.org/docs/rspec/#aggregateroot-matchers
BoundedContext
- no changes
RubyEventStore::Browser
- Add: Possibility to specify a query which fetch related stream names. If some related stream names are present, then they are displayed in stream view [#676]
RubyEventStore::ROM
- no changes
v0.43.0
RailsEventStore
- no changes
RubyEventStore
-
Add:
RubyEventStore::Mappers::JSONMapper
mapper that plays well with Postgres JSON/JSONB indexed columns. [#651, #680] -
Change: Stricter
concurrent-ruby
version constraint to avoid releases causing segmentation fault. [#698, 088d015]
RailsEventStoreActiveRecord
- Change: Support recent changes in MySQL 8.0.x key violation messages. That change in MySQL accounted for some false
RubyEventStore::WrongExpectedEventVersion
errors. In addition to that change, we now test on both 5.7 and 8.0 series on MySQL database. [#697, 3b4250a]
AggregateRoot
-
Fix: Don't expect
OnDSL
methods when usingAggregateRoot.with_strategy
. [#678, #679, 4103f17]In particular case of non-strict
AggregateRoot::DefaultApplyStrategy
modification, one has to explicitly useAggregateRoot::OnDSL
:class MyAggregate include AggregateRoot.with_strategy(->{ DefaultApplyStrategy.new(strict: false) }) extend AggregateRoot::OnDSL end
Otherwise it is unlikely to ever need both
OnDSL
andwith_strategy
.
RailsEventStore::RSpec
- no changes
BoundedContext
- no changes
RubyEventStore::Browser
- Change: Avoid requiring
Sinatra::Application
which parses ARGV, even when used as a middleware. We rely onSinatra::Base
. [#675]
RubyEventStore::ROM
- no changes
v0.42.0
RailsEventStore
- no changes
RubyEventStore
- no changes
RailsEventStoreActiveRecord
- Add: Support Rails 6.0 [#669]
AggregateRoot
- no changes
RailsEventStore::RSpec
- no changes
BoundedContext
- no changes
RubyEventStore::Browser
-
Fix: No more incorrect links to streams and parent event, if RES browser was mounted under a subdirectory [#642, #655]
-
Remove: Stream browser link in top-right corner is no more [#657]
-
Add: Added a simple form (one input field) to go to arbitrary stream from stream browser [#662]
-
Change: Reorder pagination links, and instead not showing them, make the ones which are unavailable, disabled [#664]
-
Fix: Allow more than one browser instance [6b93c33]
RubyEventStore::ROM
- no changes
v0.41.0
RailsEventStore
-
Add:
RailsEventStore::AfterCommitAsyncDispatcher
detects when it is run inside non-joinable transaction. This opens the possibility to use it in transactional tests [#616]after_commit callbacks run after committing a transaction whose parent
is not joinable?: un-nested transactions, transactions within test cases,
and transactions in console --sandbox.
RubyEventStore
- Remove: Deprecated
RubyEventStore::PubSub:: Subscriptions
,RubyEventStore::PubSub:: Broker
,RubyEventStore::PubSub:: Dispatcher
andRubyEventStore::Mappers::MissingEncryptionKey
are gone [#634]
RailsEventStoreActiveRecord
- Change: Bump required
activerecord-import
dependency to support Rails 6.0.0.rc1 [#645] - Remove: Databse schema verification mechanism that activated on event repository initialization is gone [#644, 2d35c7d]
AggregateRoot
- no changes
RailsEventStore::RSpec
- no changes
BoundedContext
- no changes
RubyEventStore::Browser
- no changes
RubyEventStore::ROM
- no changes
v0.40.1
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
RailsEventStore
- no changes
RubyEventStore
-
Change:
RubyEventStore::Event#correlate_with
returnsself
to allow chaining [#601] -
Change: Deprecate
RubyEventStore::Mappers::MissingEncryptionKey
const. It has been moved toRubyEventStore::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 RubyEventStore module Mappers class Default < PipelineMapper def initialize(serializer: YAML, events_class_remapping: {}) super(Pipeline.new( transformations: [ Transformation::EventClassRemapper.new(events_class_remapping), Transformation::SymbolizeMetadataKeys.new, Transformation::Serialization.new(serializer: serializer), ] )) end end end end
module RubyEventStore module Mappers class EncryptionMapper < PipelineMapper def 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), ] )) end end end end
-
Change: All errors are now descendant of
RubyEventStore::Error
[#620] -
Change: Deprecate
RubyEventStore::PubSub::Dispatcher
,RubyEventStore::PubSub::Subscriptions
andRubyEventStore::PubSub::Broker
consts. They have been moved toRubyEventStore::Dispatcher
,RubyEventStore::Subscriptions
andRubyEventStore::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 onRubyEventStore::Event#type
[#578, #579] -
Add: New way to specify custom apply strategy [#584, #587, #597]
Was:
class OrderWithCustomStrategy include AggregateRoot def apply_strategy @apply_strategy ||= CustomOrderApplyStrategy.new end end
Is now:
class OrderWithCustomStrategy include 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 # ... end end module ResTesting OrderPaid = Google::Protobuf::DescriptorPool.generated_pool.lookup("res_testing.OrderPaid").msgclass end class Order include AggregateRoot on 'res_testing.OrderPaid' do |_event| @status = :paid end end 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
andAggregateRoot#store
are gone [1ea7d2f] -
Add: Instrumentation for
AggregateRoot::Repository#load
,AggregateRoot::Repository#store
andAggregateRoot::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 hardcodedRubyEventStore::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
androm-sql
dependencies. It may affect your project if you depend on those gems [#595]
v0.39.0
RailsEventStore
- Remove: Deprecated
from(:head)
has been removed from read specification. Whenfrom(event_id)
is not specified, we always read from head [#565]
RubyEventStore
-
Remove: Deprecated
from(:head)
has been removed from read specification. Whenfrom(event_id)
is not specified, we always read from head [#565] -
Change: New default cipher (
aes-256-gcm
) forRubyEventStore::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 NULL def self.serialized_record_to_event(record) record end def self.event_to_serialized_record(event) event end end
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.