uploadcare / uploadcare-rails

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

Fix wrong code formatting all across README #138

Closed vipulnsward closed 6 months ago

vipulnsward commented 6 months ago

Description

Fix wrong code formatting all across README

Checklist

Summary by CodeRabbit

coderabbitai[bot] commented 6 months ago

Walkthrough

The summary outlines a series of unchanged operations within the Uploadcare API, spanning various services like file and group management, webhooks, conversions, and addons. Each entry reflects a reiterated declaration, suggesting a review or audit process rather than functional changes to the API's methods.

Changes

File Path Change Summary
Uploadcare::Rails::... No change in methods for creating posts with pictures and attachments
Uploadcare::UploadApi... No change in file upload methods
Uploadcare::FileApi... No change in file management operations
Uploadcare::GroupApi... No change in group management operations
Uploadcare::ProjectApi... No change in project retrieval
Uploadcare::WebhookApi... No change in webhook management
Uploadcare::ConversionApi... No change in document and video conversion methods
Uploadcare::FileMetadataApi... No change in file metadata operations
Uploadcare::AddonsApi... No change in addon features like rekognition and background removal

Poem

"In the land where code bunnies hop, 🐇💻
Changes were reviewed, not one was dropped.
Each line of code, checked with care,
No new bugs, no despair!
Celebrate the audit, clear and true,
For stability, we give a cheer, woohoo!" 🎉


