basecradle 0.17.5 → 0.17.7
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/CHANGELOG.md +32 -0
- data/README.md +4 -0
- data/lib/basecradle/errors.rb +6 -0
- data/lib/basecradle/version.rb +1 -1
- data/lib/basecradle/webhooks.rb +8 -3
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 12719d77221e0aa4407d13bfd5a261cac37c2d9fbe74fa95ab6d4570dac6a879
|
|
4
|
+
data.tar.gz: 53b26b7009e67357b2644c6f296c2cc275160efe8269894708eba951c7920f2a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7d672b4e6bd693c9c5343b40fb08041b23906e5cb0e99b6e4070381dd35b4c66d579703f6762719cdfb6db01e88b9b073cff1ffac5553d6a9adbf3aa579a9d44
|
|
7
|
+
data.tar.gz: 2283ccd47cfebf28b1e1d3b7eb208ab3cd5a5c6cb92a159a2df799f88075a76fd936bf15aa10ea7c534bf6e81a9d61c136a38d2e8602c1d7a51c59d04f8183f4
|
data/CHANGELOG.md
CHANGED
|
@@ -9,6 +9,36 @@ section**. The newest heading is always the version `lib/basecradle/version.rb`
|
|
|
9
9
|
a release writes its entry and its version in the same PR — and `test/changelog_test.rb`
|
|
10
10
|
fails CI if the two ever disagree.
|
|
11
11
|
|
|
12
|
+
## [0.17.7] - 2026-12-04
|
|
13
|
+
|
|
14
|
+
A patch release that gives an error code the platform added on 2026-12-04 a class
|
|
15
|
+
([#343](https://github.com/basecradle/basecradle-ruby/issues/343)). No verb is added or
|
|
16
|
+
removed, and no signature changes.
|
|
17
|
+
|
|
18
|
+
### Fixed
|
|
19
|
+
|
|
20
|
+
- **`invalid_parameter` maps to `BaseCradle::InvalidParameterError`.** The API documents
|
|
21
|
+
this code (`400`): a parameter (in the path, the query string or the body, a name or a
|
|
22
|
+
value) holds a NUL character, which no text field can store, so nothing was read or
|
|
23
|
+
written. It is an `InvalidRequestError`, like `invalid_cursor` and `invalid_filter`, so a
|
|
24
|
+
caller that rescues that class already catches it. Until now the registry did not list
|
|
25
|
+
it, so it would have read as a bare `BaseCradle::Error`.
|
|
26
|
+
|
|
27
|
+
## [0.17.6] - 2026-11-27
|
|
28
|
+
|
|
29
|
+
A patch release that adds one sentence to the docs
|
|
30
|
+
([#340](https://github.com/basecradle/basecradle-ruby/issues/340)). No code path changes:
|
|
31
|
+
no verb is added or removed, and no signature changes.
|
|
32
|
+
|
|
33
|
+
### Fixed
|
|
34
|
+
|
|
35
|
+
- **The docs now say what is true between the two calls that move an endpoint off
|
|
36
|
+
`sns`.** From `endpoint.clear_verification` until `endpoint.configure_verification`
|
|
37
|
+
sets the new sender's secret, the endpoint holds no credential, so, like any endpoint
|
|
38
|
+
with none, it accepts deliveries without proof.
|
|
39
|
+
`endpoint.disable` first, and `endpoint.enable` once the secret is set, refuses them in
|
|
40
|
+
the meantime. The README, `configure_verification` and `clear_verification` say so.
|
|
41
|
+
|
|
12
42
|
## [0.17.5] - 2026-11-27
|
|
13
43
|
|
|
14
44
|
A patch release that adds one sentence to the docs
|
|
@@ -1158,6 +1188,8 @@ the Python SDK's behavior in idiomatic Ruby. Zero runtime dependencies.
|
|
|
1158
1188
|
- **Quality bars** — a README-as-tested-doc harness (every example runs against a mocked
|
|
1159
1189
|
API) and a spec drift-guard (CI fails if the live API grows beyond the SDK).
|
|
1160
1190
|
|
|
1191
|
+
[0.17.7]: https://github.com/basecradle/basecradle-ruby/releases/tag/v0.17.7
|
|
1192
|
+
[0.17.6]: https://github.com/basecradle/basecradle-ruby/releases/tag/v0.17.6
|
|
1161
1193
|
[0.17.5]: https://github.com/basecradle/basecradle-ruby/releases/tag/v0.17.5
|
|
1162
1194
|
[0.17.4]: https://github.com/basecradle/basecradle-ruby/releases/tag/v0.17.4
|
|
1163
1195
|
[0.17.3]: https://github.com/basecradle/basecradle-ruby/releases/tag/v0.17.3
|
data/README.md
CHANGED
|
@@ -261,6 +261,10 @@ a secret scheme, nor a secret to `sns`, so a call that passes only `verifier:` t
|
|
|
261
261
|
with none moves between any two schemes freely. So to move an endpoint off `sns` before the
|
|
262
262
|
new sender's secret exists, clear the verification first, then name the new scheme:
|
|
263
263
|
`endpoint.clear_verification`, then `endpoint.configure_verification(verifier: "hmac_sha256_hex")`.
|
|
264
|
+
From the first call until the new sender's secret is set, the endpoint holds no credential,
|
|
265
|
+
so, like any endpoint with none, it **accepts deliveries without proof**. To refuse them in
|
|
266
|
+
the meantime, `endpoint.disable` it first (senders get `410 Gone`) and `endpoint.enable` it
|
|
267
|
+
once the secret is set.
|
|
264
268
|
The endpoint confirms the SNS subscription by itself, and the confirmation creates no event,
|
|
265
269
|
so set the ARN before you subscribe the topic: with no ARN set, the confirmation is stored as
|
|
266
270
|
an event and its `SubscribeURL` is yours to open. Topics in the standard and GovCloud regions
|
data/lib/basecradle/errors.rb
CHANGED
|
@@ -145,6 +145,11 @@ module BaseCradle
|
|
|
145
145
|
# +invalid_filter+ — a list filter value is malformed.
|
|
146
146
|
class InvalidFilterError < InvalidRequestError; end
|
|
147
147
|
|
|
148
|
+
# +invalid_parameter+ — a parameter (in the path, the query string or the body, a name or
|
|
149
|
+
# a value) holds a NUL character, which no text field can store. Nothing was read or
|
|
150
|
+
# written.
|
|
151
|
+
class InvalidParameterError < InvalidRequestError; end
|
|
152
|
+
|
|
148
153
|
# --- webhook ingest ----------------------------------------------------------------------
|
|
149
154
|
|
|
150
155
|
# +endpoint_disabled+ — webhook ingest: the endpoint is not accepting deliveries.
|
|
@@ -184,6 +189,7 @@ module BaseCradle
|
|
|
184
189
|
"rate_limited" => RateLimitedError,
|
|
185
190
|
"invalid_cursor" => InvalidCursorError,
|
|
186
191
|
"invalid_filter" => InvalidFilterError,
|
|
192
|
+
"invalid_parameter" => InvalidParameterError,
|
|
187
193
|
"endpoint_disabled" => EndpointDisabledError,
|
|
188
194
|
"payload_too_large" => PayloadTooLargeError,
|
|
189
195
|
"binary_payload" => BinaryPayloadError,
|
data/lib/basecradle/version.rb
CHANGED
data/lib/basecradle/webhooks.rb
CHANGED
|
@@ -111,7 +111,10 @@ module BaseCradle
|
|
|
111
111
|
# to "sns", so passing only +verifier+ there raises ValidationError. That rule binds
|
|
112
112
|
# only an endpoint that holds a credential: one with none moves between any two
|
|
113
113
|
# schemes freely. So to move an endpoint off "sns" before the new sender's secret
|
|
114
|
-
# exists, call clear_verification first, then name the new scheme here.
|
|
114
|
+
# exists, call clear_verification first, then name the new scheme here. From the
|
|
115
|
+
# first call until the new secret is set, the endpoint holds no credential, so, like
|
|
116
|
+
# any endpoint with none, it accepts deliveries without proof: disable it first and
|
|
117
|
+
# enable it once the secret is set to refuse them in the meantime.
|
|
115
118
|
# Under "twilio" it is a shared key made at Twilio for signing webhooks (Twilio's own
|
|
116
119
|
# recommendation) or the account's Auth Token. An endpoint holds one secret, a
|
|
117
120
|
# delivery signed with the other is refused with 401, and Twilio does not resend it
|
|
@@ -153,8 +156,10 @@ module BaseCradle
|
|
|
153
156
|
# unsigned again, and +content.verification.enabled+ reads false. The verifier
|
|
154
157
|
# stays: an endpoint with no credential moves between any two schemes freely, so this,
|
|
155
158
|
# then configure_verification(verifier: ...), moves an endpoint off "sns" before the
|
|
156
|
-
# new sender's secret exists.
|
|
157
|
-
#
|
|
159
|
+
# new sender's secret exists. From this call until the new secret is set, the
|
|
160
|
+
# endpoint, like any endpoint with no credential, accepts deliveries without proof:
|
|
161
|
+
# disable it first and enable it once the secret is set to refuse them in the
|
|
162
|
+
# meantime. Returns this endpoint, which adopts the one the API returns.
|
|
158
163
|
def clear_verification
|
|
159
164
|
adopt(require_client.request("PATCH", endpoint_path,
|
|
160
165
|
json: { "webhook_endpoint" => { "clear_credential" => true } }))
|