eventsimple 1.7.5 → 1.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: dcc62305534d407f35ebaa4f07c72c57a70d798c6987e527375149706bd5a46a
4
- data.tar.gz: 2f85b2c81c5c12aac6b224b6358de9988c49b8fa16cb5e045fb2cd9c35ec3aba
3
+ metadata.gz: 749605423a8d0f6c0cf7afc5f732a0860965ffe2c45ba0a3bcebfd82aaeacee4
4
+ data.tar.gz: 2ea129358411d3ca0deb072540f960326b7a31e26535d4f3413f0c2355f6baa0
5
5
  SHA512:
6
- metadata.gz: 52948fcca87c9eecaae631496f5421dec4e3b9a040b2d5184c7b30d3957e20efe0a8d62c40ee5ec04a33ea4674ee548928797f6ba819a5173eb8425a3820d27e
7
- data.tar.gz: 59209327f2ac7de19da2053939b01b69ed00a52c98ba98958ba68345806f1de245558a9e4d3cf16e9273e3d9b6c5217a451494865e1896eb10d56d6ccb3a77ad
6
+ metadata.gz: 6320a5402ba8ab2e1cd20efa6a3c5e1f56c8c0210e0a0f4335170b5701800a861e642b1e860a4b4ca5a991bf52da7c5490b72aa57da3bb23a29ea6ebe2ff5adb
7
+ data.tar.gz: 6948417d9710a262e750175e8e680b94cdfdd75a309a42916aa8dfc302cf081998e8f9940a69909a606528c31cf35de46fb5c7407aed6a86ab074565db673403
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 3.4.4
1
+ 3.4.7
data/CHANGELOG.md CHANGED
@@ -6,6 +6,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
6
6
 
7
7
  ## Unreleased
8
8
 
9
+ ## 1.8.1 - 2025-12-05
10
+ ### Changed
11
+ - Remove having to redefine the custom data type on each event class. We now correctly define it in the Event mixin.
12
+
13
+ ## 1.8.0 - 2025-11-11
14
+ ### Changed
15
+ - Optimistic locking column is now required. Eventsimple will now raise an error if the optimistic locking column is not found.
16
+ - For existing event driven models, add the lock_version column before upgrading to this version.
17
+ - When enabling eventsimple on an existing model, add the lock_version column before enabling optimistic locking.
18
+
9
19
  ## 1.7.5 - 2025-09-15
10
20
  ### Changed
11
21
  - Reduce optimistic locking column check to a warning instead of an error.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- eventsimple (1.7.5)
4
+ eventsimple (1.8.1)
5
5
  concurrent-ruby (>= 1.2.3)
6
6
  dry-struct (~> 1.6)
7
7
  dry-types (~> 1.7)
data/README.md CHANGED
@@ -157,7 +157,6 @@ module UserComponent
157
157
  module Events
158
158
  class Created < UserEvent
159
159
  # Optional: Rails by default will use JSON serialization for the data attribute. Use Eventsimple::DataType to serialize/deserialize the data attribute using the Message subclass below which uses dry-struct.
160
- attribute :data, Eventsimple::DataType.new(self)
161
160
 
162
161
  class Message < Eventsimple::Message
163
162
  attribute :canonical_id, DryTypes::Strict::String
@@ -7,7 +7,7 @@ module Eventsimple
7
7
  def event_driven_by(event_klass, aggregate_id:, filter_attributes: [])
8
8
  begin
9
9
  if table_exists? && !column_names.include?(locking_column)
10
- warn "Warning: A #{locking_column} column is required to enable optimistic locking in table #{table_name}"
10
+ raise ArgumentError, "A #{locking_column} column is required to enable eventsimple on this model."
11
11
  end
12
12
 
13
13
  if defined?(event_klass._aggregate_id) && event_klass.table_exists? && table_exists?
@@ -128,6 +128,11 @@ module Eventsimple
128
128
  end
129
129
 
130
130
  module ClassMethods
131
+ def inherited(subclass)
132
+ super
133
+ subclass.attribute :data, Eventsimple::DataType.new(subclass)
134
+ end
135
+
131
136
  def validate_with(form_klass)
132
137
  @validate_with = form_klass
133
138
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Eventsimple
4
- VERSION = '1.7.5'
4
+ VERSION = '1.8.1'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: eventsimple
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.5
4
+ version: 1.8.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Zulfiqar Ali
@@ -386,7 +386,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
386
386
  - !ruby/object:Gem::Version
387
387
  version: '0'
388
388
  requirements: []
389
- rubygems_version: 3.6.7
389
+ rubygems_version: 3.6.9
390
390
  specification_version: 4
391
391
  summary: Event sourcing toolkit using Rails and ActiveJob
392
392
  test_files: []