watchfor 0.9.0 → 0.10.0
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 +4 -4
- data/README.md +3 -0
- data/lib/watchfor/client.rb +11 -1
- data/lib/watchfor/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 4922ce5a8ab3f8757d67110dd6705ec23cd07190e2ce12fb8e3a76b0bef72cd7
|
|
4
|
+
data.tar.gz: 53ae8a93fb27b7e96ca47cd7383fbbbc1207c1cadc597316429b6b4f43232521
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a6fcfeb516a7621f6aa6b8dc18eb0492b928052158aee32cd51319344d06e210006527303927f5453f1b0106fcfe4dafeb10f18ea3b1584670b6532b8049f714
|
|
7
|
+
data.tar.gz: 37a2e3ad2df077d130609042d0c61cb2aabb8bacb1d9f56c2fff503f819f09d5847f5d6e33334c3267342d91f504f5e3811888c336e447a91341d6cf8386510d
|
data/README.md
CHANGED
|
@@ -40,6 +40,9 @@ wf.incidents.exclude(19351, reason: "Probe-side DNS hiccup")
|
|
|
40
40
|
# Irreversible: wipe a monitor's checks and incidents; uptime restarts "since reset"
|
|
41
41
|
wf.monitors.reset(mon["id"])
|
|
42
42
|
|
|
43
|
+
# Page integrity: after a deploy, accept what the newest check saw as the new baseline
|
|
44
|
+
wf.monitors.accept_baseline(integrity_monitor_id)
|
|
45
|
+
|
|
43
46
|
# Older checks: pass next_cursor back as cursor (keep the same hours/success)
|
|
44
47
|
page = wf.monitors.checks(mon["id"], hours: 24, limit: 100)
|
|
45
48
|
wf.monitors.checks(mon["id"], hours: 24, limit: 100, cursor: page["next_cursor"]) if page["next_cursor"]
|
data/lib/watchfor/client.rb
CHANGED
|
@@ -136,10 +136,20 @@ module Watchfor
|
|
|
136
136
|
# Recent probe results, newest first. Page with the response's next_cursor -> cursor:
|
|
137
137
|
# (keep the same hours/success); "locations" is the per-location breakdown for the whole window.
|
|
138
138
|
def checks(id, hours: nil, limit: nil, success: nil, cursor: nil, **query)
|
|
139
|
-
def check_detail(id, run_id) = @c.request("GET", "/monitors/#{id}/checks/#{run_id}")
|
|
140
139
|
@c.request("GET", "/monitors/#{id}/checks",
|
|
141
140
|
query: { hours: hours, limit: limit, success: success, cursor: cursor, **query })
|
|
142
141
|
end
|
|
142
|
+
# One check in full detail (redacted).
|
|
143
|
+
def check_detail(id, run_id) = @c.request("GET", "/monitors/#{id}/checks/#{run_id}")
|
|
144
|
+
# Page integrity monitors: the accepted baseline of every watched page.
|
|
145
|
+
def baseline(id) = @c.request("GET", "/monitors/#{id}/baseline")
|
|
146
|
+
# Page integrity monitors: accept what the newest check saw as the new
|
|
147
|
+
# baseline — all pages, or only `pages:`. Call it from a deploy pipeline
|
|
148
|
+
# a minute after the release; unfetched pages come back in "skipped".
|
|
149
|
+
def accept_baseline(id, pages: nil, idempotency_key: nil)
|
|
150
|
+
@c.request("POST", "/monitors/#{id}/baseline",
|
|
151
|
+
body: pages ? { pages: pages } : {}, idempotency_key: idempotency_key)
|
|
152
|
+
end
|
|
143
153
|
end
|
|
144
154
|
|
|
145
155
|
class AlertRules < Namespace
|
data/lib/watchfor/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: watchfor
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.10.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- WatchFor
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-09-
|
|
11
|
+
date: 2026-09-25 00:00:00.000000000 Z
|
|
12
12
|
dependencies: []
|
|
13
13
|
description: Zero-dependency Ruby client for the WatchFor REST API (monitors, alert
|
|
14
14
|
rules, incidents, maintenance windows) plus a `watchfor` CLI.
|