watchfor 0.12.0 → 0.12.1

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: b3d7fc66146ff02aa81bb3517188f14d8ce8c04b9b643b869aba9793610560b6
4
- data.tar.gz: 19c2c8f08062072d54a90fe7d848b30ae24b5997a6179ba3aac6ddd5e31008be
3
+ metadata.gz: 24445c1731afb7a7acc92e91e6e96ddae0c59d837111c2addcd5fed3c0d3727d
4
+ data.tar.gz: f38989c598bca87881af765542036fe1b8fb310c7c8c75a64487e4ef22bfa5a9
5
5
  SHA512:
6
- metadata.gz: c53ae17ddbc628f745c8099df3d1425627c1da778e616fd2a4cfc8bfca0680b56ff188881383d8f1f6cc10b68f42f53264b1cbc3ebf5f33cc4f8fb069045a703
7
- data.tar.gz: b2214618bce3e48a10c5c8bbac5c4ee60f79281445472bde3fe225e82606297b21c7e087d12da41f68a0e20c15d8e6863846608165064add64511a8562940dd2
6
+ metadata.gz: 1e9b130b18719ef0a4a08ba2df4c17b245884222e00cd140a6164a10bc8026098d99cf3db469bfea2af0b44cb98d286ddf5231d62967a2a95d1df75974a7d316
7
+ data.tar.gz: bb479462a71d46c19220fbd488c628f69bfce49b07cc6daa5430b6fc1ff3f58cf56598b2fcb3f601f086aeb60e406cc415530880cb206486ae337d95fd5e4b95
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"]
@@ -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); secrets are write-only.
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)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Watchfor
4
- VERSION = "0.12.0"
4
+ VERSION = "0.12.1"
5
5
  end
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.12.0
4
+ version: 0.12.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - WatchFor
8
- autorequire:
9
8
  bindir: exe
10
9
  cert_chain: []
11
- date: 2026-10-01 00:00:00.000000000 Z
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.4.20
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: []