hookworm-base 0.3.3 → 0.3.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/hookworm/base/version.rb +1 -1
- data/lib/hookworm/config.rb +11 -7
- 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: bf219b3c076a170ac30f683affca3abe75832ef1
|
4
|
+
data.tar.gz: 05a769ce3ae6a5243a3d750781c356285878dae7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 090e6fc366a736bcfd84027980425c5ac8d43182c3f4e4a787b285eec06a7d6206d224b57907b85c6b54a39e1137690530202a0ea81d5a5e5f669364867a83d4
|
7
|
+
data.tar.gz: 61ab121a75e5cebf4f30f0b7edf6b0f7f2f6141c500730d08214e1d0a053a7aec23be4082c1e1e0cac0d3dc54268896c2b7fde1f8f1b0e748effbc98046da123
|
data/lib/hookworm/config.rb
CHANGED
@@ -21,13 +21,8 @@ module Hookworm
|
|
21
21
|
end
|
22
22
|
|
23
23
|
def raw_http_cfg
|
24
|
-
|
25
|
-
|
26
|
-
ssl_timeout: 2.0,
|
27
|
-
open_timeout: 2.0,
|
28
|
-
read_timeout: 10.0
|
29
|
-
}
|
30
|
-
Net::HTTP.start(http_cfg_uri.host, http_cfg_uri.port, opts) do |http|
|
24
|
+
Net::HTTP.start(http_cfg_uri.host, http_cfg_uri.port,
|
25
|
+
raw_http_cfg_opts) do |http|
|
31
26
|
req = Net::HTTP::Get.new(http_cfg_uri.request_uri)
|
32
27
|
if http_cfg_uri.user && http_cfg_uri.password
|
33
28
|
req.basic_auth(http_cfg_uri.user, http_cfg_uri.password)
|
@@ -36,6 +31,15 @@ module Hookworm
|
|
36
31
|
end
|
37
32
|
end
|
38
33
|
|
34
|
+
def raw_http_cfg_opts
|
35
|
+
{
|
36
|
+
use_ssl: http_cfg_uri.scheme == 'https',
|
37
|
+
ssl_timeout: 2.0,
|
38
|
+
open_timeout: 2.0,
|
39
|
+
read_timeout: 10.0
|
40
|
+
}
|
41
|
+
end
|
42
|
+
|
39
43
|
def http_cfg_uri
|
40
44
|
@http_cfg_uri ||= URI(ENV['HOOKWORM_HTTP_CFG'])
|
41
45
|
end
|