basecradle 0.14.0 → 0.14.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: e52bd37f68c6961351dde4657cb665f346548f20023d9372166333ff943529b0
4
- data.tar.gz: f5725693ace3374348be8ef9771db763533d7526ff902ac7f029b3425e061137
3
+ metadata.gz: e24738f465459e941778b070a1ffc7efa17706bf50394d390eb0e79956ced97a
4
+ data.tar.gz: a6ff325d3f9982308e095d8301f84be8c6684f74fb979529b1a054277da49004
5
5
  SHA512:
6
- metadata.gz: 0c2c1cb2a1b5d23214bb743a6be23f1756565696bb2cb807f7c1634fa0fc4c24a326ea862fcbac2d25ed78b8f41f3ee1c1017dea3ca025909345a78b81703058
7
- data.tar.gz: 70618de428d28dfa790c95f278ddcd043062c0759efd30f1c277204f1704b031977560ada0c8e31ad35c5ac8957e9010c4be846696b2ab011b6fc4a1eae0c91c
6
+ metadata.gz: fcc928a5d0316b25def0963fcc20aec41e298d2a3a249f8fb45e8b0b56715496793a629fbdb895c84f24f322d231734c6a2b8824b73235fab547982e19755434
7
+ data.tar.gz: cb8dcf49330a18e7e05851a62e802d35fd21d975ff15947b96c0ec909013b4087ff92ce9a7978f09b14e90e64eefb02b9d6785415054586c9e219eb3a1c4f5ce
data/CHANGELOG.md CHANGED
@@ -9,6 +9,49 @@ 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.14.1] - 2026-11-16
13
+
14
+ A patch release. It carries one behavior fix brought over from the Python SDK and a
15
+ corrected description of an asset's download link. No method is added or removed, and no
16
+ calling code needs to change.
17
+
18
+ ### Fixed
19
+
20
+ - **An empty `idempotency_key` sends no header**
21
+ ([#260](https://github.com/basecradle/basecradle-ruby/pull/260), mirroring Python
22
+ 0.16.0). Passing `idempotency_key: ""` to `timeline.messages.create`,
23
+ `timeline.assets.create`, `timeline.tasks.create` or `timeline.webhook_endpoints.create`
24
+ used to send an empty `Idempotency-Key` header. An empty string now counts as no key,
25
+ the same as `nil`: no header is sent. Retries are unchanged: a create without a key was
26
+ never auto-retried, and an empty key was already treated that way.
27
+
28
+ ### Changed
29
+
30
+ - **An asset's `file.url` is described as a one-hour link**
31
+ ([#266](https://github.com/basecradle/basecradle-ruby/pull/266)). Since 2026-11-06 the
32
+ platform's download link is valid for one hour from the response that carried it, and
33
+ needs no credentials while it is valid. The README's example called it an
34
+ authenticated download URL, and the `BaseCradle::AssetFile` documentation called it a
35
+ dereferenceable one. Both now say what it is: treat the link like a secret, do not store
36
+ it, and read the asset again for a fresh one. The SDK's behavior is unchanged; it returns `url` as the platform sends
37
+ it.
38
+ - **Ruby 4.0 is tested in CI**
39
+ ([#280](https://github.com/basecradle/basecradle-ruby/pull/280)). The gemspec already
40
+ allowed it (`>= 3.2`). Every change is now tested on Ruby 3.2, 3.3, 3.4 and 4.0. The
41
+ floor stays at 3.2.
42
+
43
+ ### Security
44
+
45
+ - **The release workflow's publish job runs actions pinned to commit SHAs**
46
+ ([#285](https://github.com/basecradle/basecradle-ruby/pull/285)). The publish job is
47
+ the one that can push this gem to RubyGems. It used `actions/checkout`,
48
+ `ruby/setup-ruby` and `rubygems/release-gem` by tag or branch, so a change to one of
49
+ those references upstream would have run in it. Each is now pinned to a full commit
50
+ SHA, and 0.14.1 is the first release published that way. The rehearsal job before it
51
+ and the CI jobs still use version tags; that is tracked in
52
+ [#286](https://github.com/basecradle/basecradle-ruby/issues/286). Nothing in the gem
53
+ itself changes.
54
+
12
55
  ## [0.14.0] - 2026-10-23
13
56
 
14
57
  A parity release. The first full SDK parity audit (basecradle#715) checked every issue
@@ -730,6 +773,7 @@ the Python SDK's behavior in idiomatic Ruby. Zero runtime dependencies.
730
773
  - **Quality bars** — a README-as-tested-doc harness (every example runs against a mocked
731
774
  API) and a spec drift-guard (CI fails if the live API grows beyond the SDK).
732
775
 
776
+ [0.14.1]: https://github.com/basecradle/basecradle-ruby/releases/tag/v0.14.1
733
777
  [0.14.0]: https://github.com/basecradle/basecradle-ruby/releases/tag/v0.14.0
734
778
  [0.13.0]: https://github.com/basecradle/basecradle-ruby/releases/tag/v0.13.0
735
779
  [0.12.0]: https://github.com/basecradle/basecradle-ruby/releases/tag/v0.12.0
data/README.md CHANGED
@@ -120,7 +120,7 @@ message = timeline.messages.create(body: "Hello from a peer.")
120
120
  puts message.content.body
121
121
 
122
122
  asset = timeline.assets.create(file: "./report.pdf", description: "Quarterly report")
123
- puts asset.content.file.url # authenticated download URL
123
+ puts asset.content.file.url # download link: valid for one hour, no credentials needed
124
124
 
125
125
  task = timeline.tasks.create(instructions: "Review the report.", activate_at: Time.utc(2026, 7, 1, 15))
126
126
  puts task.content.status # "pending"
@@ -18,9 +18,10 @@ module BaseCradle
18
18
 
19
19
  # The per-request headers carrying an optional idempotency key — +nil+ when no key was
20
20
  # given (so a create without a key sends no +Idempotency-Key+ header, and is never
21
- # auto-retried). Shared by the four content-create methods.
21
+ # auto-retried). An empty string is no key, the same as +nil+. Shared by the four
22
+ # content-create methods.
22
23
  def self.idempotency_headers(key)
23
- key.nil? ? nil : { "Idempotency-Key" => key }
24
+ key.to_s.empty? ? nil : { "Idempotency-Key" => key }
24
25
  end
25
26
 
26
27
  # A read-only, wire-exact view of one API JSON object.
@@ -36,7 +36,9 @@ module BaseCradle
36
36
  attribute :content, wrap: MessageContent
37
37
  end
38
38
 
39
- # An asset's attached file: metadata plus a dereferenceable download URL.
39
+ # An asset's attached file: metadata plus a download link. The link (+url+) is valid for
40
+ # one hour from the response that carried it and needs no credentials while it is valid,
41
+ # so treat it like a secret, do not store it, and read the asset again for a fresh one.
40
42
  class AssetFile < ApiObject
41
43
  attribute :filename
42
44
  attribute :byte_size
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module BaseCradle
4
- VERSION = "0.14.0"
4
+ VERSION = "0.14.1"
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.14.0
4
+ version: 0.14.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Drawk Kwast