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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 52bdfe4d4d6aa5580e89ea85b1966b865d33b3c945ed165b570f2284bc04b5f7
4
- data.tar.gz: e6ca07b3a474a8601d85e652418c6c0d3dc06cf8439d91a1e326dae3525b0145
3
+ metadata.gz: 4922ce5a8ab3f8757d67110dd6705ec23cd07190e2ce12fb8e3a76b0bef72cd7
4
+ data.tar.gz: 53ae8a93fb27b7e96ca47cd7383fbbbc1207c1cadc597316429b6b4f43232521
5
5
  SHA512:
6
- metadata.gz: 0d68188b431c8e304b7a7b807207d37cb7f5e16e5b3f896ab330994d1bc1cdd200338745fc0ca1a8a0bcffd082ae6bb48da2d7d8e279cc1254829c6bfdc11b5d
7
- data.tar.gz: 6bfd789a1c7933cb7bd856a3784d93fced814961df91102aac1bcfd4b48a39126102aa69eeba3f81753b2dd6828f3daec07c329d13435acb4fecfdef846dc17a
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"]
@@ -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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Watchfor
4
- VERSION = "0.9.0"
4
+ VERSION = "0.10.0"
5
5
  end
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.9.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-22 00:00:00.000000000 Z
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.