eventsimple 1.2.0 → 1.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c32b996ad44adbf1ae144adaa855a70d23c68286ff64e3bc633f8af98517c1f6
4
- data.tar.gz: 8de726b86bb3fcd0b30c1f580168abfa069f7a9910fc72ce1a5f943da624fb6c
3
+ metadata.gz: 985c47a587ea7f6476248e8c5b6257d51482f41832bb6055e6da514e4dbd8914
4
+ data.tar.gz: 809b1c8d0b3f21b4d4765cd06530e4dedea076ebd3c07b5a027d7822f5bb226f
5
5
  SHA512:
6
- metadata.gz: d85d69406ceb52536ee95b74449fcca0fcb592b58dd8497288c60072945550df3824e5c2ef9e4ffd2b7ae7d32cbd00a023c6a5d7314b5fd55ca6132b5dde9904
7
- data.tar.gz: 8ccffafa78b30f253e1e47e90f747bfa3ddd240aba2269dd7952e48016fa58750f976b13afe7624318c2146e9447fe32c85516daca371d4b5d127a92dd896890
6
+ metadata.gz: 86d4bb8d7a529d14f287ad54242b2e3c7b305fb6092981e84412b9854bc8c76566d781e122147f9522a7a40da77d57d82a60757e441bedf307a8b72697f36727
7
+ data.tar.gz: 0e18b342e6ad42462e35101ff10a9890962cd540a3142c8d7cd8d9f87e2ee862d89fb8d9e52a01695728099f526caf14331a2ab4d9b1dd87bc517cb77af42821
data/CHANGELOG.md CHANGED
@@ -6,6 +6,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
6
6
 
7
7
  ## Unreleased
8
8
 
9
+ ## 1.2.1 - 2023-11-18
10
+ ### Changed
11
+ - Allow timestamp data in events to override default timestamps update.
12
+ - This allows us to create temporal events for example in the case of snapshots.
13
+
9
14
  ## 1.2.0 - 2023-09-26
10
15
  ### Changed
11
16
  - Fix issue where the reactor worker might not work correctly for models not inheriting from ApplicationRecord.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- eventsimple (1.2.0)
4
+ eventsimple (1.2.1)
5
5
  dry-struct (~> 1.6)
6
6
  dry-types (~> 1.7)
7
7
  pg (~> 1.4)
@@ -89,7 +89,7 @@ GEM
89
89
  coderay (1.1.3)
90
90
  concurrent-ruby (1.2.2)
91
91
  crass (1.0.6)
92
- date (3.3.3)
92
+ date (3.3.4)
93
93
  diff-lcs (1.5.0)
94
94
  dry-core (1.0.1)
95
95
  concurrent-ruby (~> 1.0)
@@ -158,12 +158,12 @@ GEM
158
158
  mini_mime (1.1.5)
159
159
  minitest (5.20.0)
160
160
  nenv (0.3.0)
161
- net-imap (0.3.7)
161
+ net-imap (0.4.5)
162
162
  date
163
163
  net-protocol
164
164
  net-pop (0.1.2)
165
165
  net-protocol
166
- net-protocol (0.2.1)
166
+ net-protocol (0.2.2)
167
167
  timeout
168
168
  net-smtp (0.4.0)
169
169
  net-protocol
@@ -300,7 +300,7 @@ GEM
300
300
  lint_roller (~> 1.0)
301
301
  rubocop-rails (~> 2.20.2)
302
302
  thor (1.2.2)
303
- timeout (0.4.0)
303
+ timeout (0.4.1)
304
304
  treetop (1.6.12)
305
305
  polyglot (~> 0.3)
306
306
  tzinfo (2.0.6)
data/README.md CHANGED
@@ -176,8 +176,6 @@ module UserComponent
176
176
  def apply(user)
177
177
  user.canonical_id = data.canonical_id
178
178
  user.email = data.email
179
-
180
- user
181
179
  end
182
180
  end
183
181
  end
@@ -35,8 +35,8 @@ module Eventsimple
35
35
  assign_attributes(self.class.column_defaults.except(*ignore_props))
36
36
 
37
37
  event_history.each do |event|
38
- event.apply(self)
39
38
  event.apply_timestamps(self)
39
+ event.apply(self)
40
40
  end
41
41
 
42
42
  self
@@ -86,8 +86,8 @@ module Eventsimple
86
86
 
87
87
  # Apply the transformation to the aggregate and save it.
88
88
  def apply_and_persist
89
- apply(aggregate)
90
89
  apply_timestamps(aggregate)
90
+ apply(aggregate)
91
91
 
92
92
  # Persist!
93
93
  aggregate.save!
@@ -45,3 +45,5 @@ RSpec.shared_examples 'an event in invalid state that is rescued' do
45
45
  end
46
46
  end
47
47
  end
48
+
49
+ RSpec::Matchers.define_negated_matcher(:not_change, :change)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Eventsimple
4
- VERSION = '1.2.0'
4
+ VERSION = '1.2.1'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: eventsimple
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Zulfiqar Ali
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-09-26 00:00:00.000000000 Z
11
+ date: 2023-11-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dry-struct