contact_sync 0.4.2 → 0.4.3
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c1ddea285e62aa0d36276b6d1b2bb215f1216626
|
4
|
+
data.tar.gz: acd0fc653a5ff5d483fae21374e1cbc39a2c56f7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6885051417e27f82129087f90d789640f3d6e5f9bed3170fd2514150bcfc478bb3f1d9f83f0df64611970ffb7d878940086c06fb71f844e44c209968b145028b
|
7
|
+
data.tar.gz: 76c5cb60ef3b2ea7867c9f52d9794458cccfeea0aba2c5f58a2baba73d0eda23e98644582356de6b201c6b45bac44958d14c1254271a10ce9855532f0e257272
|
@@ -93,12 +93,12 @@ module ContactSync
|
|
93
93
|
end
|
94
94
|
|
95
95
|
user_phones.each do |phone|
|
96
|
-
u = User.where(
|
97
|
-
matched_contacts << u unless u.blank?
|
96
|
+
u = User.where(encrypted_number: phone.number.encrypt(:symmetric)).limit(1).first
|
97
|
+
matched_contacts << u.id unless u.blank?
|
98
98
|
end
|
99
99
|
user_emails.each do |mail|
|
100
|
-
u = User.where(
|
101
|
-
matched_contacts << u unless u.blank?
|
100
|
+
u = User.where(encrypted_email: mail.email.encrypt(:symmetric)).limit(1).first
|
101
|
+
matched_contacts << u.id unless u.blank?
|
102
102
|
end
|
103
103
|
return matched_contacts
|
104
104
|
end
|
data/lib/contact_sync/version.rb
CHANGED
@@ -11,10 +11,7 @@ class InstallContactSyncGenerator < Rails::Generators::Base
|
|
11
11
|
|
12
12
|
def generate_migration
|
13
13
|
migration_template "create_contact_sync_schema.rb", "db/migrate/create_contact_sync_schema.rb"
|
14
|
-
|
15
|
-
|
16
|
-
def generate_routes
|
17
|
-
route(File.read(File.join(File.dirname(__FILE__), 'templates/routes.rb') ))
|
14
|
+
migration_template "change_email_encrypted_from_emails.rb", "db/migrate/change_emails_schema.rb"
|
18
15
|
end
|
19
16
|
|
20
17
|
# def generate_global_phone_db
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: contact_sync
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Saad Masood
|
@@ -89,6 +89,7 @@ files:
|
|
89
89
|
- lib/generators/install_contact_sync/USAGE
|
90
90
|
- lib/generators/install_contact_sync/install_contact_sync_generator.rb
|
91
91
|
- lib/generators/install_contact_sync/templates/address.rb
|
92
|
+
- lib/generators/install_contact_sync/templates/change_email_encrypted_from_emails.rb
|
92
93
|
- lib/generators/install_contact_sync/templates/contact.rb
|
93
94
|
- lib/generators/install_contact_sync/templates/create_contact_sync_schema.rb
|
94
95
|
- lib/generators/install_contact_sync/templates/email.rb
|