al_papi 0.0.9 → 0.0.10

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/al_papi/http.rb +5 -1
  2. metadata +6 -6
@@ -35,7 +35,11 @@ module AlPapi
35
35
 
36
36
  case code
37
37
  when 200
38
- self.response = JSON.parse body
38
+ begin
39
+ parsed = JSON.parse body
40
+ rescue JSON::ParseError => e
41
+ self.response = body
42
+ end
39
43
  self.success = true
40
44
  when 204
41
45
  self.errors << RequestError.new('No Content', code, path, params)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: al_papi
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.9
4
+ version: 0.0.10
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-12-28 00:00:00.000000000 Z
12
+ date: 2011-12-29 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rest-client
16
- requirement: &70354144621020 !ruby/object:Gem::Requirement
16
+ requirement: &70182521950420 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 1.6.7
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70354144621020
24
+ version_requirements: *70182521950420
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: rspec
27
- requirement: &70354144620500 !ruby/object:Gem::Requirement
27
+ requirement: &70182521949900 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,7 +32,7 @@ dependencies:
32
32
  version: '2.0'
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *70354144620500
35
+ version_requirements: *70182521949900
36
36
  description: Wraps AuthorityLabs Partner API calls in a gem.
37
37
  email: ''
38
38
  executables: []