xoauth 0.2.0 → 0.2.1
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/mongoid/xoauth.rb +8 -8
- data/lib/oauth/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3272b273bb3bf13c03b95736f8d6e2a74ccb831b
|
|
4
|
+
data.tar.gz: c9f4b7d298effe10aa670808f7ac2766ee17bb2f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a4b2e82a8c9cc75c3bcd27ea2456864d079324197140d933fa6266e2b8a5738ad26ad0feccc05d362e80f3e05aab62c958037e4c016507a86808a0a73989c52c
|
|
7
|
+
data.tar.gz: 23b31ebb2bfea25c83a1d6c6da434f58cbc23e8476af2dc77099bb75121532810be7d40f70c819d6d18da6dd78a20f517841dd36efc950c0454aa8104d0ca20a
|
data/lib/mongoid/xoauth.rb
CHANGED
|
@@ -3,14 +3,6 @@ module Mongoid
|
|
|
3
3
|
extend ActiveSupport::Concern
|
|
4
4
|
included do
|
|
5
5
|
index "oauths.uid" => 1, "oauths._type" => 1
|
|
6
|
-
|
|
7
|
-
def find_by_oauth_uid(uid, klass)
|
|
8
|
-
where('oauths.uid' => uid.to_s, 'oauths._type' => klass.to_s).first
|
|
9
|
-
end
|
|
10
|
-
|
|
11
|
-
def oauth(klass)
|
|
12
|
-
self.oauths.find_by(_type: klass.to_s) # "Oauth::#{name.to_s.capitalize}"
|
|
13
|
-
end
|
|
14
6
|
end
|
|
15
7
|
|
|
16
8
|
module ClassMethods
|
|
@@ -21,5 +13,13 @@ module Mongoid
|
|
|
21
13
|
params.each_pair{|key, param| Oauth::Configure[key.to_s] = param}
|
|
22
14
|
end
|
|
23
15
|
end
|
|
16
|
+
|
|
17
|
+
def find_by_oauth_uid(uid, klass)
|
|
18
|
+
where('oauths.uid' => uid.to_s, 'oauths._type' => klass.to_s).first
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
def oauth(klass)
|
|
22
|
+
self.oauths.find_by(_type: klass.to_s) # "Oauth::#{name.to_s.capitalize}"
|
|
23
|
+
end
|
|
24
24
|
end
|
|
25
25
|
end
|
data/lib/oauth/version.rb
CHANGED