uploadcare-ruby 5.0.0.rc1 → 5.0.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: de585668a800a9c568b1c24ee4458a9347ca6d33b7ef89c395959682a0904b84
4
- data.tar.gz: 866e8cbadbe47bae82d442d99a4dd5c4d5174fe7d18829b4d6a98658000975b0
3
+ metadata.gz: b00b913c8479a90ace5e4c44800bec64fe8ff94f2c04d50de2abfcdd627d44d3
4
+ data.tar.gz: 5b00dd30f553d1b300fe5a0013f3890de574ab48221a5735cb049ae5f62c62f8
5
5
  SHA512:
6
- metadata.gz: 1f57d707ac7d812cf8a68c9328cc0ff29b81863d3f680a0be802f8c32423e9e369f78083edf035c195972abcff3a20fa2e6ea122b85f3de5a3cb496928b2831e
7
- data.tar.gz: 0d0cca16356a961e43bfa8b04f21bbab6b166c0fdb57af4e392ba57a39ae2eb15236d3810d684e70d304562bb21c952ffba9e8a7256b277bfc449b431166a5a0
6
+ metadata.gz: 8c92a051097323fc96ebfe5cd798faf6d82cbf20cdceb683529f19d0311cd68fff3d5f2c53f20ebb6d9f14fcadada16e0c5ea892122dce2846e35a9fdfdb590e
7
+ data.tar.gz: 9720e878e6c6a29baf5ec7be621a46598f431da9ddd06b84ab75627eaa3256bd226ec768ce1d3c024c915c7937ee7a0fe29802ae1c6c3331e8c8415e71e222e6
data/CHANGELOG.md CHANGED
@@ -1,8 +1,17 @@
1
1
  # Changelog
2
2
 
3
- ## 5.0.0.rc1 — 2026-04-22
3
+ ## 5.0.1 — 2026-06-09
4
4
 
5
- This release candidate is the first public v5 cut from the rewritten codebase.
5
+ ### Fixed
6
+
7
+ * Upload API requests now send the SDK-generated `User-Agent` instead of Faraday's default header.
8
+ * Multipart upload part requests to presigned URLs now include the same SDK-generated `User-Agent`.
9
+
10
+ ## 5.0.0 — 2026-05-17
11
+
12
+ v5 is stable.
13
+ No API changes since `5.0.0.rc1`.
14
+ This cut removes the prerelease suffix, ports the relevant upstream release-readiness updates, and publishes the v5 line as stable.
6
15
 
7
16
  Please review [`MIGRATING_V5.md`](./MIGRATING_V5.md) before upgrading from v4.x.
8
17
 
@@ -12,6 +21,7 @@ Please review [`MIGRATING_V5.md`](./MIGRATING_V5.md) before upgrading from v4.x.
12
21
  * Full endpoint-parity access through `client.api.rest` and `client.api.upload`
13
22
  * Canonical endpoint examples for the REST API and Upload API under `api_examples/`
14
23
  * Updated workflow-oriented examples under `examples/`
24
+ * Context7 configuration tuned for the v5 client-first API and example layout
15
25
  * Multi-account configuration support through client-scoped `Uploadcare::Configuration`
16
26
  * Documented internal API surface through YARD for maintainers and integrators
17
27
  * Ruby 4.0 support in the test matrix
@@ -46,14 +56,20 @@ Please review [`MIGRATING_V5.md`](./MIGRATING_V5.md) before upgrading from v4.x.
46
56
  * REST authenticator now uses deterministic protocol-required digests (`MD5` body digest and `SHA1` HMAC digest)
47
57
  * Upload API debug logger now avoids emitting request/response headers and bodies by default
48
58
  * Thread-safe lazy memoization for client/accessor/API endpoint objects and CNAME cache internals
59
+ * Test fixture generation now closes source and destination file handles correctly
49
60
 
50
61
  ### Removed
51
62
 
52
63
  * Support for Ruby versions below `3.3`
53
64
  * Legacy configuration and transport patterns that were no longer aligned with the v5 architecture
65
+
54
66
  ### Risk & Rollout Notes
67
+
55
68
  * Ruby support baseline is now `>= 3.3`; verify application/runtime images before upgrading.
56
- * Recommended rc1 rollout: wire explicit `Uploadcare::Client` instances first, then migrate call sites incrementally.
69
+ * Recommended rollout: wire explicit `Uploadcare::Client` instances first, then migrate call sites incrementally.
70
+ * Validate large-file uploads because multipart retry and cancellation behavior was hardened.
71
+ * Validate custom REST signing integrations if your app reimplements signing outside this gem.
72
+ * After deploy, monitor upload errors, multipart worker failures, and REST signing errors for 24-72 hours.
57
73
  * Keep rollback simple by pinning to the latest v4 release if your app depends on removed internal APIs.
58
74
 
59
75
  ## 4.5.0 — 2025-07-25
