nm-gigya 0.1.2 → 0.1.3

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: '08dedb042027f017d213d93046184ee54df44a71'
4
- data.tar.gz: cca56000dce031c95a65fbc7eea6fcc6682b4f1c
3
+ metadata.gz: 3791e94761fc1f5e07cd8081694058a0399654b3
4
+ data.tar.gz: b67a57b93247c6615130693e3c0405f25ef8c8df
5
5
  SHA512:
6
- metadata.gz: 647521daf579395dbb2a7061a04a566ae78b84c5ebff76a30102b284846f8f2825b0314c5f6ea2eaf120f5fd654ca4f0663ced06d8428669c2338dd34c647b04
7
- data.tar.gz: 193a834dc918e0f9294604835116df78064fadfe77cc6b762d0f8c131a7d078e39bbf9619d66745f1ffa11c703968f5334bb85400bc33d632c7686291a4713e5
6
+ metadata.gz: 8039ea371c05ba68a372bba143103ef0e4809d791deadea6376c4d469d6300c4997bde8580c80dcb2dad101d521a69e1491a45da0b08151482ce1f1562eb36ba
7
+ data.tar.gz: dad283cec4dc6848fabc79ed9d2dec7db7e6f3af6f0d7c09bc09116e525b217345a7df54a78b674e0d853adf2980cbaf7b0fc6c1763fbebd2f3ed75ed130ecfc
@@ -0,0 +1,5 @@
1
+ class String
2
+ def to_gigya_user
3
+ Gigya::User.find(self)
4
+ end
5
+ end
data/lib/gigya/user.rb CHANGED
@@ -3,6 +3,21 @@ module Gigya
3
3
  attr_accessor :gigya_details
4
4
  attr_accessor :gigya_connection
5
5
 
6
+ @@default_gigya_user_class = nil
7
+ def self.default_gigya_user_class
8
+ @@default_gigya_user_class
9
+ end
10
+
11
+ def self.default_gigya_user_class=(val)
12
+ @@default_gigya_user_class = val
13
+ end
14
+
15
+ def self.from_string(str)
16
+ uc = @@default_gigya_user_class || Gigya::User
17
+ uc = Kernel.const_get(uc) if String === uc
18
+ uc.find(str)
19
+ end
20
+
6
21
  @@cache_options = {}
7
22
  def self.cache_options
8
23
  @@cache_options
data/lib/gigya.rb CHANGED
@@ -4,3 +4,4 @@ require "gigya/connection"
4
4
  require "gigya/controller_utils" if defined?(Rails)
5
5
  require "gigya/session"
6
6
  require "gigya/user"
7
+ require "gigya/extensions"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nm-gigya
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonathan Bartlett
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2018-08-14 00:00:00.000000000 Z
12
+ date: 2018-08-15 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: httparty
@@ -48,6 +48,7 @@ files:
48
48
  - lib/gigya.rb
49
49
  - lib/gigya/connection.rb
50
50
  - lib/gigya/controller_utils.rb
51
+ - lib/gigya/extensions.rb
51
52
  - lib/gigya/session.rb
52
53
  - lib/gigya/user.rb
53
54
  homepage: http://www.newmedio.com/