omniauth-patreon 1.0.0 → 1.0.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/Rakefile +1 -1
- data/lib/omniauth/patreon/version.rb +1 -1
- data/lib/omniauth/strategies/patreon.rb +6 -6
- data/omniauth-patreon.gemspec +1 -3
- data/spec/app.rb +2 -2
- data/spec/omniauth/strategies/{uber_spec.rb → patreon_spec.rb} +3 -3
- data/spec/spec_helper.rb +2 -2
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f201b3c332f273b6e68fe2fa630e9f82b05d7962
|
4
|
+
data.tar.gz: ea709c60d810e37bb9c81b442b03915e56183811
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3afb16b4dca4977a651b93907ab829fcb4145b7273f06888791bd835a9869b71f3d44adc6bfff2b0aec38a20a8152ee27e70e40552e842194be2d026b7c95f21
|
7
|
+
data.tar.gz: 15aac0abb8c3cd765cc356d34614276d09fbdb3587873af8a94009e6c8bf3e33b7fb7fc8d5f9231f4d38336c3cc8d645f3048e1b999cc3b212aa53eccd614239
|
data/Rakefile
CHANGED
@@ -6,9 +6,9 @@ module OmniAuth
|
|
6
6
|
option :name, 'patreon'
|
7
7
|
|
8
8
|
option :client_options,
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
site: 'https://www.patreon.com',
|
10
|
+
authorize_url: 'https://www.patreon.com/oauth2/authorize',
|
11
|
+
token_url: 'https://api.patreon.com/oauth2/token'
|
12
12
|
|
13
13
|
uid { raw_info['data']['id'].to_s }
|
14
14
|
|
@@ -27,9 +27,9 @@ module OmniAuth
|
|
27
27
|
|
28
28
|
def raw_info
|
29
29
|
@raw_info ||= begin
|
30
|
-
response = client.request(:get,
|
31
|
-
|
32
|
-
|
30
|
+
response = client.request(:get, 'https://api.patreon.com/oauth2/api/current_user', headers: {
|
31
|
+
'Authorization' => "Bearer #{access_token.token}"
|
32
|
+
}, parse: :json)
|
33
33
|
response.parsed
|
34
34
|
end
|
35
35
|
end
|
data/omniauth-patreon.gemspec
CHANGED
data/spec/app.rb
CHANGED
@@ -15,15 +15,15 @@ describe OmniAuth::Strategies::Patreon do
|
|
15
15
|
end
|
16
16
|
|
17
17
|
it 'should have correct site' do
|
18
|
-
expect(subject.options.client_options.site).to eq('https://www.patreon.com
|
18
|
+
expect(subject.options.client_options.site).to eq('https://www.patreon.com')
|
19
19
|
end
|
20
20
|
|
21
21
|
it 'should have correct authorize url' do
|
22
|
-
expect(subject.options.client_options.authorize_url).to eq('https://patreon.com/oauth2/authorize')
|
22
|
+
expect(subject.options.client_options.authorize_url).to eq('https://www.patreon.com/oauth2/authorize')
|
23
23
|
end
|
24
24
|
|
25
25
|
it 'should have correct access token url' do
|
26
|
-
expect(subject.options.client_options.token_url).to eq('https://patreon.com/
|
26
|
+
expect(subject.options.client_options.token_url).to eq('https://api.patreon.com/oauth2/token')
|
27
27
|
end
|
28
28
|
|
29
29
|
it 'should indicate that the provider ignores the state parameted' do
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: omniauth-patreon
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kristian Freeman
|
@@ -85,7 +85,7 @@ files:
|
|
85
85
|
- lib/omniauth/strategies/patreon.rb
|
86
86
|
- omniauth-patreon.gemspec
|
87
87
|
- spec/app.rb
|
88
|
-
- spec/omniauth/strategies/
|
88
|
+
- spec/omniauth/strategies/patreon_spec.rb
|
89
89
|
- spec/spec_helper.rb
|
90
90
|
homepage: https://github.com/tmilewski/omniauth-patreon
|
91
91
|
licenses:
|
@@ -113,5 +113,5 @@ specification_version: 4
|
|
113
113
|
summary: Patreon strategy for OmniAuth
|
114
114
|
test_files:
|
115
115
|
- spec/app.rb
|
116
|
-
- spec/omniauth/strategies/
|
116
|
+
- spec/omniauth/strategies/patreon_spec.rb
|
117
117
|
- spec/spec_helper.rb
|