uploadcare / uploadcare-ruby

Ruby API client that handles uploads and further operations with files by wrapping Uploadcare Upload and REST APIs.
https://uploadcare.com
MIT License
39 stars 28 forks source link

[gh-134] Various Signed URLs generation updates #162

Closed vipulnsward closed 2 months ago

vipulnsward commented 2 months ago

Description

Checklist

Summary by CodeRabbit

coderabbitai[bot] commented 2 months ago

Walkthrough

The recent changes enhance URL generation flexibility in the AkamaiGenerator class within Ruby's Uploadcare library. Updates include introducing an optional wildcard parameter, correcting deprecation warnings, and aligning import statements and test specifications with these modifications.

Changes

File Path Change Summary
CHANGELOG.md, README.md Introducing wildcard in AkamaiGenerator, renaming AmakaiGenerator to AkamaiGenerator.
lib/.../uploadcare.rb, lib/.../akamai_generator.rb, spec/.../akamai_generator_spec.rb Updating import statements, class names, and adding new functionality for URL generation with wildcard.
lib/.../file.rb, spec/.../file_spec.rb Correcting typos in deprecation warning messages for datetime_stored.

🐇✨ In the code where bytes dance, A rabbit hopped, took a glance. Renamed a class, fixed a line, With a wildcard, URLs now shine. Cheers to changes, small and grand, Crafted gently by our hand. 🌟🐾


