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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: cdb428e328ca8da932f79510c83a0605cc220bcc
4
- data.tar.gz: 70b0d79a78f4ed66802c5600dc18d5f5fa49d2d8
3
+ metadata.gz: 0021ca4bed72d3cd386b98c4f4cdef65ab6d5277
4
+ data.tar.gz: a52206eacb043fef69e95994b224f4a552036a94
5
5
  SHA512:
6
- metadata.gz: c6e6dfdc5295494cbeca0f90f02dfe17031ccc34c730f863d2c36b1a3fcf2cc27bdec9b39bc000832ad230bf93b50f073fe224a8ad24978e5dd97c5354add5e2
7
- data.tar.gz: d4e6b75d4ddcd2580cba514ddfbf83384949868208e3a3414c9ba5f264a86c8989d0fa43b1fecc1c8a005e0b86b8e25503d2264b73a88f8492afaed1c28ffada
6
+ metadata.gz: 3eeba4f9b2aefb6cbe52a2e7ec6d98b8edcae7d1bba11a7b4a80b968afe0ac85fff5899f3943a9a7d4f0bccd6810a3453c0209bd85d85be391b89e78ac2851a7
7
+ data.tar.gz: 68aab54995da6575c89fd1e653119d6bed35458994279e800fa7474fa6e06709e217d30b3aa7d05846e847fff33970d6988de70f7779914f1e9412dc00dcc65d
@@ -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)
@@ -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]) if options.has_key?(:remote)
56
+ @remote_objects = Array(options[:remote]) unless options[:remote].nil?
57
57
  @request_performed = false
58
58
  end
59
59
 
@@ -1,3 +1,3 @@
1
1
  module Synced
2
- VERSION = "1.0.0.rc1"
2
+ VERSION = "1.0.0.rc2"
3
3
  end
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.rc1
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-16 00:00:00.000000000 Z
12
+ date: 2014-08-18 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails