evt-entity_store 2.0.3.1 → 2.0.4.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: 491ae82f254dd60d09f42952e9787d8bade2783966e8e57d9d8e89b60ded9f88
4
- data.tar.gz: ee505308f7395f98cf3d19e7abfa4e4b5adaece43f1592991be0cf8905910588
3
+ metadata.gz: 48eaa23ecf85051896b35b0b3e43a7bbcb8e750a6b4e56e2e1fbe819e5525a4e
4
+ data.tar.gz: 5312a1e77d1d874c47e602967f0d6e81d8581fdaa0144ad0c7f8b0c2a2570bf9
5
5
  SHA512:
6
- metadata.gz: 7c4011da0e663ab309e8ca8ee1f706f62404e5121b7b8d0a44ecb3418e3ce718366bb93dda1ad3ff5ece93d8df62e99b8e60d431a2e0f2d990e6c727416f4dca
7
- data.tar.gz: 799a8a65e4174d186585fbfb7095f0c2e3397ae72078f12bf0050ca009421f72e7f09ae7ee6b7f20a14d4d9a4af3ffa0684e1659985f75d0a1226a3dc95828b7
6
+ metadata.gz: bc026a3de1ddd0d67017a3db1fe8ee9ea10fa761d6c2a39a883556cf7987e5c8f862ea8bfe376a2ea4e8e05bbd4e7b0181cde9892dfed05ad9b5b1bbb3734879
7
+ data.tar.gz: 313c80ab136ac5565a3d217fee4f30e91b77485d02b56a0cbc218284723ab73421c1a539993f013409601204e440c9b3eec9a3a62df7711cf52f6f2b950e5c9c
@@ -5,7 +5,7 @@ module EntityStore
5
5
  cls.class_exec do
6
6
  include Configure
7
7
  include Dependency
8
- include Virtual
8
+ include TemplateMethod
9
9
 
10
10
  include Log::Dependency
11
11
  include Messaging::Category
@@ -27,14 +27,14 @@ module EntityStore
27
27
 
28
28
  attr_accessor :category
29
29
  attr_accessor :specifier
30
+ attr_accessor :snapshot_interval
30
31
 
31
- virtual :reader_class
32
- virtual :projection_class
33
- virtual :reader_batch_size
34
- virtual :snapshot_class
35
- virtual :snapshot_interval
32
+ template_method :reader_class
33
+ template_method :projection_class
34
+ template_method :reader_batch_size
35
+ template_method :snapshot_class
36
36
 
37
- virtual :configure
37
+ template_method :configure
38
38
 
39
39
  extend Build
40
40
  extend EntityMacro
@@ -59,11 +59,14 @@ module EntityStore
59
59
  instance.specifier = specifier unless specifier.nil?
60
60
  specifier ||= instance.specifier
61
61
 
62
+ instance.snapshot_interval = snapshot_interval unless snapshot_interval.nil?
63
+ snapshot_interval ||= instance.snapshot_interval
64
+
62
65
  EntityCache.configure(
63
66
  instance,
64
67
  entity_class,
65
68
  specifier,
66
- persist_interval: instance.snapshot_interval,
69
+ persist_interval: snapshot_interval,
67
70
  external_store: instance.snapshot_class,
68
71
  external_store_session: session,
69
72
  attr_name: :cache
@@ -256,7 +259,7 @@ module EntityStore
256
259
  end
257
260
 
258
261
  define_method :snapshot_interval do
259
- interval
262
+ @snapshot_interval ||= interval
260
263
  end
261
264
  end
262
265
  alias_method :snapshot, :snapshot_macro
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: evt-entity_store
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.3.1
4
+ version: 2.0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - The Eventide Project
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-12-08 00:00:00.000000000 Z
11
+ date: 2024-04-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: evt-entity_projection
@@ -95,7 +95,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0'
97
97
  requirements: []
98
- rubygems_version: 3.1.4
98
+ rubygems_version: 3.4.10
99
99
  signing_key:
100
100
  specification_version: 4
101
101
  summary: Project and cache entities from event streams, with optional on-disk snapshotting