Recent Review Details **Configuration used: CodeRabbit UI** **Review profile: CHILL**
Commits Files that changed from the base of the PR and between 1b7aa711880171ad3820c2bc305944d13c088fa9 and bf25044463d550ecc34527336fe01284f1c70601.
Files selected for processing (1) * CHANGELOG.md (1 hunks)
Additional Context Used
LanguageTool (44)
CHANGELOG.md (44)
Near line 5: Possible typo: you repeated a word Context: # Changelog ## Unreleased ### Added * Added `AWS Rekognition Moderation` Add-On. #... --- Near line 6: Possible spelling mistake found. Context: ...gelog ## Unreleased ### Added * Added `AWS Rekognition Moderation` Add-On. ### Changed * File... --- Near line 9: Only proper nouns start with an uppercase character (there are exceptions for headlines). Context: ...tion Moderation` Add-On. ### Changed * File attribute `datetime_stored` is deprecat... --- Near line 9: Possible spelling mistake found. Context: ...` Add-On. ### Changed * File attribute `datetime_stored` is deprecated and will warn on ... --- Near line 15: Possible spelling mistake found. Context: ...ies. ## Unreleased ### Fixed * Throw `AuthError` if current public key or secret key co... --- Near line 16: Possible spelling mistake found. Context: ...essing any of the APIs. * Fixed typo in `AkamaiGenerator` class name from `AmakaiGenerator`. ##... --- Near line 16: Possible spelling mistake found. Context: ...po in `AkamaiGenerator` class name from `AmakaiGenerator`. ### Added * Added an optional `wildc... --- Near line 18: Possible typo: you repeated a word Context: ...class name from `AmakaiGenerator`. ### Added * Added an optional `wildcard` boolean paramete... --- Near line 19: Possible spelling mistake found. Context: ...nal `wildcard` boolean parameter to the `generate_url` method of `AkamaiGenerator`. ## 4.4.0... --- Near line 19: Possible spelling mistake found. Context: ...rameter to the `generate_url` method of `AkamaiGenerator`. ## 4.4.0 — 2024-03-09 ### Breaking ... --- Near line 31: Possible spelling mistake found. Context: ...rning proper error message when raising RequestError in poll_upload_response, to hint to use... --- Near line 33: Possible spelling mistake found. Context: ...* Fix documentation about original file url on simple file upload. ### Changed * S... --- Near line 36: Possible spelling mistake found. Context: ...ple file upload. ### Changed * Support params in Rest client and in file info method,... --- Near line 36: Possible spelling mistake found. Context: ...le info method, to allow passing custom params like "include=appdata" in `Uploadcare::... --- Near line 36: Possible spelling mistake found. Context: ...low passing custom params like "include=appdata" in `Uploadcare::File.file` calls. Clos... --- Near line 36: Possible spelling mistake found. Context: ...custom params like "include=appdata" in `Uploadcare::File.file` calls. Closes #132. ## 4.... --- Near line 43: Possible spelling mistake found. Context: ...ixed * Updated the version of the REST Api for conversion clients (closes #135). ... --- Near line 49: Possible spelling mistake found. Context: ...ude sending blank values in the `store` param. ## 4.3.4 — 2023-05-16 ### Changed ... --- Near line 56: Possible spelling mistake found. Context: ...o` as the default value for the `store` param. ## 4.3.3 — 2023-04-14 ### Changed ... --- Near line 67: Possible spelling mistake found. Context: ...dded * Add a new `file_info` method to retreive file information without the secret key... --- Near line 73: Possible spelling mistake found. Context: ...2 — 2023-03-28 ### Changed * Improved readme to look better at ruby-doc ## 4.3.1 — ... --- Near line 80: Possible missing preposition found. Context: ...Changed - Update the gem description - Allow ENV keys to be configured after the gem... --- Near line 86: Possible spelling mistake found. Context: ...port of new ruby versions ### Breaking Сhanges - Drop support of unmaintainable Ruby ... --- Near line 89: Possible spelling mistake found. Context: ....4, 2.5, 2.6). - Replace unmaintainable `api_struct` with `uploadcare-api_struct` #... --- Near line 97: Possible spelling mistake found. Context: ...022-12-29 This version supports latest Uploadcare REST API — [v0.7](https://uploadcare.co... --- Near line 104: Possible spelling mistake found. Context: ...ence/object-recognition/) ### Breaking Сhanges - For `Uploadcare::File#info` - File... --- Near line 108: Possible spelling mistake found. Context: ...`video_info` fields anymore - Removed `rekognition_info` in favor of `appdata` - Paramet... --- Near line 120: In American English, abbreviations like “etc.” require a period. Context: ...s mime-type, image (dimensions, format, etc), video information (duration, format, ... --- Near line 120: In American English, abbreviations like “etc.” require a period. Context: ...information (duration, format, bitrate, etc), audio information, etc - Field `met... --- Near line 120: In American English, abbreviations like “etc.” require a period. Context: ...rmat, bitrate, etc), audio information, etc - Field `metadata` that includes arbi... --- Near line 122: Possible spelling mistake found. Context: ...tadata associated with a file - Field `appdata` that includes dictionary of applicatio... --- Near line 126: Possible spelling mistake found. Context: ...th these applications ### Added - Add Uploadcare API interface: - `Uploadcare::FileM... --- Near line 126: This phrase is redundant (‘I’ stands for ‘interface’). Use simply “API”. Context: ...plications ### Added - Add Uploadcare API interface: - `Uploadcare::FileMetadata` -... --- Near line 130: Possible spelling mistake found. Context: ...Added an option to delete a Group - For `Uploadcare::File` add `local_copy` and `remote_cop... --- Near line 138: Possible spelling mistake found. Context: ... ## 3.3.1 - 2022-04-19 - Fixed README: `Uploadcare::URLGenerators::AmakaiGenerator` > `Upl... --- Near line 143: Possible spelling mistake found. Context: ...nstants ## 3.3.0 — 2022-04-08 - Added `Uploadcare::URLGenerators::AmakaiGenerator`. Use c... --- Near line 152: Possible typo: you repeated a word Context: ...tureVerifier` ## 3.1.1 — 2021-10-13 - Fixed `Uploadcare::File#store` - Fixed `Uploadcare::File#delete` ## 3.1.0 — 2... --- Near line 158: Possible spelling mistake found. Context: ... (`variations`, `video_info`, `source`, `rekognition_info`) - Added an option to add custom ... --- Near line 163: The official name of this software platform is spelled with a capital “H”. Context: ... — 2021-04-15 - Replace Travis-CI with Github Actions - Automate gem pushing ## 3.0.... --- Near line 168: Possible spelling mistake found. Context: ... - Added better pagination methods for `GroupList` & `FileList` - Improved documentation ... --- Near line 174: Possible spelling mistake found. Context: ...ded better pagination and iterators for `GroupList` & `FileList` ## 3.0.2-dev — 2020-03-1... --- Near line 198: Possible spelling mistake found. Context: ...Added - Client wrappers for REST API - Serializers for REST API - Client wrappers for Uplo... --- Near line 200: Possible spelling mistake found. Context: ... API - Client wrappers for Upload API - Serializers for Upload API - rdoc documentation --- Near line 201: Possible spelling mistake found. Context: ...load API - Serializers for Upload API - rdoc documentation
Additional comments not posted (3)
CHANGELOG.md (3)
`16-16`: Corrected class name from "AmakaiGenerator" to "AkamaiGenerator". --- `15-15`: Ensure the addition of the `AuthError` handling is documented and tested as this change was not explicitly mentioned in the PR summary. --- `19-19`: Added an optional `wildcard` parameter to the `generate_url` method of `AkamaiGenerator`.
--- Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Share - [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai) - [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai) - [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai) - [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code)
Tips ### Chat There are 3 ways to chat with [CodeRabbit](https://coderabbit.ai): - Review comments: Directly reply to a review comment made by CodeRabbit. Example: - `I pushed a fix in commit .` - `Generate unit testing code for this file.` - `Open a follow-up GitHub issue for this discussion.` - Files and specific lines of code (under the "Files changed" tab): Tag `@coderabbitai` in a new review comment at the desired location with your query. Examples: - `@coderabbitai generate unit testing code for this file.` - `@coderabbitai modularize this function.` - PR comments: Tag `@coderabbitai` in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples: - `@coderabbitai generate interesting stats about this repository and render them as a table.` - `@coderabbitai show all the console.log statements in this repository.` - `@coderabbitai read src/utils.ts and generate unit testing code.` - `@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.` Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. ### CodeRabbit Commands (invoked as PR comments) - `@coderabbitai pause` to pause the reviews on a PR. - `@coderabbitai resume` to resume the paused reviews. - `@coderabbitai review` to trigger a review. This is useful when automatic reviews are disabled for the repository. - `@coderabbitai resolve` resolve all the CodeRabbit review comments. - `@coderabbitai help` to get help. Additionally, you can add `@coderabbitai ignore` anywhere in the PR description to prevent this PR from being reviewed. ### CodeRabbit Configration File (`.coderabbit.yaml`) - You can programmatically configure CodeRabbit by adding a `.coderabbit.yaml` file to the root of your repository. - Please see the [configuration documentation](https://docs.coderabbit.ai/guides/configure-coderabbit) for more information. - If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: `# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json` ### Documentation and Community - Visit our [Documentation](https://coderabbit.ai/docs) for detailed information on how to use CodeRabbit. - Join our [Discord Community](https://discord.com/invite/GsXnASn26c) to get help, request features, and share feedback. - Follow us on [X/Twitter](https://twitter.com/coderabbitai) for updates and announcements.
alxgsv commented 2 months ago

Thank you @vipulnsward, that's so good!