warden-github 0.10.2 → 0.11.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -13,7 +13,10 @@ Warden::Strategies.add(:github) do
13
13
  begin
14
14
  api = api_for(params['code'])
15
15
 
16
- success!(Warden::Github::Oauth::User.new(Yajl.load(user_info_for(api.token)), api.token))
16
+ user_info = Yajl.load(user_info_for(api.token))
17
+ user_info.delete('bio') # Delete bio, as it can easily make the session cookie too long.
18
+
19
+ success!(Warden::Github::Oauth::User.new(user_info, api.token))
17
20
  rescue OAuth2::Error
18
21
  %(<p>Outdated ?code=#{params['code']}:</p><p>#{$!}</p><p><a href="/auth/github">Retry</a></p>)
19
22
  end
@@ -6,11 +6,6 @@ module Warden
6
6
  module Github
7
7
  module Oauth
8
8
  class User < Struct.new(:attribs, :token)
9
- def initialize(attributes, api_token)
10
- attributes.delete('bio') # Delete bio, as it can easily make the session cookie too long.
11
- super(attributes, api_token)
12
- end
13
-
14
9
  def login
15
10
  attribs['login']
16
11
  end
@@ -1,5 +1,5 @@
1
1
  module Warden
2
2
  module Github
3
- VERSION = "0.10.2"
3
+ VERSION = "0.11.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -5,9 +5,9 @@ version: !ruby/object:Gem::Version
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
- - 10
9
- - 2
10
- version: 0.10.2
8
+ - 11
9
+ - 0
10
+ version: 0.11.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Corey Donohoe
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2012-09-19 00:00:00 -07:00
18
+ date: 2012-09-20 00:00:00 -07:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency