sync_attr_with_auth0 0.0.3 → 0.0.4

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: 28d6cfca51b11a00ab317f9073a6c468ce766c91
4
- data.tar.gz: 53566a7a330101e2ee36d5007e757393334dfc2d
3
+ metadata.gz: 0d91e1f95f9164f327378ca214c38e9dc7cfeeff
4
+ data.tar.gz: 8dede277728347ddbfb18e191770f4b6cbbb1495
5
5
  SHA512:
6
- metadata.gz: 9a703f54e191345eb816b6310b2700653f563e80946fcccaaa8d48a4da26583cdbbf6b61944a716261cd962a3c4627be9c3a9a0ff182716127267f15c8586e35
7
- data.tar.gz: 8f2cb379658f3f687016dd0f6ecbceb31372d52ba2ac00b533fa015e1866a2b88ba916d15f83127acdfcd90ad9c636706fea16746d9bf5035db6287c264d2978
6
+ metadata.gz: 5f10855707e6b307d3b14bb155ec8063ad66b7f11b5f75f5ae4c588bfebf57421301e91323ff10fe1e735183142fad9c82a7ce5373b48be0260fa27b21d6a3f2
7
+ data.tar.gz: 0dac005de720f5a62fc56810b41e2a531dac0c28ad50e4c83364969ee1272ea7e8407e27027781ed9d46b9e984ec6f31f71d6fb925353a5dbf41611245417cf5
@@ -49,7 +49,7 @@ module SyncAttrWithAuth0
49
49
  # If the email is being modified, verify the new email does not already
50
50
  # exist in auth0.
51
51
 
52
- ok_to_validate = (self.respond_to?(:validate_with_auth0) ? self.validate_with_auth0 : true)
52
+ ok_to_validate = (self.respond_to?(:validate_with_auth0) and !self.validate_with_auth0.nil? ? self.validate_with_auth0 : true)
53
53
 
54
54
  if ok_to_validate and self.email_changed?
55
55
  # Get an access token
@@ -69,7 +69,7 @@ module SyncAttrWithAuth0
69
69
  def create_user_in_auth0
70
70
  # When creating a new user, create the user in auth0.
71
71
 
72
- ok_to_sync = (self.respond_to?(:sync_with_auth0_on_create) ? self.sync_with_auth0_on_create : true)
72
+ ok_to_sync = (self.respond_to?(:sync_with_auth0_on_create) and !self.sync_with_auth0_on_create.nil? ? self.sync_with_auth0_on_create : true)
73
73
 
74
74
  if ok_to_sync
75
75
  # Get an access token
@@ -117,7 +117,7 @@ module SyncAttrWithAuth0
117
117
  end
118
118
 
119
119
  def sync_attr_with_auth0
120
- ok_to_sync = (self.respond_to?(:sync_with_auth0_on_update) ? self.sync_with_auth0_on_update : true)
120
+ ok_to_sync = (self.respond_to?(:sync_with_auth0_on_update) and !self.sync_with_auth0_on_update.nil? ? self.sync_with_auth0_on_update : true)
121
121
 
122
122
  if ok_to_sync
123
123
  # Look for matches between what's changing
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sync_attr_with_auth0
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Patrick McGraw