hiptest-publisher 0.16.0 → 0.16.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/hiptest-publisher/client.rb +16 -6
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 29270dc394e18dfca03310de5ce563a722c18000
|
4
|
+
data.tar.gz: 2734c798f1eea999baf81592ec684fa3020cfacc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f6387b718d78b9ef0f6490200ea2b9a3f38153ab5a669be312847c6c9d141ff76b005e98f28314d259345a320874a9de5d2e51ee41cf202110441d6e2b92e7b0
|
7
|
+
data.tar.gz: abdb1e5309327007261cc9e21346c1644b169c26a3cb70bb3de1ccf8fad78560ece9dc62d34449beff845394c2a03a0ae0bd84b4405d1777da43d1ddd18a8361
|
@@ -117,15 +117,25 @@ module Hiptest
|
|
117
117
|
|
118
118
|
def send_request(request)
|
119
119
|
request["User-Agent"] = "Ruby/hiptest-publisher"
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
120
|
+
use_ssl = request.uri.scheme == "https"
|
121
|
+
proxy_uri = find_proxy_uri(request.uri.hostname, request.uri.port)
|
122
|
+
proxy_address = proxy_uri&.hostname
|
123
|
+
proxy_port = proxy_uri&.port
|
124
|
+
proxy_user, proxy_pass = proxy_uri&.userinfo&.split(':', 2)
|
125
|
+
Net::HTTP.start(
|
126
|
+
request.uri.hostname, request.uri.port,
|
127
|
+
proxy_address, proxy_port, proxy_user, proxy_pass,
|
128
|
+
use_ssl: use_ssl,
|
129
|
+
verify_mode: OpenSSL::SSL::VERIFY_NONE) do |http|
|
126
130
|
@reporter.show_verbose_message("Request sent to: #{request.uri}")
|
127
131
|
http.request(request)
|
128
132
|
end
|
129
133
|
end
|
134
|
+
|
135
|
+
def find_proxy_uri(address, port)
|
136
|
+
URI::HTTP.new(
|
137
|
+
"http", nil, address, port, nil, nil, nil, nil, nil
|
138
|
+
).find_proxy
|
139
|
+
end
|
130
140
|
end
|
131
141
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hiptest-publisher
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.16.
|
4
|
+
version: 0.16.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Hiptest R&D
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-09-
|
11
|
+
date: 2016-09-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: colorize
|