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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fa1e3c393c54802feb8922d6cd6501eba8bde3ce
4
- data.tar.gz: ef307ed7a4874805281cad24fdda6fde192feb9c
3
+ metadata.gz: ee1025fea4fd2cf9558fdf7554c8720c8cd831d4
4
+ data.tar.gz: b07d29c441529e5b5983d130137025f5355d225b
5
5
  SHA512:
6
- metadata.gz: 70ef44a8407263c1d55cd3b311da7f169950a7939c7adfbebd1ba7eb23dc2b3270fbfa8f149276d14aaa347593109ff1c5694bdebf9bee61ad063fa046cbd89a
7
- data.tar.gz: 2c797cec63abfeff48965cb6ca30e280f3cd6250718841fbeb1548a3a92cc07e91ae7854b1d447ee2e703b435bd41a0b6292aecbf23d129710d3a032997749f5
6
+ metadata.gz: 9223138a1d5d25342b4c1222a3d391da21ae370da7cf8c43fe5bc161642da0f2aa2c315b7fb6447fb683129e9fcbfb56031487cac6a941aba9eff965d57ff39a
7
+ data.tar.gz: 51ee63194f201568b6d17d3621e8fcb2955c6c9194c30098404c22d130e5431ea4c2a3e91913cc5bead0fce60eb27c4cfaec4a5a445be1f082fa328bb6427d95
data/lib/mongoid.rb ADDED
@@ -0,0 +1,4 @@
1
+ require "mongoid/xoauth"
2
+
3
+ module Mongoid
4
+ end
data/lib/oauth/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Oauth
2
- VERSION = "0.1.0"
2
+ VERSION = "0.2.0"
3
3
  end
@@ -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.1.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