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 +4 -4
- data/lib/api_tester/connection.rb +2 -6
- data/lib/api_tester/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: bbfe4156dd0ec1e3cf63f2195b3d43e4c02682e2
|
4
|
+
data.tar.gz: 601f877f50eee20a0f9ef67ca823ab2fa017dee5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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 =
|
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
|
data/lib/api_tester/version.rb
CHANGED