evt-entity_snapshot-postgres 0.2.3.0 → 0.2.3.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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5f1e45522e538e0899350fe315e1a0d47c4c6768d25696a99e7359bfc9b1d893
|
4
|
+
data.tar.gz: 3ebb45c7ad6f536ee1e32c12184adff0f54da166634fa89debc2704188258a97
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '09a6795bc10563650e66d7b964c9e8843f6f3a5f319de9fceea702c86807171d52d937f2f6b8856c3bba5f680b575787d493d34bb9ebc68f77adad2c5ff25df9'
|
7
|
+
data.tar.gz: 02f88f8c95d31b2919a45e06b77f2bcced6423a08171f200586d34f2be731bfc081f0a96bb76768f5dbd00b83d96091000c9a065229c188316ea0c5d4eaa2432
|
@@ -0,0 +1 @@
|
|
1
|
+
lib/entity_snapshot/postgres.rb
|
@@ -24,7 +24,17 @@ module EntitySnapshot
|
|
24
24
|
entity = Transform::Read.instance(entity_data, entity_class)
|
25
25
|
|
26
26
|
version = event_data.data[:entity_version]
|
27
|
-
|
27
|
+
|
28
|
+
time = event_data.data[:time]
|
29
|
+
|
30
|
+
# Backward compatibility for messages not written with
|
31
|
+
# a timestamp in the message data
|
32
|
+
# Sat Oct 13, Scott Bellware
|
33
|
+
if time.nil?
|
34
|
+
time ||= event_data.time
|
35
|
+
else
|
36
|
+
time = Time.parse(time)
|
37
|
+
end
|
28
38
|
|
29
39
|
logger.debug(tags: [:snapshot, :cache, :get]) { "Read snapshot (Stream: #{stream_name.inspect}, Entity Class: #{entity_class.name}, Version: #{version.inspect}, Time: #{time.utc.iso8601(3)})" }
|
30
40
|
|
@@ -41,9 +41,12 @@ module EntitySnapshot
|
|
41
41
|
|
42
42
|
event_data = MessageStore::MessageData::Write.new
|
43
43
|
|
44
|
+
iso8601_time = Clock::UTC.iso8601(time)
|
45
|
+
|
44
46
|
data = {
|
45
47
|
entity_data: entity_data,
|
46
|
-
entity_version: version
|
48
|
+
entity_version: version,
|
49
|
+
time: iso8601_time
|
47
50
|
}
|
48
51
|
|
49
52
|
event_data.type = 'Recorded'
|
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.2.3.
|
4
|
+
version: 0.2.3.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: 2018-10-
|
11
|
+
date: 2018-10-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: evt-entity_store
|
@@ -58,6 +58,7 @@ executables: []
|
|
58
58
|
extensions: []
|
59
59
|
extra_rdoc_files: []
|
60
60
|
files:
|
61
|
+
- lib/entity_snapshot/loader.rb
|
61
62
|
- lib/entity_snapshot/postgres.rb
|
62
63
|
- lib/entity_snapshot/postgres/controls.rb
|
63
64
|
- lib/entity_snapshot/postgres/controls/batch.rb
|
@@ -77,7 +78,6 @@ files:
|
|
77
78
|
- lib/entity_snapshot/postgres/log.rb
|
78
79
|
- lib/entity_snapshot/postgres/postgres.rb
|
79
80
|
- lib/entity_snapshot/postgres/read_only.rb
|
80
|
-
- lib/entity_snapshot/postgres/recorded.rb
|
81
81
|
- lib/entity_snapshot/postgres/stream_name.rb
|
82
82
|
homepage: https://github.com/eventide-project/entity-snapshot-postgres
|
83
83
|
licenses:
|
@@ -99,7 +99,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
99
99
|
version: '0'
|
100
100
|
requirements: []
|
101
101
|
rubyforge_project:
|
102
|
-
rubygems_version: 2.7.
|
102
|
+
rubygems_version: 2.7.3
|
103
103
|
signing_key:
|
104
104
|
specification_version: 4
|
105
105
|
summary: Projected entity snapshotting for Postgres
|