evt-entity_snapshot-postgres 0.3.0.1 → 0.3.1.0

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: 657802b75a3aefc2eb0957b9abebbda65240f070f91fee809026292f128d3c65
4
- data.tar.gz: de7eceb48eed1f076656684a9b50a33909c415362afb50c85709564f0c88ae40
3
+ metadata.gz: 4bd37b41e9088ffe8392748646225cf365f0faabcc65f9ebcc171e8b234211f8
4
+ data.tar.gz: 2cd2daf83553c5d56fe1709d59c8bd736f381cc1fc000cb7133cdb789daa1f59
5
5
  SHA512:
6
- metadata.gz: 361e870b0b1ed5eeab677dbe33cdacffce3f1f6f161574f2128628efe25c6a2748d704605a1b355c98d3362a3a8395a7dd37f30ff56763068a525032a7501da2
7
- data.tar.gz: f99f98cc510a329f8a052be64c22830f49d524807f90fe1d7d6aa03e6622ed6426b152c42077ce89b146d7145cf5675a3c62be3d02394973078916f531b90dbe
6
+ metadata.gz: 37ad7974acf3f4857fd133c05b501720c173d2003027d0c99789630a1584768046c8af30187b370f029506899667b31848aebaa77a63ab2b24c3a60d75871eea
7
+ data.tar.gz: b8e34fea890a25e3538fb7e61c8bbb647deeda031ef9a514136e6883844647edabb48a653be353091c622bef311d87ae70b8f34883209e55b519a8e9ed85114a
@@ -9,6 +9,20 @@ module EntitySnapshot
9
9
  category ||= 'example'
10
10
  ::EntityStore::Controls::EntityStore.example(category: category, entity_class: entity_class, projection_class: projection_class, reader_class: reader_class, snapshot_class: snapshot_class, snapshot_interval: snapshot_interval)
11
11
  end
12
+
13
+ module Assurance
14
+ def self.example(snapshot_class: nil, snapshot_interval: nil)
15
+ Example.new.tap do |instance|
16
+ instance.snapshot_class = snapshot_class
17
+ instance.snapshot_interval = snapshot_interval
18
+ end
19
+ end
20
+
21
+ Example = Struct.new(
22
+ :snapshot_class,
23
+ :snapshot_interval
24
+ )
25
+ end
12
26
  end
13
27
  end
14
28
  end
@@ -57,6 +57,12 @@ module EntitySnapshot
57
57
  position
58
58
  end
59
59
 
60
+ def self.assure(store)
61
+ if [store.snapshot_class, store.snapshot_interval].include?(nil)
62
+ raise EntityCache::Store::External::Error
63
+ end
64
+ end
65
+
60
66
  Error = Class.new(RuntimeError)
61
67
  end
62
68
  end
@@ -25,6 +25,12 @@ module EntitySnapshot
25
25
 
26
26
  def put(*)
27
27
  end
28
+
29
+ def self.assure(store)
30
+ if store.snapshot_class.nil?
31
+ raise EntityCache::Store::External::Error
32
+ end
33
+ end
28
34
  end
29
35
  end
30
36
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: evt-entity_snapshot-postgres
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0.1
4
+ version: 0.3.1.0
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: 2018-10-14 00:00:00.000000000 Z
11
+ date: 2018-10-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: evt-entity_store