eternity 0.1.1 → 0.1.2

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: 9885515399a74eeec844fd7a809855e88b85d212
4
- data.tar.gz: 2bbb9ff78456c2e88b34b60b59bc7f18294388f4
3
+ metadata.gz: f76c2109a42456676af151b6a5cef12a74af248d
4
+ data.tar.gz: 3868000b435fe7980807d5ea3301d87378ec4602
5
5
  SHA512:
6
- metadata.gz: f8bd9bb7f5881c0fd6c1228cffad16bd6c7223203d82001d7396ffe51abe41c100afc8c48398c19d4a08a998736089f0abb721b7b4c24724c8549746bd36d1a0
7
- data.tar.gz: d97f7057417ec2bf6a50285d9061776907648d336b640fc7f9d0252553b0c251219c60b3e20494f4d9bb29c69178bb502945f31f06f3c957d3c99796d04d5ebe
6
+ metadata.gz: c56a780bfd908e067fa7477c381f0ccb5b0db796e6f8d57e52109db39ed5baa6dc16832229e7b7223add0d04fdd34da1121555c8e71490eccdfd5be0024ff6f4
7
+ data.tar.gz: 14a8b29628bce41a2886a5439ab10b28d8c07b523ee8886219b276d4b0f94add1340622d08d3b1183f00c8dddb037132ad35dccfcc11f4428c5c3de17900646f
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Eternity
2
- VERSION = '0.1.1'
2
+ VERSION = '0.1.2'
3
3
  end
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.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: 2015-11-04 00:00:00.000000000 Z
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.7
251
+ rubygems_version: 2.4.8
252
252
  signing_key:
253
253
  specification_version: 4
254
254
  summary: Distributed database version control system