warden-github 0.4.1 → 0.4.2

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.
@@ -10,12 +10,12 @@ Warden::Strategies.add(:github) do
10
10
  begin
11
11
  api = api_for(params['code'])
12
12
 
13
- resp = api.get '/api/v3/user' do |request|
13
+ resp = api.get '/api/v2/json/user/show' do |request|
14
14
  request.params['access_token'] = api.token
15
15
  end.body
16
16
 
17
17
  user = JSON.load(resp)
18
- success!(Warden::Github::Oauth::User.new(user, api.token))
18
+ success!(Warden::Github::Oauth::User.new(user['user'], api.token))
19
19
  rescue OAuth2::Error
20
20
  %(<p>Outdated ?code=#{params['code']}:</p><p>#{$!}</p><p><a href="/auth/github">Retry</a></p>)
21
21
  end
@@ -1,5 +1,5 @@
1
1
  module Warden
2
2
  module Github
3
- VERSION = "0.4.1"
3
+ VERSION = "0.4.2"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: warden-github
3
3
  version: !ruby/object:Gem::Version
4
- hash: 13
4
+ hash: 11
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 4
9
- - 1
10
- version: 0.4.1
9
+ - 2
10
+ version: 0.4.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Corey Donohoe