xoauth 0.1.0 → 0.2.0
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.rb +4 -0
- data/lib/oauth/version.rb +1 -1
- data/spec/xoauth_spec.rb +26 -0
- metadata +5 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ee1025fea4fd2cf9558fdf7554c8720c8cd831d4
|
4
|
+
data.tar.gz: b07d29c441529e5b5983d130137025f5355d225b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9223138a1d5d25342b4c1222a3d391da21ae370da7cf8c43fe5bc161642da0f2aa2c315b7fb6447fb683129e9fcbfb56031487cac6a941aba9eff965d57ff39a
|
7
|
+
data.tar.gz: 51ee63194f201568b6d17d3621e8fcb2955c6c9194c30098404c22d130e5431ea4c2a3e91913cc5bead0fce60eb27c4cfaec4a5a445be1f082fa328bb6427d95
|
data/lib/mongoid.rb
ADDED
data/lib/oauth/version.rb
CHANGED
data/spec/xoauth_spec.rb
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
require 'mongoid'
|
2
|
+
require 'mongoid/xoauth'
|
3
|
+
require 'oauth'
|
4
|
+
|
5
|
+
class User
|
6
|
+
include Mongoid::Document
|
7
|
+
include Mongoid::Xoauth
|
8
|
+
|
9
|
+
xoauth weibo: {key: 'xxx', secret: 'xxx'}
|
10
|
+
end
|
11
|
+
|
12
|
+
|
13
|
+
describe Mongoid::Xoauth, 'Mongoid::Coauth' do
|
14
|
+
it "should include coauth" do
|
15
|
+
user = User.new
|
16
|
+
user.oauths << Oauth::Weibo.new
|
17
|
+
expect(Oauth::Configure.value["weibo"]).to_not eq(nil)
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
describe Oauth::Provider, "oauth provider" do
|
22
|
+
it "should contains methods" do
|
23
|
+
expect(Oauth::Provider.methods.include?(:get)).to eq(true)
|
24
|
+
expect(Oauth::Provider.methods.include?(:postJSON)).to eq(true)
|
25
|
+
end
|
26
|
+
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.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- binz
|
@@ -64,6 +64,7 @@ files:
|
|
64
64
|
- LICENSE.txt
|
65
65
|
- README.md
|
66
66
|
- Rakefile
|
67
|
+
- lib/mongoid.rb
|
67
68
|
- lib/mongoid/xoauth.rb
|
68
69
|
- lib/oauth.rb
|
69
70
|
- lib/oauth/configure.rb
|
@@ -74,6 +75,7 @@ files:
|
|
74
75
|
- lib/oauth/provider/weixin.rb
|
75
76
|
- lib/oauth/version.rb
|
76
77
|
- oauth.gemspec
|
78
|
+
- spec/xoauth_spec.rb
|
77
79
|
homepage: ''
|
78
80
|
licenses:
|
79
81
|
- MIT
|
@@ -98,4 +100,5 @@ rubygems_version: 2.2.2
|
|
98
100
|
signing_key:
|
99
101
|
specification_version: 4
|
100
102
|
summary: Chinese Social Network Oauth2.0 Implemetation.
|
101
|
-
test_files:
|
103
|
+
test_files:
|
104
|
+
- spec/xoauth_spec.rb
|