mogli 0.0.21 → 0.0.22

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/mogli/client.rb +3 -4
  2. metadata +4 -4
data/lib/mogli/client.rb CHANGED
@@ -41,7 +41,7 @@ module Mogli
41
41
  end
42
42
 
43
43
  def self.create_from_code_and_authenticator(code,authenticator)
44
- post_data = get(authenticator.access_token_url(code))
44
+ post_data = get(authenticator.access_token_url(code)).parsed_response
45
45
  if (response_is_error?(post_data))
46
46
  raise_client_exception(post_data)
47
47
  end
@@ -68,9 +68,8 @@ module Mogli
68
68
  end
69
69
 
70
70
  def self.response_is_error?(post_data)
71
- post_data.is_a?(HTTParty::Response) and
72
- post_data.parsed_response.kind_of?(Hash) and
73
- !post_data.parsed_response["error"].blank?
71
+ post_data.kind_of?(Hash) and
72
+ !post_data["error"].blank?
74
73
  end
75
74
 
76
75
  def self.create_from_session_key(session_key, client_id, secret)
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mogli
3
3
  version: !ruby/object:Gem::Version
4
- hash: 53
4
+ hash: 51
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 21
10
- version: 0.0.21
9
+ - 22
10
+ version: 0.0.22
11
11
  platform: ruby
12
12
  authors:
13
13
  - Mike Mangino
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-01-19 00:00:00 -05:00
18
+ date: 2011-01-28 00:00:00 -05:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency