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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ee1025fea4fd2cf9558fdf7554c8720c8cd831d4
4
- data.tar.gz: b07d29c441529e5b5983d130137025f5355d225b
3
+ metadata.gz: 3272b273bb3bf13c03b95736f8d6e2a74ccb831b
4
+ data.tar.gz: c9f4b7d298effe10aa670808f7ac2766ee17bb2f
5
5
  SHA512:
6
- metadata.gz: 9223138a1d5d25342b4c1222a3d391da21ae370da7cf8c43fe5bc161642da0f2aa2c315b7fb6447fb683129e9fcbfb56031487cac6a941aba9eff965d57ff39a
7
- data.tar.gz: 51ee63194f201568b6d17d3621e8fcb2955c6c9194c30098404c22d130e5431ea4c2a3e91913cc5bead0fce60eb27c4cfaec4a5a445be1f082fa328bb6427d95
6
+ metadata.gz: a4b2e82a8c9cc75c3bcd27ea2456864d079324197140d933fa6266e2b8a5738ad26ad0feccc05d362e80f3e05aab62c958037e4c016507a86808a0a73989c52c
7
+ data.tar.gz: 23b31ebb2bfea25c83a1d6c6da434f58cbc23e8476af2dc77099bb75121532810be7d40f70c819d6d18da6dd78a20f517841dd36efc950c0454aa8104d0ca20a
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Oauth
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: xoauth
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - binz