apidiesel 0.10 → 0.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/apidiesel/api.rb +2 -2
- data/lib/apidiesel/handlers/json.rb +5 -1
- data/lib/apidiesel/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 664d889aca6e65c4f77ea550fe41889773d030c1
|
4
|
+
data.tar.gz: 2316e0f49a9bdadd83704bf9e64c6a05db53af24
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
121
|
+
break if request.response_body != nil
|
122
122
|
end
|
123
123
|
|
124
|
-
unless request.response_body
|
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
|
-
|
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
|
data/lib/apidiesel/version.rb
CHANGED