synced 1.0.0.rc1 → 1.0.0.rc2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/synced/model.rb +2 -1
- data/lib/synced/synchronizer.rb +1 -1
- data/lib/synced/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0021ca4bed72d3cd386b98c4f4cdef65ab6d5277
|
4
|
+
data.tar.gz: a52206eacb043fef69e95994b224f4a552036a94
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3eeba4f9b2aefb6cbe52a2e7ec6d98b8edcae7d1bba11a7b4a80b968afe0ac85fff5899f3943a9a7d4f0bccd6810a3453c0209bd85d85be391b89e78ac2851a7
|
7
|
+
data.tar.gz: 68aab54995da6575c89fd1e653119d6bed35458994279e800fa7474fa6e06709e217d30b3aa7d05846e847fff33970d6988de70f7779914f1e9412dc00dcc65d
|
data/lib/synced/model.rb
CHANGED
@@ -28,6 +28,7 @@ module Synced
|
|
28
28
|
# You can also force method to remove local objects by passing it
|
29
29
|
# to remove: :mark_as_missing.
|
30
30
|
def synced(options = {})
|
31
|
+
options.symbolize_keys!
|
31
32
|
options.assert_valid_keys(:associations, :data_key, :fields, :id_key,
|
32
33
|
:include, :local_attributes, :mapper, :only_updated, :remove,
|
33
34
|
:synced_all_at_key)
|
@@ -80,9 +81,9 @@ module Synced
|
|
80
81
|
# Rental.synchronize(remote: remote_rentals, scope: website)
|
81
82
|
#
|
82
83
|
def synchronize(options = {})
|
84
|
+
options.symbolize_keys!
|
83
85
|
options.assert_valid_keys(:api, :fields, :include, :remote, :remove,
|
84
86
|
:scope)
|
85
|
-
options.symbolize_keys!
|
86
87
|
options[:remove] = synced_remove unless options.has_key?(:remove)
|
87
88
|
options[:include] = Array(synced_include) unless options.has_key?(:include)
|
88
89
|
options[:fields] = Array(synced_fields) unless options.has_key?(:fields)
|
data/lib/synced/synchronizer.rb
CHANGED
@@ -53,7 +53,7 @@ module Synced
|
|
53
53
|
@fields = options[:fields]
|
54
54
|
@remove = options[:remove]
|
55
55
|
@associations = Array(options[:associations])
|
56
|
-
@remote_objects = Array(options[:remote])
|
56
|
+
@remote_objects = Array(options[:remote]) unless options[:remote].nil?
|
57
57
|
@request_performed = false
|
58
58
|
end
|
59
59
|
|
data/lib/synced/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: synced
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.0.
|
4
|
+
version: 1.0.0.rc2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sebastien Grosjean
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-08-
|
12
|
+
date: 2014-08-18 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|