basecradle 0.11.0 → 0.12.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: 40d7b447c5bbeb18244e440069f09432d808525a96ef2aa1232ae560c3c41194
4
- data.tar.gz: 12bcc5f74631bd1f48fa8fbe6ea0882283e03cddfcdf68336ed631e7a68e8325
3
+ metadata.gz: 38e4a8615dfc599f925f007f022e20323dbb39555dbcc3556a867ccc7d6026dd
4
+ data.tar.gz: 8460d80cc0d400cf5c513ba77f92589a7150f7b10df083c6cb2c123fc60692d3
5
5
  SHA512:
6
- metadata.gz: 235a1d21044f525ca69c2cffb0909ffc05e8dcd2e63da7d2d5db51f30b34a7eeecf73434a029fc80b08421c1e04dcc61d0461f92e657e27a6b140a19e5f378f0
7
- data.tar.gz: aa1f71ee1a7efdde1ca609d0768e23efc4c9a2b0f63602e43411752f05ef470b5bfb9cbb0eb4c2c3df38b99b3ca89fedf7de302ff01af5eafd869cd82af8208c
6
+ metadata.gz: 425c45374d3c0915d392836fdc70e31962f02cec3ab4c6e625954dae83fb0dae58684e768b525860a074c6ce06f3fd92f0e4fe1de10d194a36ccc5eb6c1ad8e5
7
+ data.tar.gz: 9c3b1d147958205aff066f2d17f82841e5ac940279a7cd1c0da1b7be398942f7022dae0ff2f9b1f6a3cc44f407b1242c42da010cb9880a79359a0e2625474ee1
data/CHANGELOG.md CHANGED
@@ -9,6 +9,25 @@ 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.12.0] - 2026-10-17
13
+
14
+ ### Changed
15
+
16
+ - **Breaking: `contact_message.update_status(status)` is now `contact_message.set_status(status)`**
17
+ ([#234](https://github.com/basecradle/basecradle-ruby/issues/234)). Same operation
18
+ (`PATCH /contact_messages/{id}/status`), same argument, same in-place update and
19
+ `self` return; only the name changes. An operation's verb is part of the SDK
20
+ contract: one operation, one verb in every SDK, taken from the API documentation's
21
+ name for it ("Setting a Contact Message's Status"). The Python SDK already says
22
+ `set_status`; this release brings Ruby to the same word (`@origin`, 2026-10-16;
23
+ basecradle#691). No alias is kept — the gem is 0.x and the method shipped one
24
+ release ago.
25
+
26
+ ### Migrating
27
+
28
+ Rename the call: `message.update_status("spam")` becomes `message.set_status("spam")`.
29
+ Calling the old name raises `NoMethodError`.
30
+
12
31
  ## [0.11.0] - 2026-10-10
13
32
 
14
33
  ### Added
@@ -653,6 +672,7 @@ the Python SDK's behavior in idiomatic Ruby. Zero runtime dependencies.
653
672
  - **Quality bars** — a README-as-tested-doc harness (every example runs against a mocked
654
673
  API) and a spec drift-guard (CI fails if the live API grows beyond the SDK).
655
674
 
675
+ [0.12.0]: https://github.com/basecradle/basecradle-ruby/releases/tag/v0.12.0
656
676
  [0.11.0]: https://github.com/basecradle/basecradle-ruby/releases/tag/v0.11.0
657
677
  [0.10.4]: https://github.com/basecradle/basecradle-ruby/releases/tag/v0.10.4
658
678
  [0.10.3]: https://github.com/basecradle/basecradle-ruby/releases/tag/v0.10.3
data/README.md CHANGED
@@ -361,7 +361,7 @@ bc.contact_messages.filter(status: "received").each do |message| # newest first
361
361
  puts message.honeypot_filled # the bot trap: the platform records it, never acts on it
362
362
  puts message.data.keys.inspect # one self-describing slot per vendor
363
363
 
364
- message.update_status("spam") if message.honeypot_filled # "received" | "closed" | "spam"
364
+ message.set_status("spam") if message.honeypot_filled # "received" | "closed" | "spam"
365
365
  end
366
366
 
367
367
  message = bc.contact_messages.get("019e7750-66ee-7b28-b052-67cdb5b10ca0")
@@ -373,7 +373,7 @@ bc.notes.each { |n| puts n.body } # every note, across every subject, newest fi
373
373
  ```
374
374
 
375
375
  A contact message is a flat record with no `type`/`content` wrapper, so `message.uuid`
376
- is its identity. `update_status` changes the triage verdict in any direction (reopen with
376
+ is its identity. `set_status` changes the triage verdict in any direction (reopen with
377
377
  `"received"`). It updates the object you called it on and returns it. `add_note` returns
378
378
  the new `BaseCradle::Note` and leaves `message.notes` as it was fetched, so call
379
379
  `bc.contact_messages.get` again to read the record with the new note embedded. A note
@@ -44,14 +44,14 @@ module BaseCradle
44
44
  # identity, and it embeds its notes in full.
45
45
  #
46
46
  # Nothing is ever rejected on a score — the record is the data, and an admin decides,
47
- # with +update_status+ and +add_note+.
47
+ # with +set_status+ and +add_note+.
48
48
  class ContactMessage < ApiObject
49
49
  attribute :uuid
50
50
  attribute :name
51
51
  attribute :email_address
52
52
  attribute :body
53
53
  # "received" (the default) | "closed" | "spam" — the triage verdict, set with
54
- # +update_status+. Treat an unrecognized value as forward-compatible, never an error.
54
+ # +set_status+. Treat an unrecognized value as forward-compatible, never an error.
55
55
  attribute :status
56
56
  # The signed-in user who submitted it (nested-actor form), or +nil+ for a visitor
57
57
  # without an account.
@@ -72,12 +72,12 @@ module BaseCradle
72
72
  attribute :updated_at
73
73
 
74
74
  # Set the triage verdict: +"received"+, +"closed"+ or +"spam"+. It moves in any
75
- # direction — reopening a closed message is +update_status("received")+.
75
+ # direction — reopening a closed message is +set_status("received")+.
76
76
  #
77
77
  # Live object: the API returns the whole contact message, and this object reads it from
78
78
  # here on (+status+ and +updated_at+ included), then returns +self+. Raises
79
79
  # +ValidationError+ (422) for a status outside the three.
80
- def update_status(status)
80
+ def set_status(status)
81
81
  response = require_client.request("PATCH", "/contact_messages/#{uuid}/status",
82
82
  json: { "contact_message" => { "status" => status } })
83
83
  @data = response.fetch("contact_message")
@@ -106,7 +106,7 @@ module BaseCradle
106
106
  # or fetch one by uuid. Admin-only.
107
107
  #
108
108
  # bc.contact_messages.filter(status: "received").each do |message|
109
- # message.update_status("spam") if message.honeypot_filled
109
+ # message.set_status("spam") if message.honeypot_filled
110
110
  # end
111
111
  class ContactMessagesResource
112
112
  include Enumerable
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module BaseCradle
4
- VERSION = "0.11.0"
4
+ VERSION = "0.12.0"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: basecradle
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.0
4
+ version: 0.12.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Drawk Kwast