omniauth-rabobank 0.1.0 → 0.1.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3034aa79454e034d6dbc9840851889ffe020ebea
4
- data.tar.gz: 42e63a2e098a154c630b7d09dc2313ccf69086b4
3
+ metadata.gz: 2d8cb48ea90e01fc7cdb25066d7b7ac8cb04dfd0
4
+ data.tar.gz: 2df1653b237dc456d8fbd8abb71163d945b0f236
5
5
  SHA512:
6
- metadata.gz: 076065dd3da11fa8ad18161705791ec5e2ffd2f42ac99a51e7dc655c1b0c6d18b69173c579524155a164c5def8d25a4eee12090b7fbf4aa70d569ef3980a0e80
7
- data.tar.gz: c12df91403566bd2c5c7e1a54a454d487575b89b51c24af9ca470fa0afbabc3f09241f35db888f11616a36c49b71f3a0c91851ef64b94090746c51b289b8023e
6
+ metadata.gz: fb29799cbfc67f5401fb49e1693c304c1bf1df462a0d92c4b5fb863d885dad34a28dda4b06ee7c07622f09a6a05993ac2c2c3794cb9f6497ebb751916aa9e835
7
+ data.tar.gz: c3273f54626a5184ce90512cc087f37cf963974a5ce61e8f113cbdf9c45522766e6a25ea0060fa5915d81fbcbe5360f7915ac4039217b045405fabe0b9a2dec7
@@ -23,51 +23,15 @@ module OmniAuth
23
23
  end
24
24
  end
25
25
 
26
- uid { raw_info['id'].to_s }
27
-
28
- info do
29
- {
30
- 'nickname' => raw_info['login'],
31
- 'email' => email,
32
- 'name' => raw_info['name'],
33
- 'image' => raw_info['avatar_url'],
34
- 'urls' => {
35
- 'GitHub' => raw_info['html_url'],
36
- 'Blog' => raw_info['blog'],
37
- },
38
- }
39
- end
40
-
41
- extra do
42
- {:raw_info => raw_info, :all_emails => emails}
43
- end
44
-
45
- def raw_info
46
- access_token.options[:mode] = :query
47
- @raw_info ||= access_token.get('user').parsed
48
- end
49
-
50
- def email
51
- (email_access_allowed?) ? primary_email : raw_info['email']
52
- end
53
-
54
- def primary_email
55
- primary = emails.find{ |i| i['primary'] && i['verified'] }
56
- primary && primary['email'] || nil
26
+ uid do
27
+ request.params[options.uid_field.to_s]
57
28
  end
58
29
 
59
- # The new /user/emails API - http://developer.github.com/v3/users/emails/#future-response
60
- def emails
61
- return [] unless email_access_allowed?
62
- access_token.options[:mode] = :query
63
- @emails ||= access_token.get('user/emails', :headers => { 'Accept' => 'application/vnd.github.v3' }).parsed
64
- end
65
-
66
- def email_access_allowed?
67
- return false unless options['scope']
68
- email_scopes = ['user', 'user:email']
69
- scopes = options['scope'].split(',')
70
- (scopes & email_scopes).any?
30
+ info do
31
+ options.fields.inject({}) do |hash, field|
32
+ hash[field] = request.params[field.to_s]
33
+ hash
34
+ end
71
35
  end
72
36
 
73
37
  def callback_url
@@ -1,5 +1,5 @@
1
1
  module OmniAuth
2
2
  module Rabobank
3
- VERSION = "0.1.0"
3
+ VERSION = "0.1.1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-rabobank
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dunya Kirkali