nd_sync 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/nd_sync/remote.rb +5 -2
- data/nd_sync.gemspec +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6646e32177aa52c7e5899647656c29329ebaad9d
|
4
|
+
data.tar.gz: e665f4fb6c5727bbeaa7cd68cf7f34c778a39874
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 07ba8f37f670adf5722312eaf072a2b4355fb775f94c7c5d32f0819c8600ab27a76a9396a069525ed57d141f6bf3e719163a5f51a3dc9da29a8aab101b6b1a45
|
7
|
+
data.tar.gz: e66ae84e9b28c14eebe1181d5cfc78cab83da171bfdb1239dbff3bdf3e1c378a08b23cd3bccaccbc527d6ec63eaa163a70279cbf0cc61d9c764de79d129c0e66
|
data/lib/nd_sync/remote.rb
CHANGED
@@ -18,12 +18,15 @@ module NdSync
|
|
18
18
|
end
|
19
19
|
|
20
20
|
def receive(locals)
|
21
|
-
|
22
|
-
JSON.parse(response.body).each_with_index do |remote_hash, idx|
|
21
|
+
JSON.parse(post_batch(locals).body).each_with_index do |remote_hash, idx|
|
23
22
|
locals[idx].transmitted_to new(remote_hash)
|
24
23
|
end
|
25
24
|
end
|
26
25
|
|
26
|
+
def post_batch(locals)
|
27
|
+
post(:batch, {}, to_batch(transcribe_all(locals)))
|
28
|
+
end
|
29
|
+
|
27
30
|
def to_batch(collection)
|
28
31
|
Jbuilder.encode do |json|
|
29
32
|
json.set! collection_name do
|
data/nd_sync.gemspec
CHANGED