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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/request.rb +6 -2
  3. data/lib/test.rb +2 -2
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: cf6faf955f1451e07f5d62724ace1b34fd73baea
4
- data.tar.gz: df3c5041f8472b86f22567907624a6530b6073de
3
+ metadata.gz: 37bf1bc603cea43f4fe4fe16e6aa5fae4d7383df
4
+ data.tar.gz: 58bf187b68b9116e753bdfc0ef027d7891fbb69a
5
5
  SHA512:
6
- metadata.gz: 5f732293723ba4e6e035e55f70ef8d44341142deabc4037fb7aeb19736631b756d766cf909adb36b072b1ee722bba7322251705bf6598bcc9fa0638daf371fb5
7
- data.tar.gz: 436d72524e26980bb4d5f43bd62388c0f49be1926532ca8b9f02a64040c65bac7195b6983eb00494dccdc7db99707177dd2adc5aa13b3ce587c0402b42da2003
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
- if @request_data.is_a?(String)
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
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: webtester
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Diego F. Nascimento