Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 11 commits into from
Apr 27, 2024
Merged

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

merged 11 commits into from
Apr 27, 2024

Conversation

vipulnsward
Copy link
Collaborator

@vipulnsward vipulnsward commented Apr 13, 2024

Description

  • Fix Amakai class name typo to Akamai
  • Start adding acl capability to signed generators

Checklist

Summary by CodeRabbit

  • New Features

    • Added support for generating wildcard ACL tokens with the new wildcard parameter in AkamaiGenerator.
    • Introduced build_acl method for ACL construction based on wildcard.
  • Bug Fixes

    • Corrected typo in the deprecation warning message for the datetime_stored property.
  • Documentation

    • Updated README to reflect changes in method parameters and class names.
    • Updated deprecation warning documentation in code comments.
  • Refactor

    • Renamed AmakaiGenerator to AkamaiGenerator across various files.
    • Updated import statements to reflect the new class name.
  • Tests

    • Adjusted tests to accommodate new wildcard parameter in URL generation.
    • Updated test cases to correct log message assertions related to property deprecation.

…Fix docs, specs and imports from all places. Start adding acl to signed signature building for UC::SignedUrlGenerators::AkamaiGenerator. Add accepting wildcard param to generate_url and then passing down to building an ACL
@vipulnsward vipulnsward changed the title [gh-134] Various Signed URLs updates for Akamai class [gh-134] Various Signed URLs generation updates Apr 13, 2024
…aiGenerator to make it more readable and to be able to copy code easily
…it to generate signed url in Akamai url generator
Copy link
Contributor

coderabbitai bot commented Apr 27, 2024

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 1b7aa71 and bf25044.
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 ModerationAdd-On. ### Changed * File attributedatetime_stored` is deprecat...


Near line 9: Possible spelling mistake found.
Context: ...Add-On. ### Changed * File attributedatetime_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: ...oas the default value for thestore` 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 - FixedUploadcare::File#store- FixedUploadcare::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
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • 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 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 for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

README.md Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

README.md Outdated Show resolved Hide resolved
@vipulnsward vipulnsward merged commit 81182de into main Apr 27, 2024
10 checks passed
@vipulnsward vipulnsward deleted the gh-134 branch April 27, 2024 16:07
@alxgsv
Copy link
Contributor

alxgsv commented Apr 29, 2024

Thank you @vipulnsward, that's so good!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants