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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fe54685243b852c2b36db7c8941649832752d5a7
4
- data.tar.gz: c4a570f19b52f3611335e938b3be5ca9ae95cbbf
3
+ metadata.gz: 9c90da889897455e5e4761ed5ee66ef40a5d9763
4
+ data.tar.gz: 450175fbfeb1cb8c53012f282fd675e178baf72e
5
5
  SHA512:
6
- metadata.gz: 5312a966758f9466724b1f0c46b8cdcc18bd366e015ab10c9fac98e3754b41deff5bf5eb677e6677f16c6016d2003db300f66caa93f3b745a986a3b8e890f44a
7
- data.tar.gz: 69bc78cf85bb5e29755c09dbe5938a87dd3bb7f76f40ee881ff0d91198d06fc510ae7ab2cc5de1a41117ffba26b3dae45c5496b83603a24a7129d10833618041
6
+ metadata.gz: 5b619ddbc6ff1a0163958a13c2d004d689746ddc6accd56d3bdefd1b11b87378fe4b15357a15d357ca5f89a5c62420ab8ce08d387a66afb9d9334312544f10d0
7
+ data.tar.gz: 143eede4cdd702e319ee9d7f10a938ee380a51d87e908f9f4b261e12859663a64634fd11a78575911acf991d1d0d5581cecd370832d13a46851bc6cbdd2df0f7
@@ -1,5 +1,5 @@
1
1
  module OmniAuth
2
2
  module WeiboOauth2
3
- VERSION = "0.4.1"
3
+ VERSION = "0.4.2"
4
4
  end
5
5
  end
@@ -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'].present?? "http://weibo.com/#{raw_info['domain']}" : "http://weibo.com/u/#{raw_info['id']}",
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
- case options[:image_size].to_sym
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.1
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-20 00:00:00.000000000 Z
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.4.6
73
+ rubygems_version: 2.6.7
74
74
  signing_key:
75
75
  specification_version: 4
76
76
  summary: OmniAuth Oauth2 strategy for weibo.com.