watchfor 0.12.0 → 0.13.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 +5 -0
- data/lib/watchfor/client.rb +11 -1
- data/lib/watchfor/version.rb +1 -1
- metadata +3 -6
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 980b1fdcb72ae50da30b5abf19101018add41e1d1b840ef9c6378211abb07f58
|
|
4
|
+
data.tar.gz: '099d81bbfe131ceac6031c37078304a11673cd6c40219ac3b101bdf88a71ecf5'
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 040a75ce5d87d1d7ef6855edae019724e4247a3b823fdad13873611888ce98e464c2e494d4bc83682a148390c429fa01350d910cc04182ca590d2dff8da51653
|
|
7
|
+
data.tar.gz: 6b5b2506e0da8ebec2aedcf1340520287ac7456ed7ff67b800154a2591872b70c683ee2e833e49a7b48753a0c1953d593edef8803d0b46399acfe77f5a32add2
|
data/README.md
CHANGED
|
@@ -48,6 +48,11 @@ run = wf.playwright.test_run(script: script, target: "https://shop.example.com")
|
|
|
48
48
|
wf.playwright.get_test_run(run["id"]) # status: queued | running | done | error
|
|
49
49
|
wf.variables.put("LOGIN_PASSWORD", value: password, secret: true)
|
|
50
50
|
|
|
51
|
+
# The same org secrets in HTTP/API/MCP checks: {{NAME}} in auth, a header or the body
|
|
52
|
+
wf.variables.put("API_TOKEN", value: token, secret: true)
|
|
53
|
+
wf.monitors.update(api_monitor_id, { config: { requestHeaders: [
|
|
54
|
+
{ key: "Authorization", value: "Bearer {{API_TOKEN}}" }] } })
|
|
55
|
+
|
|
51
56
|
# Older checks: pass next_cursor back as cursor (keep the same hours/success)
|
|
52
57
|
page = wf.monitors.checks(mon["id"], hours: 24, limit: 100)
|
|
53
58
|
wf.monitors.checks(mon["id"], hours: 24, limit: 100, cursor: page["next_cursor"]) if page["next_cursor"]
|
data/lib/watchfor/client.rb
CHANGED
|
@@ -133,7 +133,16 @@ module Watchfor
|
|
|
133
133
|
def list(**query) = @c.request("GET", "/monitors", query: query)
|
|
134
134
|
# The monitor plus available_metrics (alert metrics valid for its type).
|
|
135
135
|
def get(id) = @c.request("GET", "/monitors/#{id}")
|
|
136
|
+
# Credentials (catalog fields marked secret: mailbox/SMTP/FTP passwords,
|
|
137
|
+
# SSH keys, HTTP/API/MCP auth passwords, bearer tokens and credential
|
|
138
|
+
# header values) are write-only: stored encrypted, returned as
|
|
139
|
+
# "[redacted]". {{NAME}} in an auth field, header or body uses an org
|
|
140
|
+
# variable or secret.
|
|
136
141
|
def create(body, idempotency_key: nil) = @c.request("POST", "/monitors", body: body, idempotency_key: idempotency_key)
|
|
142
|
+
# config is merged (omitted keys kept, nil removes). A "[redacted]"
|
|
143
|
+
# credential is kept when omitted or sent back; changing the server,
|
|
144
|
+
# port, TLS mode or login it is used with (HTTP: the URL's host, port
|
|
145
|
+
# or scheme) needs it again (else 400).
|
|
137
146
|
def update(id, body) = @c.request("PATCH", "/monitors/#{id}", body: body)
|
|
138
147
|
def delete(id) = @c.request("DELETE", "/monitors/#{id}")
|
|
139
148
|
def pause(id) = @c.request("POST", "/monitors/#{id}/pause")
|
|
@@ -178,7 +187,8 @@ module Watchfor
|
|
|
178
187
|
def get_test_run(id) = @c.request("GET", "/playwright/test-runs/#{id}")
|
|
179
188
|
end
|
|
180
189
|
|
|
181
|
-
# Org variables and secrets (process.env.NAME
|
|
190
|
+
# Org variables and secrets (process.env.NAME in browser checks, {{NAME}}
|
|
191
|
+
# in HTTP/API/MCP checks); secrets are write-only.
|
|
182
192
|
class Variables < Namespace
|
|
183
193
|
def list = @c.request("GET", "/variables")
|
|
184
194
|
def put(name, value: nil, secret: false)
|
data/lib/watchfor/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: watchfor
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.13.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- WatchFor
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: exe
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
11
|
dependencies: []
|
|
13
12
|
description: Zero-dependency Ruby client for the WatchFor REST API (monitors, alert
|
|
14
13
|
rules, incidents, maintenance windows) plus a `watchfor` CLI.
|
|
@@ -33,7 +32,6 @@ metadata:
|
|
|
33
32
|
documentation_uri: https://watchfor.io/docs/api
|
|
34
33
|
changelog_uri: https://watchfor.io/changelog
|
|
35
34
|
rubygems_mfa_required: 'true'
|
|
36
|
-
post_install_message:
|
|
37
35
|
rdoc_options: []
|
|
38
36
|
require_paths:
|
|
39
37
|
- lib
|
|
@@ -48,8 +46,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
48
46
|
- !ruby/object:Gem::Version
|
|
49
47
|
version: '0'
|
|
50
48
|
requirements: []
|
|
51
|
-
rubygems_version: 3.
|
|
52
|
-
signing_key:
|
|
49
|
+
rubygems_version: 3.6.7
|
|
53
50
|
specification_version: 4
|
|
54
51
|
summary: Official Ruby SDK + CLI for WatchFor — uptime & infrastructure monitoring.
|
|
55
52
|
test_files: []
|