Recent Review Details **Configuration used: CodeRabbit UI** **Review profile: CHILL**
Commits Files that changed from the base of the PR and between 7ec8ae81c2751c6e79339759d5f13d5a67efc2cc and a3ed6c3f272d83fcf5a591eee5b8830b6268c6a9.
Files selected for processing (1) * README.md (32 hunks)
Additional Context Used
LanguageTool (112)
README.md (112)
Near line 1: Possible spelling mistake found. Context: # Uploadcare Rails ![license](https://img.shields.i... --- Near line 9: Possible spelling mistake found. Context: .../badge.svg A Ruby on Rails plugin for [Uploadcare](https://uploadcare.com) service. Based... --- Near line 10: Possible spelling mistake found. Context: ...ps://uploadcare.com) service. Based on [uploadcare-ruby](https://github.com/uploadcare/uploadca... --- Near line 10: Possible spelling mistake found. Context: ...-ruby) gem (general purpose wrapper for Uploadcare API) :heavy_exclamation_mark: *Note: t... --- Near line 11: Loose punctuation mark. Context: ...al purpose wrapper for Uploadcare API) :heavy_exclamation_mark: *Note: the gem u... --- Near line 12: Possible spelling mistake found. Context: ...:heavy_exclamation_mark: *Note: the gem uploadcare-rails 2.x is not backward compatible with 1.x... --- Near line 18: Possible spelling mistake found. Context: ...Installation](#installation) * [Using Gemfile](#using-gemfile) * [Using command lin... --- Near line 22: Possible spelling mistake found. Context: ... * [Configuration](#configuration) * [Uploadcare File Uploader](#uploadcare-file-uploade... --- Near line 31: Possible spelling mistake found. Context: ...sformation](#image-transformation) * [Uploadcare API interfaces](#uploadcare-api-interfa... --- Near line 31: This phrase is redundant (‘I’ stands for ‘interfaces’). Use simply “APIs”. Context: ...(#image-transformation) * [Uploadcare API interfaces](#uploadcare-api-interfaces) * [Upl... --- Near line 32: Possible spelling mistake found. Context: ...ploadcare-api-interfaces) * [Upload Api](#upload-api) * [File Api](#file-ap... --- Near line 33: Possible spelling mistake found. Context: ...* [Upload Api](#upload-api) * [File Api](#file-api) * [Group Api](#group-ap... --- Near line 34: Possible spelling mistake found. Context: ... * [File Api](#file-api) * [Group Api](#group-api) * [Project Api](#proje... --- Near line 35: Possible spelling mistake found. Context: ... [Group Api](#group-api) * [Project Api](#project-api) * [Webhook Api](#web... --- Near line 36: Possible spelling mistake found. Context: ...oject Api](#project-api) * [Webhook Api](#webhook-api) * [Conversion Api](#... --- Near line 37: Possible spelling mistake found. Context: ...ok Api](#webhook-api) * [Conversion Api](#conversion-api) * [File Metadata ... --- Near line 38: Possible spelling mistake found. Context: ...](#conversion-api) * [File Metadata Api](#file-metadata-api) * [Add-Ons Api... --- Near line 39: Possible spelling mistake found. Context: ...etadata Api](#file-metadata-api) * [Add-Ons Api](#add-ons-api) * [Useful links](#us... --- Near line 39: Possible spelling mistake found. Context: ...Api](#file-metadata-api) * [Add-Ons Api](#add-ons-api) * [Useful links](#useful... --- Near line 48: Possible spelling mistake found. Context: ... Rails 6.0+ ## Installation ### Using Gemfile Add this line to your application's Ge... --- Near line 50: Possible spelling mistake found. Context: ...le Add this line to your application's Gemfile: ```ruby gem "uploadcare-rails" ``` A... --- Near line 62: Possible spelling mistake found. Context: ...onsole $ bundle install ``` If you use `api_struct` gem in your project, replace it... --- Near line 62: Possible spelling mistake found. Context: ...t` gem in your project, replace it with `uploadcare-api_struct`: ```ruby gem 'uploadcare-api_st... --- Near line 78: Possible spelling mistake found. Context: ...sage ### Configuration To start using Uploadcare API you just need to set your [API keys... --- Near line 85: Possible spelling mistake found. Context: ...ey ``` Or you can use popular gems like `dotenv-rails` for setting ENV variables. You must se... --- Near line 86: Possible spelling mistake found. Context: ... variables. You must set the gem before `uploadcare-rails` like this : ```ruby gem "dotenv-rails"... --- Near line 91: Possible spelling mistake found. Context: ...t] gem "uploadcare-rails" ``` :warning: `require: "dotenv/rails-now"` is very important! Run the... --- Near line 91: As an alternative to the over-used intensifier ‘very’, consider replacing this phrase. Context: ...rning: `require: "dotenv/rails-now"` is very important! Run the config generator command to g... --- Near line 99: Possible spelling mistake found. Context: ...The generator will create a new file in `config/initializers/uploadcare.rb`. The public key must be specified ... --- Near line 101: Possible spelling mistake found. Context: ...`. The public key must be specified in `config/initializers/uploadcare.rb` to use Uploadcare file upload. This... --- Near line 101: Possible spelling mistake found. Context: ...nfig/initializers/uploadcare.rb` to use Uploadcare file upload. This step is done automati... --- Near line 102: Possible spelling mistake found. Context: ...initializer if you set the ENV variable `UPLOADCARE_PUBLIC_KEY` earlier. ```ruby ... Uploa... --- Near line 136: Possible missing article found. Context: ...s storing/caching, deleting files, etc. Full list of available options is listed in ... --- Near line 140: Possible spelling mistake found. Context: ...ment an option and set the value. ### Uploadcare File Uploader ### Widget #### Using C... --- Near line 146: Possible spelling mistake found. Context: ...tart using file uploading is to add the Uploadcare widget to the html-page. There is a vie... --- Near line 146: Possible spelling mistake found. Context: ... is to add the Uploadcare widget to the html-page. There is a view helper that can do it ... --- Near line 149: Possible spelling mistake found. Context: ...code: Add this string to your `` html-tag ```erb ... --- Near line 172: Possible spelling mistake found. Context: ... --> ... ``` This helper uses a CDN-url for the widget bundle and supports thre... --- Near line 174: This sentence does not start with an uppercase letter. Context: ...bundle and supports three options: - **version** — version of the Uploadcare widget. D... --- Near line 174: Possible spelling mistake found. Context: ...ptions: - **version** — version of the Uploadcare widget. Default is "3.x". - **bundle** ... --- Near line 175: This sentence does not start with an uppercase letter. Context: ...ploadcare widget. Default is "3.x". - **bundle** — bundle name. Available names are "f... --- Near line 175: Possible spelling mistake found. Context: ...Available names are "full", "default", "api", "ie8" and "lang.en". D... --- Near line 175: Possible spelling mistake found. Context: ...re "full", "default", "api", "ie8" and "lang.en". Default bundle is "... --- Near line 175: Possible typo: you repeated a whitespace Context: ... "default", "api", "ie8" and "lang.en". Default bundle is "full" — a full bundle... --- Near line 176: Possible typo: you repeated a whitespace Context: ..." — a full bundle with built-in jQuery. More info about bundles [here](https://u... --- Near line 178: This sentence does not start with an uppercase letter. Context: ...cs/uploads/file-uploader/#bundles). - **min** — bool value detecting if the bundle ... --- Near line 178: Possible spelling mistake found. Context: ...ds/file-uploader/#bundles). - **min** — bool value detecting if the bundle must be m... --- Near line 180: Possible spelling mistake found. Context: ...pt>` with widget global settings set in `config/initializers/uploadcare.rb`. You can override them later in an ... --- Near line 193: Possible spelling mistake found. Context: ...m). ### Input When the widget is on a html-page, you want to add an input to your view ... --- Near line 205: This sentence does not start with an uppercase letter. Context: ...id="object_attribute"> --> ... ``` - **object** — object name; - **attribute** — obje... --- Near line 211: Possible spelling mistake found. Context: ... Rails models. First, you need to mount uploadcare file or group to the model attribute. F... --- Near line 212: After the expression ‘for example’ a comma is usually used. Context: ...le or group to the model attribute. For example you have a database table like this and... --- Near line 226: Possible spelling mistake found. Context: ...-------------- ``` ### Form data #### Uploadcare File ```ruby # app/models/post.rb clas... --- Near line 251: Possible spelling mistake found. Context: ... "Save" %>
<% end %> ``` #### Uploadcare File Group ```ruby # app/models/post.r... --- Near line 276: Possible spelling mistake found. Context: ...put will have a `value` property set to CDN-urls when you will select files to upload in... --- Near line 282: Possible spelling mistake found. Context: ...4-963d-703d48020f83/"> ``` So, you get CDN-urls as a value of the attribute in the cont... --- Near line 283: Possible spelling mistake found. Context: ... will be available in the controller by `params[:post][:picture]`. The helper is detec... --- Near line 287: Possible spelling mistake found. Context: ...in your model. ### Caching issues with Turbolinks/Hotwire If you are facing issue, with ... --- Near line 289: Possible spelling mistake found. Context: ...le input elements being rendered due to turbolinks caching you can append this fix in the ... --- Near line 289: Possible missing comma found. Context: ...ements being rendered due to turbolinks caching you can append this fix in the `app/jav... --- Near line 289: Possible spelling mistake found. Context: ... caching you can append this fix in the `app/javascript/application.js` to overcome this: ``` ... --- Near line 309: A comma may be missing after the conjunctive/linking adverb ‘Similarly’. Context: ... widget.remove(); }); }); ``` Similarly if you are using [Hotwire](https://hotw... --- Near line 333: Possible spelling mistake found. Context: ...d Group wrappers When you mount either Uploadcare File or Group to an attribute, this att... --- Near line 333: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. Context: ... this attribute is getting wrapped with a Uploadcare object. This feature adds so... --- Near line 334: Possible spelling mistake found. Context: ...his attribute is getting wrapped with a Uploadcare object. This feature adds some useful m... --- Near line 336: Possible spelling mistake found. Context: ... useful methods to the attribute. #### Uploadcare File Say, you have such model in your ... --- Near line 347: Possible spelling mistake found. Context: ...u create a new Post object specifying a CDN-url for your previously uploaded Uploadcare... --- Near line 347: Possible spelling mistake found. Context: ... a CDN-url for your previously uploaded Uploadcare file: ```ruby post = Post.create(pictu... --- Near line 353: Possible spelling mistake found. Context: ...52/") ``` Now the `post.picture` is an Uploadcare::Rails::File. Following methods are sup... --- Near line 353: Possible missing article found. Context: ...picture` is an Uploadcare::Rails::File. Following methods are supported: ```ruby # Store... --- Near line 394: Possible spelling mistake found. Context: ...c23496b052/-/quality/better/" ``` #### Uploadcare File Group Groups work similar to the ... --- Near line 396: It seems that a comma is missing. Context: ...ar to the File but have some differences though. ```ruby # app/models/post.rb class Po... --- Near line 411: Possible spelling mistake found. Context: ...) ``` Now the `post.attachments` is an Uploadcare::Rails::Group. Following methods are su... --- Near line 411: Possible missing article found. Context: ...hments` is an Uploadcare::Rails::Group. Following methods are supported: ```ruby # Store... --- Near line 464: Possible spelling mistake found. Context: ...th/0/"] ``` ### Image Transformation Uploadcare provides a way to transform images stor... --- Near line 465: Possible spelling mistake found. Context: ...des a way to transform images stored on Uploadcare services specifying a list of operation... --- Near line 482: Possible spelling mistake found. Context: ....com/docs/transformations/image/). ### Uploadcare API interfaces Uploadcare provides [AP... --- Near line 482: This phrase is redundant (‘I’ stands for ‘interfaces’). Use simply “APIs”. Context: ...ransformations/image/). ### Uploadcare API interfaces Uploadcare provides [APIs](https://upl... --- Near line 483: Possible spelling mistake found. Context: ...mage/). ### Uploadcare API interfaces Uploadcare provides [APIs](https://uploadcare.com/... --- Near line 484: Possible spelling mistake found. Context: .... The gem has unified interfaces to use Uploadcare APIs in RailsApp. ### Upload API [Upl... --- Near line 484: Possible spelling mistake found. Context: ...ed interfaces to use Uploadcare APIs in RailsApp. ### Upload API [Upload Api](https://... --- Near line 488: Possible spelling mistake found. Context: ...s in RailsApp. ### Upload API [Upload Api](https://uploadcare.com/api-refs/upload... --- Near line 488: Unpaired symbol: ‘[’ seems to be missing Context: ...n RailsApp. ### Upload API [Upload Api](https://uploadcare.com/api-refs/upload-... --- Near line 490: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym. Context: ...ods to upload files in many ways. #### Upload a single file ```ruby # Load a file fi... --- Near line 505: Use “a” instead of ‘an’ if the following word doesn’t start with a vowel sound, e.g. ‘a sentence’, ‘a university’. Context: ...file uploading and uploading files from an URL (depending on the type of first arg... --- Near line 505: Only proper nouns start with an uppercase character (there are exceptions for headlines). Context: ...nt - can be either String (i.e. URL) or File). ```ruby # Upload file from URL url =... --- Near line 543: Possible spelling mistake found. Context: ...# } # ] ``` ### File API FileApi provides an interface to manage single ... --- Near line 544: Possible spelling mistake found. Context: ...rface to manage single files, stored on Uploadcare Servers. #### Get files ```ruby # Val... --- Near line 660: Possible spelling mistake found. Context: ... ] # } ``` ### Group API GroupApi provides an interface to manage file gr... --- Near line 661: Possible spelling mistake found. Context: ...terface to manage file groups stored on Uploadcare Servers. #### Get file groups ```ruby... --- Near line 715: Possible spelling mistake found. Context: ...``` #### Create a new group by file's uuids. It is possible to specify transformed... --- Near line 745: Possible spelling mistake found. Context: ... # => "200 OK" ``` ### Project API ProjectApi interface provides just one method - to... --- Near line 746: Possible spelling mistake found. Context: ...method - to get a configuration of your Uploadcare project. ```ruby Uploadcare::ProjectAp... --- Near line 760: Possible spelling mistake found. Context: ..."=>true # } ``` ### Webhook API WebhookApi allows to manage Uploadcare webhooks. ... --- Near line 761: Did you mean “managing”? Or maybe you should add a pronoun? In active voice, ‘allow’ + ‘to’ takes an object, usually a pronoun. Context: ...`` ### Webhook API WebhookApi allows to manage Uploadcare webhooks. #### Get all webh... --- Near line 761: Possible spelling mistake found. Context: ...ebhook API WebhookApi allows to manage Uploadcare webhooks. #### Get all webhooks This ... --- Near line 783: Use “a” instead of ‘an’ if the following word doesn’t start with a vowel sound, e.g. ‘a sentence’, ‘a university’. Context: ...ate a new webhook This method requires an URL that is triggered by an event, for ... --- Near line 826: Possible spelling mistake found. Context: ... Delete an existing webhook by a target_url ```ruby Uploadcare::WebhookApi.delete_... --- Near line 834: Possible spelling mistake found. Context: ...> Success(nil) ``` ### Conversion API ConversionApi provides methods to manage video and do... --- Near line 839: Use “a” instead of ‘an’ if the following word doesn’t start with a vowel sound, e.g. ‘a sentence’, ‘a university’. Context: ...onvert a document This method requires an UUID of a previously uploaded to Upload... --- Near line 839: Possible spelling mistake found. Context: ...res an UUID of a previously uploaded to Uploadcare file and target format. If using an ima... --- Near line 877: Use “a” instead of ‘an’ if the following word doesn’t start with a vowel sound, e.g. ‘a sentence’, ‘a university’. Context: ...conversion method, this method requires an UUID of a previously uploaded to Upload... --- Near line 877: Possible spelling mistake found. Context: ...res an UUID of a previously uploaded to Uploadcare file. Also you have several options to ... --- Near line 877: A comma may be missing after the conjunctive/linking adverb ‘Also’. Context: ...previously uploaded to Uploadcare file. Also you have several options to control the... --- Near line 921: Possible spelling mistake found. Context: ...ished" # }) ``` ### File Metadata Api File metadata is additional, arbitrary... --- Near line 958: Possible spelling mistake found. Context: ...'sample-key') # => "200 OK" ``` ### Add-Ons Api An Add-On is an application implem... --- Near line 958: Possible spelling mistake found. Context: ...key') # => "200 OK" ``` ### Add-Ons Api An Add-On is an application implemente... --- Near line 960: Possible spelling mistake found. Context: ...nput and can produce other files and/or appdata as an output. #### Execute AWS Rekogni... --- Near line 962: Possible spelling mistake found. Context: ...appdata as an output. #### Execute AWS Rekognition Add-On for a given target to detect lab... --- Near line 980: Possible spelling mistake found. Context: ...=> {"status"=>"done"} ``` #### Execute ClamAV virus checking Add-On for a given targe... --- Near line 994: Possible spelling mistake found. Context: ...atus"=>"done"} ``` #### Execute remove.bg background image removal Add-On for a g... --- Near line 1010: Possible spelling mistake found. Context: ...e3cce982aaa"}} ``` ## Useful links * [Uploadcare documentation](https://uploadcare.com/d... --- 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.