fourth_dimensional 0.1.3 → 0.1.4

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: bd985083ce9024db807bef1ddbf5083ce3a8c997697d3a2bf97933bbaf5b4417
4
- data.tar.gz: 270687dcbd4164e2ccf383161b9a220697bbcd449b2eae9e2051759868091df0
3
+ metadata.gz: 60974e26604856e42d5d48bb770de319d44b1d650350254056fe7cc1e24fc818
4
+ data.tar.gz: b9c942c1a71b36d078e0c461ac9c80081e54b4430ece24f61be7fc204b92eed4
5
5
  SHA512:
6
- metadata.gz: c529d06135fdc56d646534cb50cdb8a20bf45c7f07b047b623533282419e65e950ddf5dc2e57db6cccb452adfdb666d402fb7371c5401c4a2ab5667d7f00725a
7
- data.tar.gz: 4f3a9e988cdf927406a8b3641d0c04943b9eaf1290929fbe2a56ded8b538103cd5d3b8c8a2f7edc2465d24033d25d3485710216693729ede0f217795ab808de4
6
+ metadata.gz: 540ecee422c4bf127773213037e8b7dc5e1e13b718e8dfc0115770ea865efed1102a97fea413b95720d3ce53ad11e4eb40b7054cbe99ca1b03fd592117e2f04f
7
+ data.tar.gz: 448dcdbcde73e54b0319c2f43c1dfb9012d647119de492a34725aae9e18a45d7c7d8db8219ab052ce4e1f691de620700711e69900f97512476dcd5e7cd7f428e
@@ -32,6 +32,9 @@ module FourthDimensional
32
32
  # hash of data with stringified keys
33
33
  attr_reader :data, :metadata
34
34
 
35
+ # surrounding event associations
36
+ attr_reader :correlation_id, :causation_id
37
+
35
38
  # persisted event attributes
36
39
  attr_reader :id, :version, :created_at, :updated_at
37
40
 
@@ -56,6 +59,8 @@ module FourthDimensional
56
59
  def initialize(aggregate_id:,
57
60
  id: nil,
58
61
  version: nil,
62
+ correlation_id: nil,
63
+ causation_id: nil,
59
64
  created_at: nil,
60
65
  updated_at: nil,
61
66
  data: nil,
@@ -63,6 +68,8 @@ module FourthDimensional
63
68
  @aggregate_id = aggregate_id
64
69
  @id = id
65
70
  @version = version
71
+ @correlation_id = correlation_id
72
+ @causation_id = causation_id
66
73
  @created_at = created_at
67
74
  @updated_at = updated_at
68
75
  @data = (data || {}).transform_keys(&:to_s)
@@ -70,6 +70,8 @@ module FourthDimensional
70
70
  Event.create!(uuid: SecureRandom.uuid,
71
71
  aggregate_id: event.aggregate_id,
72
72
  version: version,
73
+ correlation_id: event.correlation_id,
74
+ causation_id: event.causation_id,
73
75
  event_type: event.type,
74
76
  data: event.data,
75
77
  metadata: event.metadata)
@@ -1,3 +1,3 @@
1
1
  module FourthDimensional
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fourth_dimensional
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Baylor Rae'