webtester 0.1.5 → 0.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/request.rb +6 -2
- data/lib/test.rb +2 -2
- 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: 37bf1bc603cea43f4fe4fe16e6aa5fae4d7383df
|
4
|
+
data.tar.gz: 58bf187b68b9116e753bdfc0ef027d7891fbb69a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 558043b63feada3a8023047d544ac710c2d2cc63205e5f575b1bea9eb6b7b9d366be55dd42355565b74cd75a5dbf41eb924aa22f2a854e0c2c9d947aa323be5f
|
7
|
+
data.tar.gz: 75c60a68763ffc4febe37bced03a59b60204f4040fff177777b1454d706e6cc5c039e576ab0561ad71b602151b54706de761baa5f179fda0af6a3f777bf5144d
|
data/lib/request.rb
CHANGED
@@ -80,9 +80,13 @@ module WT
|
|
80
80
|
ret = nil
|
81
81
|
|
82
82
|
begin
|
83
|
-
req['Cookie'] = @headers['Cookie'].to_s if @headers['Cookie']
|
83
|
+
#req['Cookie'] = @headers['Cookie'].to_s if @headers['Cookie']
|
84
84
|
|
85
|
-
|
85
|
+
@headers.each do |k,v|
|
86
|
+
req[k] = v.to_s
|
87
|
+
end
|
88
|
+
|
89
|
+
if @request_data and @request_data.is_a?(String)
|
86
90
|
req.body = @request_data
|
87
91
|
else
|
88
92
|
req.body = URI.encode_www_form @request_data if @request_data.length > 0
|
data/lib/test.rb
CHANGED
@@ -77,8 +77,8 @@ module WT
|
|
77
77
|
proxy_parts = yaml_request['proxy'].split(':') if yaml_request['proxy']
|
78
78
|
|
79
79
|
request = WT::Request.new(type, url, body)
|
80
|
-
request.proxy_host = proxy_parts[0]
|
81
|
-
request.proxy_port = proxy_parts[1]
|
80
|
+
request.proxy_host = proxy_parts[0] if proxy_parts
|
81
|
+
request.proxy_port = proxy_parts[1] if proxy_parts
|
82
82
|
request
|
83
83
|
end
|
84
84
|
|