nm-gigya 0.1.14 → 0.1.15
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/gigya/user.rb +6 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d45ae3c6badc359c1405f219c5dcfe3c228ca768abf9954fbe63ba0cf62749bc
|
4
|
+
data.tar.gz: 1f9ed3537bf1e987e47e16198b78bbba84bd7e60b12dd612b8ac590067e43fc5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e71a8446c76cb975dc1a43c9f853292de5f850c244bead0415eed61da67d4fd8080e50a3a511e428ed688105385c27d7be03b82677a16b8bff0271e68512e946
|
7
|
+
data.tar.gz: 2e9ab1c9c40387ab0d0dea7fbb006166c377e02689008b4522e40445068ddd8153522efba20c7cb81e514b244404e95724c7767dc04a08de3e05b67616a958db
|
data/lib/gigya/user.rb
CHANGED
@@ -95,17 +95,21 @@ module Gigya
|
|
95
95
|
return self.find(uid, opts)
|
96
96
|
end
|
97
97
|
|
98
|
-
def self.find(uid, opts = {}
|
98
|
+
def self.find(uid, opts = {}) # Find a Gigya account record by its UID attribute
|
99
99
|
opts = {} if opts.nil?
|
100
|
+
opts[:cache] = true if opts[:cache].nil?
|
100
101
|
|
101
102
|
cache_info = load_from_cache(uid)
|
102
|
-
if cache_info.present?
|
103
|
+
if cache_info.present? && opts[:cache]
|
103
104
|
return self.new(cache_info, false)
|
105
|
+
Rails.logger.warn("!!!!!!!!!!!!!!!!!!! CACHE HIT")
|
104
106
|
else
|
105
107
|
connection = opts[:connection] || Gigya::Connection.shared_connection
|
106
108
|
response = connection.api_get("accounts", "getAccountInfo", {UID: uid, include:"profile,data,subscriptions,userInfo,preferences", extraProfileFields:@@extra_profile_fields.join(",")})
|
107
109
|
obj = self.new(response)
|
108
110
|
obj.gigya_connection = connection
|
111
|
+
Rails.logger.warn("!!!!!!!!!!!!!!!!!!! NON HIT")
|
112
|
+
Rails.logger.warn(obj.to_s)
|
109
113
|
return obj
|
110
114
|
end
|
111
115
|
end
|