omniauth-gitbook 0.0.2 → 0.0.3
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/gitbook/version.rb +1 -1
- data/lib/omniauth-gitbook.rb +2 -0
- data/lib/omniauth/strategies/gitbook.rb +6 -3
- data/spec/spec_helper.rb +1 -1
- metadata +3 -3
- data/lib/omni-gitbook.rb +0 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 88f2efbb37098ea4476be249a3a7a98476223541
|
4
|
+
data.tar.gz: 45245ce8f54ac17456536dcf59e93f380fed3929
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0ee59f8e359e3f54ebe3bd84a31460c7f09ae71c01eabd133dec96cf42c8a06aea33a70c78d61a60f543de5b8895ae7e17eed47dae854889e51802ead206d9cf
|
7
|
+
data.tar.gz: 600edcb4abd56aa168b5c28597ee4b7547091c74d1330117bea6f6ad378cb69da94f7642533c7202cf62b33329544de8230ad2ba219d9442bad4f9bf19fc5880
|
data/lib/gitbook/version.rb
CHANGED
@@ -5,7 +5,6 @@ module OmniAuth
|
|
5
5
|
class GitBook < OmniAuth::Strategies::OAuth2
|
6
6
|
base_url = 'https://api.gitbook.com'
|
7
7
|
|
8
|
-
option :name, 'GitBook'
|
9
8
|
option :client_options, {
|
10
9
|
site: base_url,
|
11
10
|
authorize_url: "#{base_url}/oauth/authorize",
|
@@ -16,8 +15,12 @@ module OmniAuth
|
|
16
15
|
|
17
16
|
info do
|
18
17
|
{
|
18
|
+
'username' => raw_info['username'],
|
19
19
|
'name' => raw_info['name'],
|
20
|
-
'website' => raw_info['website']
|
20
|
+
'website' => raw_info['website'],
|
21
|
+
'urls' => raw_info['urls'],
|
22
|
+
'auth' => raw_info['auth'],
|
23
|
+
'token' => raw_info['token'],
|
21
24
|
}
|
22
25
|
end
|
23
26
|
|
@@ -27,7 +30,7 @@ module OmniAuth
|
|
27
30
|
|
28
31
|
def raw_info
|
29
32
|
access_token.options[:mode] = :query
|
30
|
-
@raw_info ||= access_token
|
33
|
+
@raw_info ||= access_token.get('account').parsed
|
31
34
|
end
|
32
35
|
|
33
36
|
def authorize_params
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: omniauth-gitbook
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Calvin Huang
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-10-
|
11
|
+
date: 2016-10-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: omniauth
|
@@ -115,7 +115,7 @@ files:
|
|
115
115
|
- README.md
|
116
116
|
- Rakefile
|
117
117
|
- lib/gitbook/version.rb
|
118
|
-
- lib/
|
118
|
+
- lib/omniauth-gitbook.rb
|
119
119
|
- lib/omniauth/strategies/gitbook.rb
|
120
120
|
- omniauth-gitbook.gemspec
|
121
121
|
- spec/omniauth/strategies/gitbook_spec.rb
|
data/lib/omni-gitbook.rb
DELETED