diff --git a/.github/workflows/gem-push.yml b/.github/workflows/gem-push.yml index 366d42d4..d22f2c9f 100644 --- a/.github/workflows/gem-push.yml +++ b/.github/workflows/gem-push.yml @@ -7,13 +7,15 @@ on: jobs: build: runs-on: ubuntu-latest + permissions: + contents: write steps: - uses: actions/checkout@v5 - name: Release Gem if: contains(github.ref, 'refs/tags/v') - uses: cadwallion/publish-rubygems-action@master + uses: cadwallion/publish-rubygems-action@94a6f4cd5350581749c569b5001eecc864e3ad0b # v1.1.0 env: GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} RUBYGEMS_API_KEY: ${{secrets.RUBYGEMS_API_KEY}} diff --git a/CHANGELOG.md b/CHANGELOG.md index 61ffda6c..1c30e519 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,14 +1,22 @@ # Changelog -## Unreleased +## 5.1.0 — 2026-09-06 ### Added -* File search through `client.files.search`, including full-text, exact, metadata, tag, range, and image filters, - sorting, highlights, `include=appdata`, and POST-aware pagination -* Per-file tags through `client.file_tags` with list, replace, and atomic add/delete operations -* Upload-time `tags:` support for direct, batch, URL, and multipart uploads -* The `tags` attribute on file resources returned by the REST API +* Search files through `client.files.search` with full-text, UUID, exact, metadata, tag, range, and image filters, + sorting, highlights, `include=appdata`, and POST-aware pagination that preserves the original search options. +* Manage per-file tags through `client.file_tags` with list, replace, and atomic add/delete operations. +* Apply tags while uploading files directly, in batches, from URLs, or through multipart uploads. +* Read tags from file resources returned by the REST API. +* Call the raw REST file-search and file-tag endpoints through `client.api.rest` when exact endpoint parity is needed. + +## 5.0.1 — 2026-06-09 + +### Fixed + +* Upload API requests now send the SDK-generated `User-Agent` instead of Faraday's default header. +* Multipart upload part requests to presigned URLs now include the same SDK-generated `User-Agent`. ## 5.0.0 — 2026-05-17 diff --git a/MIGRATING_V5.md b/MIGRATING_V5.md index 8cf594d6..6a7fea2d 100644 --- a/MIGRATING_V5.md +++ b/MIGRATING_V5.md @@ -27,7 +27,7 @@ The examples expect `UPLOADCARE_PUBLIC_KEY` and `UPLOADCARE_SECRET_KEY` to come ## Recommended Migration Order 1. Introduce explicit `Uploadcare::Client` instances in your application. -2. Move app-facing code to `client.files`, `client.groups`, `client.uploads`, `client.project`, `client.webhooks`, `client.file_metadata`, `client.addons`, and `client.conversions`. +2. Move app-facing code to `client.files`, `client.groups`, `client.uploads`, `client.project`, `client.webhooks`, `client.file_metadata`, `client.file_tags`, `client.addons`, and `client.conversions`. 3. Keep `client.api.rest` and `client.api.upload` only where you need raw endpoint parity. 4. Audit return-type and error-handling assumptions. 5. Remove any app code that depends on internal transport classes. @@ -201,6 +201,7 @@ These top-level resource constants still exist: - `Uploadcare::Project` - `Uploadcare::Webhook` - `Uploadcare::FileMetadata` +- `Uploadcare::FileTags` - `Uploadcare::DocumentConversion` - `Uploadcare::VideoConversion` diff --git a/docs/release-notes-5.1.0.md b/docs/release-notes-5.1.0.md new file mode 100644 index 00000000..4b34a8fa --- /dev/null +++ b/docs/release-notes-5.1.0.md @@ -0,0 +1,33 @@ +# uploadcare-ruby 5.1.0 + +This release adds file search and file-tag support to the v5 client API. It is backward compatible with 5.0.x and +does not require an application migration. + +## Highlights + +- Search files through `client.files.search` using text, UUID, metadata, tag, range, and image filters. +- Sort search results, inspect match highlights, request `appdata`, and paginate without rebuilding POST criteria. +- List, replace, add, and delete per-file tags through `client.file_tags`. +- Assign tags during direct, batch, URL, and multipart uploads. +- Read tags directly from returned file resources. +- Use `client.api.rest.files.search` and `client.api.rest.file_tags` for exact REST endpoint access. + +## Upgrade Notes + +- Requirement: Ruby `>= 3.3`. +- Update with `bundle update uploadcare-ruby` and run the application's test suite. +- No configuration or data migration is required from 5.0.x. +- File search results may be eventually consistent immediately after an upload; retry when a workflow searches for a + file it just created. +- Existing upload calls remain valid. Pass `tags: [...]` only where upload-time tagging is needed. +- Rollback: pin `uploadcare-ruby` to `5.0.1`. + +## Examples + +- File search: [`examples/file_search.rb`](../examples/file_search.rb) +- File tags: [`examples/file_tags.rb`](../examples/file_tags.rb) +- Raw REST examples: [`api_examples/README.md`](../api_examples/README.md) + +## Full Changelog + +See [CHANGELOG.md](../CHANGELOG.md). diff --git a/lib/uploadcare/internal/user_agent.rb b/lib/uploadcare/internal/user_agent.rb index cb9b1014..c1326d94 100644 --- a/lib/uploadcare/internal/user_agent.rb +++ b/lib/uploadcare/internal/user_agent.rb @@ -7,7 +7,7 @@ # # @example # Uploadcare::Internal::UserAgent.call(config: config) -# # => "UploadcareRuby/5.0.0/demopublickey (Ruby/3.3.0)" +# # => "UploadcareRuby/5.1.0/demopublickey (Ruby/3.3.0)" class Uploadcare::Internal::UserAgent # Build a User-Agent string. # diff --git a/lib/uploadcare/version.rb b/lib/uploadcare/version.rb index 058834c4..0d1a9295 100644 --- a/lib/uploadcare/version.rb +++ b/lib/uploadcare/version.rb @@ -3,5 +3,5 @@ # Root namespace for the Uploadcare Ruby SDK. module Uploadcare # Gem version. - VERSION = '5.0.0' + VERSION = '5.1.0' end diff --git a/spec/uploadcare/version_spec.rb b/spec/uploadcare/version_spec.rb index f0518adb..4c0457b2 100644 --- a/spec/uploadcare/version_spec.rb +++ b/spec/uploadcare/version_spec.rb @@ -2,6 +2,6 @@ RSpec.describe Uploadcare::VERSION do it 'has a version number' do - expect(Uploadcare::VERSION).to eq('5.0.0') + expect(Uploadcare::VERSION).to eq('5.1.0') end end