omniauth-yahoo 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore CHANGED
@@ -3,3 +3,4 @@
3
3
  Gemfile.lock
4
4
  pkg/*
5
5
  coverage
6
+ *.swp
data/README.md CHANGED
@@ -6,6 +6,10 @@ For more information see the following:
6
6
 
7
7
  Release notes:
8
8
 
9
+ * Version 0.0.3
10
+
11
+ - Added primary email as per famoseagle
12
+
9
13
  * Version 0.0.1
10
14
 
11
15
  - First cut
@@ -10,10 +10,10 @@ module OmniAuth
10
10
  option :name, 'yahoo'
11
11
 
12
12
  option :client_options, {
13
- :access_token_path => '/oauth/v2/get_token',
14
- :authorize_path => '/oauth/v2/request_auth',
13
+ :access_token_path => '/oauth/v2/get_token',
14
+ :authorize_path => '/oauth/v2/request_auth',
15
15
  :request_token_path => '/oauth/v2/get_request_token',
16
- :site => 'https://api.login.yahoo.com'
16
+ :site => 'https://api.login.yahoo.com'
17
17
  }
18
18
 
19
19
  uid {
@@ -21,12 +21,18 @@ module OmniAuth
21
21
  }
22
22
 
23
23
  info do
24
+ primary_email = nil
25
+ if user_info['emails']
26
+ email_info = user_info['emails'].find{|e| e['primary']} || user_info['emails'].first
27
+ primary_email = email_info['handle']
28
+ end
24
29
  {
25
- :nickname => user_info['nickname'],
26
- :name => user_info['givenName'] || user_info['nickname'],
27
- :image => user_info['image']['imageUrl'],
30
+ :nickname => user_info['nickname'],
31
+ :name => user_info['givenName'] || user_info['nickname'],
32
+ :image => user_info['image']['imageUrl'],
28
33
  :description => user_info['message'],
29
- :urls => {
34
+ :email => primary_email,
35
+ :urls => {
30
36
  'Profile' => user_info['profileUrl'],
31
37
  }
32
38
  }
@@ -1,5 +1,5 @@
1
1
  module Omniauth
2
2
  module Yahoo
3
- VERSION = "0.0.2"
3
+ VERSION = "0.0.3"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,46 +1,34 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: omniauth-yahoo
3
- version: !ruby/object:Gem::Version
4
- prerelease: false
5
- segments:
6
- - 0
7
- - 0
8
- - 2
9
- version: 0.0.2
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.3
5
+ prerelease:
10
6
  platform: ruby
11
- authors:
7
+ authors:
12
8
  - Tim Breitkreutz
13
9
  autorequire:
14
10
  bindir: bin
15
11
  cert_chain: []
16
-
17
- date: 2011-12-19 00:00:00 -07:00
18
- default_executable:
19
- dependencies:
20
- - !ruby/object:Gem::Dependency
12
+ date: 2012-02-01 00:00:00.000000000Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
21
15
  name: omniauth-oauth
22
- prerelease: false
23
- requirement: &id001 !ruby/object:Gem::Requirement
16
+ requirement: &70314067787680 !ruby/object:Gem::Requirement
24
17
  none: false
25
- requirements:
18
+ requirements:
26
19
  - - ~>
27
- - !ruby/object:Gem::Version
28
- segments:
29
- - 1
30
- - 0
31
- version: "1.0"
20
+ - !ruby/object:Gem::Version
21
+ version: '1.0'
32
22
  type: :runtime
33
- version_requirements: *id001
23
+ prerelease: false
24
+ version_requirements: *70314067787680
34
25
  description: OmniAuth strategy for yahoo
35
- email:
26
+ email:
36
27
  - tim@sbrew.com
37
28
  executables: []
38
-
39
29
  extensions: []
40
-
41
30
  extra_rdoc_files: []
42
-
43
- files:
31
+ files:
44
32
  - .gitignore
45
33
  - Gemfile
46
34
  - LICENSE
@@ -51,37 +39,28 @@ files:
51
39
  - lib/omniauth-yahoo/version.rb
52
40
  - lib/omniauth/strategies/yahoo.rb
53
41
  - omniauth-yahoo.gemspec
54
- has_rdoc: true
55
42
  homepage: https://github.com/timbreitkreutz/omniauth-yahoo
56
43
  licenses: []
57
-
58
44
  post_install_message:
59
45
  rdoc_options: []
60
-
61
- require_paths:
46
+ require_paths:
62
47
  - lib
63
- required_ruby_version: !ruby/object:Gem::Requirement
48
+ required_ruby_version: !ruby/object:Gem::Requirement
64
49
  none: false
65
- requirements:
66
- - - ">="
67
- - !ruby/object:Gem::Version
68
- segments:
69
- - 0
70
- version: "0"
71
- required_rubygems_version: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - ! '>='
52
+ - !ruby/object:Gem::Version
53
+ version: '0'
54
+ required_rubygems_version: !ruby/object:Gem::Requirement
72
55
  none: false
73
- requirements:
74
- - - ">="
75
- - !ruby/object:Gem::Version
76
- segments:
77
- - 0
78
- version: "0"
56
+ requirements:
57
+ - - ! '>='
58
+ - !ruby/object:Gem::Version
59
+ version: '0'
79
60
  requirements: []
80
-
81
61
  rubyforge_project: omniauth-yahoo
82
- rubygems_version: 1.3.7
62
+ rubygems_version: 1.8.10
83
63
  signing_key:
84
64
  specification_version: 3
85
65
  summary: OmniAuth strategy for yahoo
86
66
  test_files: []
87
-