data/context7.json ADDED
@@ -0,0 +1,74 @@
1
+ {
2
+ "$schema": "https://context7.com/schema/context7.json",
3
+ "projectTitle": "Uploadcare Ruby",
4
+ "description": "Ruby API client for Uploadcare uploads, file management, conversions, webhooks, add-ons, and signed CDN URLs.",
5
+ "url": "https://context7.com/uploadcare/uploadcare-ruby",
6
+ "public_key": "pk_WoigIc3LrHKMjLxnI0IA2",
7
+ "branch": "main",
8
+ "folders": [
9
+ "lib",
10
+ "api_examples",
11
+ "examples",
12
+ "docs"
13
+ ],
14
+ "excludeFolders": [
15
+ ".github",
16
+ "bin",
17
+ "spec",
18
+ "vendor",
19
+ "tmp",
20
+ "coverage",
21
+ "pkg",
22
+ "doc",
23
+ "*archive*",
24
+ "*archived*",
25
+ "old",
26
+ "docs/old",
27
+ "*deprecated*",
28
+ "*legacy*",
29
+ "*previous*",
30
+ "*outdated*",
31
+ "*superseded*"
32
+ ],
33
+ "excludeFiles": [
34
+ "CHANGELOG.md",
35
+ "changelog.md",
36
+ "CHANGELOG.mdx",
37
+ "changelog.mdx",
38
+ "LICENSE",
39
+ "LICENSE.md",
40
+ "license.md",
41
+ "CODE_OF_CONDUCT.md",
42
+ "code_of_conduct.md",
43
+ "Gemfile",
44
+ "Rakefile",
45
+ "uploadcare-ruby.gemspec",
46
+ ".rspec",
47
+ ".rubocop.yml",
48
+ ".yardopts"
49
+ ],
50
+ "rules": [
51
+ "Install the gem as `uploadcare-ruby` and require it with `require \"uploadcare\"`.",
52
+ "Prefer explicit `Uploadcare::Client` instances for application code, especially when an app uses more than one Uploadcare project.",
53
+ "Configure credentials with `Uploadcare::Client.new(public_key: ..., secret_key: ...)`, `Uploadcare.configure`, or the UPLOADCARE_PUBLIC_KEY and UPLOADCARE_SECRET_KEY environment variables.",
54
+ "Never hardcode real Uploadcare API keys in examples or application code; use environment variables or an application secrets store.",
55
+ "Use `client.files`, `client.groups`, `client.uploads`, `client.project`, `client.webhooks`, `client.file_metadata`, `client.addons`, and `client.conversions` for normal application workflows.",
56
+ "Use `client.api.rest` and `client.api.upload` when exact REST API or Upload API endpoint parity is needed.",
57
+ "Use `client.uploads.upload` for automatic upload method selection and `client.uploads.multipart_upload` for explicit multipart uploads.",
58
+ "Use `MIGRATING_V5.md` when upgrading applications from uploadcare-ruby v4.x to v5."
59
+ ],
60
+ "previousVersions": [
61
+ {
62
+ "tag": "v4.4.3"
63
+ },
64
+ {
65
+ "tag": "v3.3.2"
66
+ },
67
+ {
68
+ "tag": "v2.1.2"
69
+ },
70
+ {
71
+ "tag": "v1.2.2"
72
+ }
73
+ ]
74
+ }
@@ -0,0 +1,47 @@
1
+ # uploadcare-ruby 5.0.0
2
+
3
+ v5 is stable.
4
+ No API changes since `5.0.0.rc1`.
5
+ What to do now: run the full test suite in staging, validate large multipart uploads, deploy, and monitor for 24-72 hours.
6
+
7
+ Please review [MIGRATING_V5.md](../MIGRATING_V5.md) before upgrading from v4.x.
8
+
9
+ ## Highlights
10
+
11
+ - Use `Uploadcare::Client` as the primary API; avoid internal helpers.
12
+ - Use `client.api.rest` and `client.api.upload` when you need exact endpoint behavior.
13
+ - Create one client per project for multi-account setups.
14
+ - Faraday and Zeitwerk reduce internal coupling; audit code that relied on old internals.
15
+ - Follow the canonical API examples, workflow examples, migration docs, and Context7 rules for v5.
16
+ - CI covers Ruby 3.3, 3.4, and 4.0.
17
+
18
+ ## Important Fixes Included
19
+
20
+ - REST signing uses deterministic protocol-required digests (`MD5` and `SHA1`)
21
+ - REST query signing uses the same nested parameter encoding as request transmission
22
+ - Multipart upload retries/timeouts now honor configuration (`max_upload_retries`, `upload_timeout`)
23
+ - Multipart upload worker cancellation now stops remaining queued work after first worker error
24
+ - Upload-from-URL polling now supports exponential backoff with configurable cap
25
+ - Multipart start payload no longer sends unsupported `part_size` to `/multipart/start/`
26
+ - Upload API batch uploads avoid duplicate filename key collisions without mutating caller-visible filenames
27
+ - `FileMetadata` resource instance initialization correctly assigns `uuid`
28
+
29
+ ## Upgrade Notes
30
+
31
+ - Requirement: Ruby `>= 3.3`.
32
+ - Do this first: run the full test suite against v5 in staging.
33
+ - Example check: `bundle update uploadcare-ruby && bundle exec rspec`.
34
+ - Multi-account apps: create one `Uploadcare::Client` per project.
35
+ - Audit code for removed internal APIs; replace them with `client.files`, `client.groups`, `client.uploads`, or `client.api`.
36
+ - Test large-file uploads because multipart retry and cancellation behavior changed.
37
+ - Re-validate custom REST signing if your app reimplements signing outside this gem.
38
+ - Rollback: pin to the latest v4 release and keep rollback trivial.
39
+
40
+ ## Risk Notes
41
+
42
+ - v5 uses Faraday and Zeitwerk with simpler internal dependencies; audit any app code that relied on old internals.
43
+ - Post-deploy: monitor upload errors, multipart worker failures, and REST signing errors for 24-72 hours.
44
+
45
+ ## Full Changelog
46
+
47
+ See [CHANGELOG.md](../CHANGELOG.md).
@@ -159,7 +159,7 @@ class Uploadcare::Api::Upload
159
159
  end
