apidiesel 0.11 → 0.12

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: 664d889aca6e65c4f77ea550fe41889773d030c1
4
- data.tar.gz: 2316e0f49a9bdadd83704bf9e64c6a05db53af24
3
+ metadata.gz: 08fe77f23044c1ce2a36e5bd94e2c017a0683c9c
4
+ data.tar.gz: fb4e57bad12bd7f33791bd7ec5271210543cd047
5
5
  SHA512:
6
- metadata.gz: 7af85eb81798619f660713cc92fceea895d28893da78adfd196952d6de082a4e815a77254afab1805b39bb4c828ec669911365f89c1415b80fd500c9889f2847
7
- data.tar.gz: 03b5ad823fb5547ce4e2f026ded9011a1e8f1fd7296a3c588b7e94968f3c8b0073d930166789a49117f872debb9963b7bf8cb748e9c5491e3456be635dbf608c
6
+ metadata.gz: bbff420944f968b9f9a9de1be0db1af02856da7b407e8fbf3a3580f4d914cf9754d621413c05d50eccbbace72e2ed2947eb4e8235bb3a29549eb4fd48db92212
7
+ data.tar.gz: 84c5a28bde9e6043a9ad0583e63735bcd7be360e7db8fc315d07ba2bbbf6701e4b2611dc12351ec11fcceb9898f8505769dba7cc9113e765b6a8d57a5400618d
@@ -22,6 +22,10 @@ module Apidiesel
22
22
  http_request.open_timeout = api_config[:timeout] || 30
23
23
  http_request.read_timeout = api_config[:timeout] || 30
24
24
 
25
+ if block_given?
26
+ http_request = yield http_request
27
+ end
28
+
25
29
  request.http_request = http_request
26
30
 
27
31
  begin
@@ -13,7 +13,10 @@ module Apidiesel
13
13
 
14
14
  execute_request(request: request,
15
15
  payload: payload,
16
- api_config: api_config)
16
+ api_config: api_config) do |http_request|
17
+ http_request.headers = {"Accept" => "application/json", "Content-Type" => "application/json"}
18
+ http_request
19
+ end
17
20
 
18
21
  request.metadata[:finished_at] = DateTime.now
19
22
 
@@ -1,3 +1,3 @@
1
1
  module Apidiesel
2
- VERSION = "0.11"
2
+ VERSION = "0.12"
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.11'
4
+ version: '0.12'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jan-Christian Foeh