synced 1.1.1 → 1.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/synced/attributes_as_hash.rb +1 -1
- data/lib/synced/model.rb +2 -2
- data/lib/synced/strategies/full.rb +2 -2
- data/lib/synced/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: 6890aab53e44627ad247302ff300f2d161436a92
|
4
|
+
data.tar.gz: 65a59056502cdca3cde21ae58aa5f45eae9971b5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f14a1725b313847448388d1df28051c8d59ac2c4e420076490825a42d02493ea8f07194ca4ca88779c9de9759b610b10afd0bb0a0954cdb1a6adc88f0528ff68
|
7
|
+
data.tar.gz: 00b0999b39c3e4e6cf08eb02ccf076820b08915cbdd311d1d73710ddc44702b50ad5270981b737efe8ccab2711684b2f1bf777945f47f5c5b89bce612fa1a938
|
@@ -5,7 +5,7 @@ module Synced
|
|
5
5
|
# Used for mapping local - remote attributes
|
6
6
|
def synced_attributes_as_hash(attributes)
|
7
7
|
return attributes if attributes.is_a?(Hash)
|
8
|
-
Hash[Array(attributes).map { |name| [name, name] }]
|
8
|
+
Hash[Array.wrap(attributes).map { |name| [name, name] }]
|
9
9
|
end
|
10
10
|
end
|
11
11
|
end
|
data/lib/synced/model.rb
CHANGED
@@ -104,8 +104,8 @@ module Synced
|
|
104
104
|
options.assert_valid_keys(:api, :fields, :include, :remote, :remove,
|
105
105
|
:scope, :strategy, :search_params)
|
106
106
|
options[:remove] = synced_remove unless options.has_key?(:remove)
|
107
|
-
options[:include] = Array(synced_include) unless options.has_key?(:include)
|
108
|
-
options[:fields] = Array(synced_fields) unless options.has_key?(:fields)
|
107
|
+
options[:include] = Array.wrap(synced_include) unless options.has_key?(:include)
|
108
|
+
options[:fields] = Array.wrap(synced_fields) unless options.has_key?(:fields)
|
109
109
|
options[:search_params] = synced_search_params unless options.has_key?(:search_params)
|
110
110
|
options.merge!({
|
111
111
|
id_key: synced_id_key,
|
@@ -59,9 +59,9 @@ module Synced
|
|
59
59
|
options[:mapper].call : options[:mapper]
|
60
60
|
@fields = options[:fields]
|
61
61
|
@remove = options[:remove]
|
62
|
-
@associations = Array(options[:associations])
|
62
|
+
@associations = Array.wrap(options[:associations])
|
63
63
|
@perform_request = options[:remote].nil?
|
64
|
-
@remote_objects = Array(options[:remote]) unless @perform_request
|
64
|
+
@remote_objects = Array.wrap(options[:remote]) unless @perform_request
|
65
65
|
@globalized_attributes = synced_attributes_as_hash(options[:globalized_attributes])
|
66
66
|
@search_params = options[:search_params]
|
67
67
|
end
|
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.1.
|
4
|
+
version: 1.1.2
|
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: 2015-
|
12
|
+
date: 2015-10-05 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
@@ -207,7 +207,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
207
207
|
version: '0'
|
208
208
|
requirements: []
|
209
209
|
rubyforge_project:
|
210
|
-
rubygems_version: 2.4.
|
210
|
+
rubygems_version: 2.4.8
|
211
211
|
signing_key:
|
212
212
|
specification_version: 4
|
213
213
|
summary: Keep your BookingSync Application synced with BookingSync.
|