contact_sync 1.2.2 → 1.3.0
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.
- checksums.yaml +4 -4
- data/lib/contact_sync/syncable.rb +3 -3
- data/lib/contact_sync/version.rb +1 -1
- data/lib/generators/install_contact_sync/install_contact_sync_generator.rb +6 -0
- data/lib/generators/install_contact_sync/templates/create_contact_sync_schema.rb +1 -1
- data/lib/generators/install_contact_sync/templates/remove_device_id_from_contacts.rb +7 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8dadaea4599c076a2b99da7bda45f1a316f819ce
|
4
|
+
data.tar.gz: 24c07d9d43befd1bb739af451c81cf2fb3e36cf7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0d290c1e3d9b5c467d960291a7f91e30723545ca8b768605bde389941056ed6a89638b86740a7343f641e125158dbdfb61eda0f9234df7cd628d67336a08ded8
|
7
|
+
data.tar.gz: 4ba78ab4b61d6f3b493ea3defa22de89ef726bb3d2fd077303a8f0b8a2f51bea65f623648098e9bb71d0c6f348caa68bdf749ffbb12c199ae1854f32dee9d066
|
@@ -18,9 +18,9 @@ module ContactSync
|
|
18
18
|
end
|
19
19
|
end
|
20
20
|
def sync_contacts(contact_hash = {})
|
21
|
-
result = {:new => {
|
21
|
+
result = {:new => {failed:[], duplicate: []}, modified: {failed:[]}, deleted: {failed:[]}}
|
22
22
|
raise ArgumentError, "You need to provide contacts hash." if contact_hash.blank?
|
23
|
-
raise ArgumentError, "You need to provide Device Identifier as deviceID" if contact_hash[:device_id].blank?
|
23
|
+
# raise ArgumentError, "You need to provide Device Identifier as deviceID" if contact_hash[:device_id].blank?
|
24
24
|
##########################################################################
|
25
25
|
#########################Create new Contacts##############################
|
26
26
|
if !contact_hash[:new].blank?
|
@@ -33,7 +33,7 @@ module ContactSync
|
|
33
33
|
aContact.delete :emails
|
34
34
|
begin
|
35
35
|
newContact = Contact.new(contact_params(aContact))
|
36
|
-
newContact.device_id = contact_hash[:device_id]
|
36
|
+
# newContact.device_id = contact_hash[:device_id]
|
37
37
|
if phones
|
38
38
|
phones.each do |aPhone|
|
39
39
|
newContact.phones.build(phone_params(aPhone))
|
data/lib/contact_sync/version.rb
CHANGED
@@ -14,6 +14,12 @@ class InstallContactSyncGenerator < Rails::Generators::Base
|
|
14
14
|
if !self.class.migration_exists?('db/migrate', 'create_contact_sync_schema')
|
15
15
|
migration_template "create_contact_sync_schema.rb", "db/migrate/create_contact_sync_schema.rb"
|
16
16
|
end
|
17
|
+
binding.pry
|
18
|
+
|
19
|
+
if !self.class.migration_exists?('db/migrate', 'remove_device_id_from_contacts')
|
20
|
+
migration_template "remove_device_id_from_contacts.rb", "db/migrate/remove_device_id_from_contacts.rb"
|
21
|
+
end
|
22
|
+
|
17
23
|
end
|
18
24
|
|
19
25
|
def generate_encrypted_strings_config
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: contact_sync
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Saad Masood
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-05-
|
11
|
+
date: 2015-05-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -121,6 +121,7 @@ files:
|
|
121
121
|
- lib/generators/install_contact_sync/templates/create_contact_sync_schema.rb
|
122
122
|
- lib/generators/install_contact_sync/templates/email.rb
|
123
123
|
- lib/generators/install_contact_sync/templates/phone.rb
|
124
|
+
- lib/generators/install_contact_sync/templates/remove_device_id_from_contacts.rb
|
124
125
|
- lib/generators/install_contact_sync/templates/routes.rb
|
125
126
|
- lib/generators/install_contact_sync/templates/user.rb
|
126
127
|
- lib/tasks/con_sync_tasks.rake
|