watchmonkey_cli 1.8.4 → 1.8.5
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 99a845d5e5c412d2d5ba8390da8fa82f8a884fd1983248f5f849481099e09ee6
|
4
|
+
data.tar.gz: 46ff54c844d4be91ddd8552bcc5dfa9e6b2dca89edd3e02617a772a61e328184
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fed65583c4e0c6fb3d243bdce9f9ad583f4305005548358cdb5afe648e68358c4310562edca5ab69537111226da449780f4c5a9a862fe726b46a19130409131d
|
7
|
+
data.tar.gz: 8032cc0c6540ce248404b9d5d7368010149549539d9224fc0818dbcffb4f2ca8670caeb0297248e2d3af9027d0e282200765ef14027f40488f80f37875c2651a
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.8.
|
1
|
+
1.8.5
|
@@ -32,7 +32,12 @@ ssh_connection :my_server, host: "wheel@example.com", port: 23 # additional opti
|
|
32
32
|
# SSL expiration
|
33
33
|
# -----
|
34
34
|
# Check if a SSL certificate is about to expire.
|
35
|
-
#
|
35
|
+
# Available options:
|
36
|
+
#
|
37
|
+
# timeout Maximum time to wait for request (default: 20 seconds)
|
38
|
+
# verify If enabled the peer will be verified (default: true)
|
39
|
+
# threshold Minimum certificate lifetime before showing warnings (default: 1.month)
|
40
|
+
#
|
36
41
|
ssl_expiration "https://example.com", threshold: 3.months
|
37
42
|
|
38
43
|
|
@@ -4,7 +4,7 @@ module WatchmonkeyCli
|
|
4
4
|
self.checker_name = "ssl_expiration"
|
5
5
|
|
6
6
|
def enqueue page, opts = {}
|
7
|
-
opts = { threshold: 1.months, verify: true }.merge(opts)
|
7
|
+
opts = { threshold: 1.months, verify: true, timeout: 20 }.merge(opts)
|
8
8
|
app.enqueue(self, page, opts)
|
9
9
|
end
|
10
10
|
|
@@ -13,6 +13,8 @@ module WatchmonkeyCli
|
|
13
13
|
http = Net::HTTP.new(uri.host, uri.port)
|
14
14
|
http.use_ssl = true
|
15
15
|
http.verify_mode = opts[:verify] ? OpenSSL::SSL::VERIFY_PEER : OpenSSL::SSL::VERIFY_NONE
|
16
|
+
http.open_timeout = opts[:timeout]
|
17
|
+
http.read_timeout = opts[:timeout]
|
16
18
|
cert = nil
|
17
19
|
http.start do |h|
|
18
20
|
cert = h.peer_cert
|
@@ -8,7 +8,8 @@ module WatchmonkeyCli
|
|
8
8
|
|
9
9
|
# if available enable ssl_expiration support
|
10
10
|
if page.start_with?("https://") && opts[:ssl_expiration] != false && !app.running?
|
11
|
-
|
11
|
+
sopts = { timeout: opts[:timeout] }.merge(opts[:ssl_expiration].is_a?(Hash) ? opts[:ssl_expiration] : {})
|
12
|
+
spawn_sub("ssl_expiration", page, sopts)
|
12
13
|
end
|
13
14
|
end
|
14
15
|
|