entity_store_sequel 0.0.6 → 0.0.7
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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e2a414001d703072be6f5e520648088fe3f40862
|
4
|
+
data.tar.gz: e5a4843d072fb717697d0121b9b849c67d1374f2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 020d70b51d59a8046eb33ada3585e3aa33e69cc34b58feae3ac5d4c1d1625d390cded40216f57a7878fdb4bf03cda20839fa061a397fc9ff8f8eeb67f22733dc
|
7
|
+
data.tar.gz: 88fcad47ea08f82c28a6e841297a185f47e91e1f124fa44bd223feb5c5dcb443bf1f9f626ac7341e58e28e1cd1957dd07903e026bf8505f886a30a5458bc6c02
|
@@ -118,9 +118,11 @@ module EntityStoreSequel
|
|
118
118
|
doc = {
|
119
119
|
:id => id.to_s,
|
120
120
|
:_type => event.class.name,
|
121
|
-
:_entity_id =>
|
121
|
+
:_entity_id => event.entity_id.to_s,
|
122
122
|
:entity_version => event.entity_version,
|
123
|
-
:
|
123
|
+
:by => event.attributes[:by],
|
124
|
+
:at => event.attributes[:at],
|
125
|
+
:data => PigeonHole.generate(hash_without_keys(event.attributes, :entity_id, :by, :at)),
|
124
126
|
}
|
125
127
|
events.insert(doc)
|
126
128
|
end
|
@@ -216,6 +218,8 @@ module EntityStoreSequel
|
|
216
218
|
hash[:_id] = attrs[:id]
|
217
219
|
hash[:entity_version] = attrs[:entity_version]
|
218
220
|
hash[:entity_id] = attrs[:_entity_id]
|
221
|
+
hash[:by] = attrs[:by]
|
222
|
+
hash[:at] = attrs[:at]
|
219
223
|
EntityStore::Config.load_type(attrs[:_type]).new(hash)
|
220
224
|
rescue => e
|
221
225
|
log_error "Error loading type #{attrs[:_type]}", e
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: entity_store_sequel
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stephen Binns
|
@@ -91,6 +91,7 @@ files:
|
|
91
91
|
- lib/entity_store_sequel/version.rb
|
92
92
|
- lib/sequel/core_ext.rb
|
93
93
|
- lib/sequel/migrations/201608121657_create_entities_and_events.rb
|
94
|
+
- lib/sequel/migrations/201608231414_promote_by_and_at.rb
|
94
95
|
- lib/tasks/entity_store.rake
|
95
96
|
- spec/entity_store_sequel/postgres_entity_store_spec.rb
|
96
97
|
- spec/entity_store_spec.rb
|