omniauth-weibo-oauth2 0.4.1 → 0.4.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/omniauth-weibo-oauth2/version.rb +1 -1
- data/lib/omniauth/strategies/weibo.rb +4 -3
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9c90da889897455e5e4761ed5ee66ef40a5d9763
|
4
|
+
data.tar.gz: 450175fbfeb1cb8c53012f282fd675e178baf72e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5b619ddbc6ff1a0163958a13c2d004d689746ddc6accd56d3bdefd1b11b87378fe4b15357a15d357ca5f89a5c62420ab8ce08d387a66afb9d9334312544f10d0
|
7
|
+
data.tar.gz: 143eede4cdd702e319ee9d7f10a938ee380a51d87e908f9f4b261e12859663a64634fd11a78575911acf991d1d0d5581cecd370832d13a46851bc6cbdd2df0f7
|
@@ -26,7 +26,7 @@ module OmniAuth
|
|
26
26
|
:description => raw_info['description'],
|
27
27
|
:urls => {
|
28
28
|
'Blog' => raw_info['url'],
|
29
|
-
'Weibo' => raw_info['domain'].
|
29
|
+
'Weibo' => raw_info['domain'].empty? ? "http://weibo.com/u/#{raw_info['id']}" : "http://weibo.com/#{raw_info['domain']}",
|
30
30
|
}
|
31
31
|
}
|
32
32
|
end
|
@@ -55,14 +55,15 @@ module OmniAuth
|
|
55
55
|
# small 30x30
|
56
56
|
#default is middle
|
57
57
|
def image_url
|
58
|
-
|
58
|
+
image_size = options[:image_size] || :middle
|
59
|
+
case image_size.to_sym
|
59
60
|
when :original
|
60
61
|
url = raw_info['avatar_hd']
|
61
62
|
when :large
|
62
63
|
url = raw_info['avatar_large']
|
63
64
|
when :small
|
64
65
|
url = raw_info['avatar_large'].sub('/180/','/30/')
|
65
|
-
else
|
66
|
+
else
|
66
67
|
url = raw_info['profile_image_url']
|
67
68
|
end
|
68
69
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: omniauth-weibo-oauth2
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bin He
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-01
|
11
|
+
date: 2016-11-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: omniauth
|
@@ -70,7 +70,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
70
70
|
version: '0'
|
71
71
|
requirements: []
|
72
72
|
rubyforge_project:
|
73
|
-
rubygems_version: 2.
|
73
|
+
rubygems_version: 2.6.7
|
74
74
|
signing_key:
|
75
75
|
specification_version: 4
|
76
76
|
summary: OmniAuth Oauth2 strategy for weibo.com.
|