api_tester 0.0.4 → 0.0.5

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: 87533e89491fb00373e6444fc9c3d4a541bed0cd
4
- data.tar.gz: 3f1fcf1fed9e4bf025bd1f4b8a089a862eae7bcf
3
+ metadata.gz: bbfe4156dd0ec1e3cf63f2195b3d43e4c02682e2
4
+ data.tar.gz: 601f877f50eee20a0f9ef67ca823ab2fa017dee5
5
5
  SHA512:
6
- metadata.gz: 9e23497cbfc815b3204cc705892e522fe166d588a4441a42123e14afdca11aea761220f8789e65063f1d3e7f9893c3031cc2cb5e41d5fc0ef07d015d1ab4b027
7
- data.tar.gz: f4c4fd0e235707f97446c77f92316615bf5529964a7db9742232155e7138f1163d163fba6684d59c2a037e5cb72e141b228738ebb5f0dd3a30a2b04609206052
6
+ metadata.gz: 8a62dcf1823698b918d442ffbb3071972fd90d3a3fd5786cd4b67db5d6279b549d5b4489c16aa02da903c18d5759452e8adafdb3cc86c27928f1ebfe9f863ec0
7
+ data.tar.gz: c2deb840afbc1ef3901e56dba0d0a67636a09b46c3edf25d8190ce0667c8e190c89eda63fcf28afb18853c222e65bef1523969323ce920fc059296423ff2ec3f
@@ -17,13 +17,13 @@ module ApiTester
17
17
  end
18
18
 
19
19
  [:post, :get, :put, :delete].each do |method|
20
- define_method "#{method}" do |api, body, params = nil|
20
+ define_method "#{method}" do |api, body, params = nil, header = nil|
21
21
  connection.send("#{method}") do |req|
22
22
  req.url api, params
23
23
  req.options.timeout = 3600
24
24
  req.options.open_timeout = 3600
25
25
  req.body = body.to_json if body
26
- req.headers = headers
26
+ req.headers = header.nil? ? header_json : header_json.merge(header)
27
27
  end
28
28
  end
29
29
  end
@@ -36,10 +36,6 @@ module ApiTester
36
36
  end
37
37
  end
38
38
 
39
- def headers
40
- header_json
41
- end
42
-
43
39
  private
44
40
 
45
41
  def header_json
@@ -1,3 +1,3 @@
1
1
  module ApiTester
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: api_tester
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Faizal Zakaria