apidiesel 0.10 → 0.11

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: abd698dc7975148cd9d24f1a365abb1e21dcf873
4
- data.tar.gz: 28f247075558965d6c68c59a3fa0afe9fc899ea4
3
+ metadata.gz: 664d889aca6e65c4f77ea550fe41889773d030c1
4
+ data.tar.gz: 2316e0f49a9bdadd83704bf9e64c6a05db53af24
5
5
  SHA512:
6
- metadata.gz: 9dd5aac9aa74b83ef5a14bf1537ae97893db4f768b099464fefe0af1094da9246691e7c695543b3dfd60453f53f0e0902a23d997c9df16ffb92a2d640ca70200
7
- data.tar.gz: 6f761f94ba751451f2f2fa42243bd0a54325e97f7bff55b362545f7f3f3830953df807321a0cd99dafee75b1f673c0659ea83e6d83d0b694a23f04e4275f8714
6
+ metadata.gz: 7af85eb81798619f660713cc92fceea895d28893da78adfd196952d6de082a4e815a77254afab1805b39bb4c828ec669911365f89c1415b80fd500c9889f2847
7
+ data.tar.gz: 03b5ad823fb5547ce4e2f026ded9011a1e8f1fd7296a3c588b7e94968f3c8b0073d930166789a49117f872debb9963b7bf8cb748e9c5491e3456be635dbf608c
data/lib/apidiesel/api.rb CHANGED
@@ -118,10 +118,10 @@ module Apidiesel
118
118
 
119
119
  request_handlers.each do |handler|
120
120
  request = handler.run(request, @config)
121
- break if request.response_body.present?
121
+ break if request.response_body != nil
122
122
  end
123
123
 
124
- unless request.response_body.present?
124
+ unless request.response_body != nil
125
125
  raise "All request handlers failed to deliver a response"
126
126
  end
127
127
 
@@ -17,7 +17,11 @@ module Apidiesel
17
17
 
18
18
  request.metadata[:finished_at] = DateTime.now
19
19
 
20
- request.response_body = ::JSON.parse(request.http_response.body)
20
+ if request.http_response.code == 204
21
+ request.response_body = {}
22
+ else
23
+ request.response_body = ::JSON.parse(request.http_response.body)
24
+ end
21
25
 
22
26
  request
23
27
  end
@@ -1,3 +1,3 @@
1
1
  module Apidiesel
2
- VERSION = "0.10"
2
+ VERSION = "0.11"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: apidiesel
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.10'
4
+ version: '0.11'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jan-Christian Foeh