oa-more 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/omniauth/strategies/flickr.rb +10 -1
  2. metadata +5 -5
@@ -64,11 +64,20 @@ module OmniAuth
64
64
  OmniAuth::Utils.deep_merge(super, {
65
65
  'uid' => @user['nsid'],
66
66
  'credentials' => { 'token' => @access_token },
67
- 'user_info' => @user,
67
+ 'user_info' => user_info,
68
68
  'extra' => { 'user_hash' => @user }
69
69
  })
70
70
  end
71
71
 
72
+ def user_info
73
+ name = @user['fullname']
74
+ name = @user['username'] if name.nil? || name.empty?
75
+ {
76
+ 'nickname' => @user['username'],
77
+ 'name' => name,
78
+ }
79
+ end
80
+
72
81
  def flickr_sign(params)
73
82
  Digest::MD5.hexdigest(secret_key + params.sort{|a,b| a[0].to_s <=> b[0].to_s }.flatten.join)
74
83
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: oa-more
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.2.0
5
+ version: 0.2.1
6
6
  platform: ruby
7
7
  authors:
8
8
  - Michael Bleigh
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-03-11 00:00:00 -06:00
13
+ date: 2011-04-05 00:00:00 -05:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
@@ -20,7 +20,7 @@ dependencies:
20
20
  requirements:
21
21
  - - "="
22
22
  - !ruby/object:Gem::Version
23
- version: 0.2.0
23
+ version: 0.2.1
24
24
  type: :runtime
25
25
  prerelease: false
26
26
  version_requirements: *id001
@@ -153,7 +153,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
153
153
  requirements:
154
154
  - - ">="
155
155
  - !ruby/object:Gem::Version
156
- hash: 584453359154924574
156
+ hash: 1504782879960101098
157
157
  segments:
158
158
  - 0
159
159
  version: "0"
@@ -162,7 +162,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
162
162
  requirements:
163
163
  - - ">="
164
164
  - !ruby/object:Gem::Version
165
- hash: 584453359154924574
165
+ hash: 1504782879960101098
166
166
  segments:
167
167
  - 0
168
168
  version: "0"