oa-openid 0.1.6 → 0.2.0.beta1

Sign up to get free protection for your applications and to get access to all the features.
@@ -3,9 +3,9 @@ require 'omniauth/openid'
3
3
  module OmniAuth
4
4
  module Strategies
5
5
  class GoogleApps < OmniAuth::Strategies::OpenID
6
- def initialize(app, store = nil, options = {})
6
+ def initialize(app, store = nil, options = {}, &block)
7
7
  options[:name] ||= 'google_apps'
8
- super(app, store, options)
8
+ super(app, store, options, &block)
9
9
  end
10
10
 
11
11
  def get_identifier
@@ -35,8 +35,8 @@ module OmniAuth
35
35
  # @option options [Array] :optional The optional attributes for the OpenID request. May
36
36
  # be ActiveExchange or sreg.
37
37
  # @option options [Symbol, :open_id] :name The URL segment name for this provider.
38
- def initialize(app, store = nil, options = {})
39
- super(app, options[:name] || :open_id)
38
+ def initialize(app, store = nil, options = {}, &block)
39
+ super(app, (options[:name] || :open_id), &block)
40
40
  @options = options
41
41
  @options[:required] ||= [AX[:email], AX[:name], AX[:first_name], AX[:last_name], 'email', 'fullname']
42
42
  @options[:optional] ||= [AX[:nickname], AX[:city], AX[:state], AX[:website], AX[:image], 'postcode', 'nickname']
@@ -128,7 +128,7 @@ module OmniAuth
128
128
  'email' => ax.get_single(AX[:email]),
129
129
  'first_name' => ax.get_single(AX[:first_name]),
130
130
  'last_name' => ax.get_single(AX[:last_name]),
131
- 'name' => (ax.get_single(AX[:name]) || [ax.get_single(AX[:first_name]), ax.get_single(AX[:last_name])].join(' ')),
131
+ 'name' => (ax.get_single(AX[:name]) || [ax.get_single(AX[:first_name]), ax.get_single(AX[:last_name])].join(' ')).strip,
132
132
  'location' => ("#{ax.get_single(AX[:city])}, #{ax.get_single(AX[:state])}" if Array(ax.get_single(AX[:city])).any? && Array(ax.get_single(AX[:state])).any?),
133
133
  'nickname' => ax.get_single(AX[:nickname]),
134
134
  'urls' => ({'Website' => Array(ax.get_single(AX[:website])).first} if Array(ax.get_single(AX[:website])).any?)
metadata CHANGED
@@ -1,13 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: oa-openid
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
5
- prerelease: false
4
+ hash: -1848230051
5
+ prerelease: true
6
6
  segments:
7
7
  - 0
8
- - 1
9
- - 6
10
- version: 0.1.6
8
+ - 2
9
+ - 0
10
+ - beta1
11
+ version: 0.2.0.beta1
11
12
  platform: ruby
12
13
  authors:
13
14
  - Michael Bleigh
@@ -15,7 +16,7 @@ autorequire:
15
16
  bindir: bin
16
17
  cert_chain: []
17
18
 
18
- date: 2010-10-25 00:00:00 -05:00
19
+ date: 2010-11-29 00:00:00 -06:00
19
20
  default_executable:
20
21
  dependencies:
21
22
  - !ruby/object:Gem::Dependency
@@ -24,12 +25,13 @@ dependencies:
24
25
  requirements:
25
26
  - - "="
26
27
  - !ruby/object:Gem::Version
27
- hash: 23
28
+ hash: -1848230051
28
29
  segments:
29
30
  - 0
30
- - 1
31
- - 6
32
- version: 0.1.6
31
+ - 2
32
+ - 0
33
+ - beta1
34
+ version: 0.2.0.beta1
33
35
  requirement: *id001
34
36
  name: oa-core
35
37
  prerelease: false
@@ -194,12 +196,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
194
196
  required_rubygems_version: !ruby/object:Gem::Requirement
195
197
  none: false
196
198
  requirements:
197
- - - ">="
199
+ - - ">"
198
200
  - !ruby/object:Gem::Version
199
- hash: 3
201
+ hash: 25
200
202
  segments:
201
- - 0
202
- version: "0"
203
+ - 1
204
+ - 3
205
+ - 1
206
+ version: 1.3.1
203
207
  requirements: []
204
208
 
205
209
  rubyforge_project: