social_profile 0.1.2 → 0.1.3

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.
@@ -78,7 +78,9 @@ module SocialProfile
78
78
  def find_upload_url
79
79
  server = @target.photos.getUploadServer(:aid => identifier)
80
80
 
81
- if server && server['response']
81
+ if server && server['upload_url']
82
+ server['upload_url']
83
+ elsif server && server['response']
82
84
  server['response']['upload_url']
83
85
  else
84
86
  nil
@@ -86,7 +88,8 @@ module SocialProfile
86
88
  end
87
89
 
88
90
  def normalize_hash(hash)
89
- response = (hash && hash["response"] ? Array.wrap(hash["response"]).first : hash)
91
+ hash = hash["response"] if hash.is_a?(Hash) && hash["response"]
92
+ response = Array.wrap(hash).first
90
93
  response || {}
91
94
  end
92
95
  end
@@ -1,4 +1,4 @@
1
1
  # encoding: utf-8
2
2
  module SocialProfile
3
- VERSION = "0.1.2"
3
+ VERSION = "0.1.3"
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: social_profile
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: