eternity 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/eternity/delta.rb +1 -1
- data/lib/eternity/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f76c2109a42456676af151b6a5cef12a74af248d
|
4
|
+
data.tar.gz: 3868000b435fe7980807d5ea3301d87378ec4602
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c56a780bfd908e067fa7477c381f0ccb5b0db796e6f8d57e52109db39ed5baa6dc16832229e7b7223add0d04fdd34da1121555c8e71490eccdfd5be0024ff6f4
|
7
|
+
data.tar.gz: 14a8b29628bce41a2886a5439ab10b28d8c07b523ee8886219b276d4b0f94add1340622d08d3b1183f00c8dddb037132ad35dccfcc11f4428c5c3de17900646f
|
data/lib/eternity/delta.rb
CHANGED
@@ -18,12 +18,12 @@ module Eternity
|
|
18
18
|
union(deltas).each_with_object({}) do |(collection, elements), hash|
|
19
19
|
hash[collection] = {}
|
20
20
|
elements.each do |id, changes|
|
21
|
-
base_data = base_index[collection].include?(id) ? base_index[collection][id].data : {}
|
22
21
|
changes.each do |change|
|
23
22
|
current_change = change
|
24
23
|
if hash[collection][id]
|
25
24
|
current_change = TrackFlatter.flatten [hash[collection][id], change]
|
26
25
|
if current_change && [INSERT, UPDATE].include?(current_change['action'])
|
26
|
+
base_data = base_index[collection].include?(id) ? base_index[collection][id].data : {}
|
27
27
|
current_change['data'] = ConflictResolver.resolve hash[collection][id]['data'] || base_data,
|
28
28
|
change['data'],
|
29
29
|
base_data
|
data/lib/eternity/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: eternity
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gabriel Naiman
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-01-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: redic
|
@@ -248,7 +248,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
248
248
|
version: '0'
|
249
249
|
requirements: []
|
250
250
|
rubyforge_project:
|
251
|
-
rubygems_version: 2.4.
|
251
|
+
rubygems_version: 2.4.8
|
252
252
|
signing_key:
|
253
253
|
specification_version: 4
|
254
254
|
summary: Distributed database version control system
|