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: 185d016ac259cbfe17cdc82fe47bdea64ad3e7287868a1579b0ca5e5ad3af8ca
4
- data.tar.gz: ea6d44b3f5333e9f28453cde81879a97ba97bba9007ec2c1541c8671821be84f
3
+ metadata.gz: 99a845d5e5c412d2d5ba8390da8fa82f8a884fd1983248f5f849481099e09ee6
4
+ data.tar.gz: 46ff54c844d4be91ddd8552bcc5dfa9e6b2dca89edd3e02617a772a61e328184
5
5
  SHA512:
6
- metadata.gz: cabbd80f4367b823ad48ae22a3f5cb9c510a67e3b23e42f6c573d08c31b8bec9fbca5262774b82c1e77e039593f38a78e9ba69d6c85be754f8cd066b71b637f4
7
- data.tar.gz: '09066c489cf198270f64e6ff08dbfbd12856323dcc89147293c3fce5db6872b0e6f679165ea97b14c2f2a0725f42965cf5f84dc38e8278292091996a069f9404'
6
+ metadata.gz: fed65583c4e0c6fb3d243bdce9f9ad583f4305005548358cdb5afe648e68358c4310562edca5ab69537111226da449780f4c5a9a862fe726b46a19130409131d
7
+ data.tar.gz: 8032cc0c6540ce248404b9d5d7368010149549539d9224fc0818dbcffb4f2ca8670caeb0297248e2d3af9027d0e282200765ef14027f40488f80f37875c2651a
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.8.4
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
- # Default threshold is 1.month
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
- spawn_sub("ssl_expiration", page, opts[:ssl_expiration].is_a?(Hash) ? opts[:ssl_expiration] : {})
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
 
@@ -1,4 +1,4 @@
1
1
  module WatchmonkeyCli
2
- VERSION = "1.8.4"
2
+ VERSION = "1.8.5"
3
3
  UPDATE_URL = "https://raw.githubusercontent.com/2called-chaos/watchmonkey_cli/master/VERSION"
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: watchmonkey_cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.4
4
+ version: 1.8.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sven Pachnit