160
160
 
161
161
  def prepare_headers(req, _method, _uri, headers)
162
- req.headers['User-Agent'] ||= Uploadcare::Internal::UserAgent.call(config: config)
162
+ req.headers['User-Agent'] = Uploadcare::Internal::UserAgent.call(config: config)
163
163
  req.headers.merge!(headers)
164
164
  end
165
165
 
@@ -243,6 +243,7 @@ class Uploadcare::Api::Upload
243
243
  def upload_part_request(conn:, request_uri:, data:, timeout:, open_timeout:)
244
244
  conn.put(request_uri) do |req|
245
245
  req.headers['Content-Type'] = 'application/octet-stream'
246
+ req.headers['User-Agent'] = Uploadcare::Internal::UserAgent.call(config: config)
246
247
  req.options.timeout = timeout if timeout
247
248
  req.options.open_timeout = open_timeout if open_timeout
248
249
  req.body = data
@@ -7,7 +7,7 @@
7
7
  #
8
8
  # @example
9
9
  # Uploadcare::Internal::UserAgent.call(config: config)
10
- # # => "UploadcareRuby/5.0.0.rc1/demopublickey (Ruby/3.3.0)"
10
+ # # => "UploadcareRuby/5.0.1/demopublickey (Ruby/3.3.0)"
11
11
  class Uploadcare::Internal::UserAgent
12
12
  # Build a User-Agent string.
13
13
  #
@@ -3,5 +3,5 @@
3
3
  # Root namespace for the Uploadcare Ruby SDK.
4
4
  module Uploadcare
5
5
  # Gem version.
6
- VERSION = '5.0.0.rc1'
6
+ VERSION = '5.0.1'
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: uploadcare-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.0.0.rc1
4
+ version: 5.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - "@dmitrijivanchenko (Dmitrij Ivanchenko), @T0mbery (Andrey Aksenov)"
@@ -150,7 +150,8 @@ files:
150
150
  - api_examples/upload_api/put_multipart_part.rb
151
151
  - bin/console
152
152
  - bin/setup
153
- - docs/release-notes-5.0.0.rc1.md
153
+ - context7.json
154
+ - docs/release-notes-5.0.0.md
154
155
  - examples/README.md
155
156
  - examples/batch_upload.rb
156
157
  - examples/group_creation.rb
@@ -1,34 +0,0 @@
1
- # uploadcare-ruby 5.0.0.rc1
2
-
3
- This release candidate is the first public v5 cut from the rewritten codebase.
4
-
5
- Please review [MIGRATING_V5.md](../MIGRATING_V5.md) before upgrading from v4.x.
6
-
7
- ## Highlights
8
-
9
- - New client-first public API centered on `Uploadcare::Client`
10
- - Full endpoint-parity access through `client.api.rest` and `client.api.upload`
11
- - Multi-account support through client-scoped `Uploadcare::Configuration`
12
- - Faraday + Zeitwerk modernization across the codebase
13
- - Ruby 4.0 support in the CI matrix
14
-
15
- ## Important Fixes Included In RC1
16
-
17
- - REST signing uses deterministic protocol-required digests (`MD5` and `SHA1`)
18
- - REST query signing uses the same nested parameter encoding as request transmission
19
- - Multipart upload retries/timeouts now honor configuration (`max_upload_retries`, `upload_timeout`)
20
- - Multipart upload worker cancellation now stops remaining queued work after first worker error
21
- - Upload-from-URL polling now supports exponential backoff with configurable cap
22
- - Multipart start payload no longer sends unsupported `part_size` to `/multipart/start/`
23
- - Upload API batch uploads avoid duplicate filename key collisions without mutating caller-visible filenames
24
- - `FileMetadata` resource instance initialization correctly assigns `uuid`
25
-
26
- ## Upgrade Notes
27
-
28
- - Ruby support baseline is now `>= 3.3`.
29
- - If you use multiple Uploadcare projects/accounts, prefer explicit `Uploadcare::Client` instances.
30
- - Keep rollback simple by pinning to the latest v4 release if your app depends on removed internal APIs.
31
-
32
- ## Full Changelog
33
-
34
- See [CHANGELOG.md](../CHANGELOG.md).