nali 0.3.8 → 0.3.9
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.
- data/lib/nali/connection.rb +7 -5
- data/lib/nali/version.rb +1 -1
- metadata +2 -2
data/lib/nali/connection.rb
CHANGED
@@ -65,11 +65,13 @@ module EventMachine
|
|
65
65
|
|
66
66
|
def sync( *models )
|
67
67
|
models.flatten.compact.each do |model|
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
68
|
+
if watch_time( model ) < model.updated_at.to_f or model.destroyed?
|
69
|
+
params, relations = model.get_sync_params( self )
|
70
|
+
unless params.empty?
|
71
|
+
if model.destroyed? then unwatch( model ) else watch_time_up model end
|
72
|
+
relations.each { |relation| sync relation }
|
73
|
+
send_json action: :sync, params: params
|
74
|
+
end
|
73
75
|
end
|
74
76
|
end
|
75
77
|
self
|
data/lib/nali/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nali
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.9
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-12-
|
12
|
+
date: 2014-12-22 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: thin
|