This repository was archived by the owner on Mar 12, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 30
RFC for bundle canonical
#15
Closed
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| - Feature Name: bundle_canonical | ||
| - Start Date: 2018-08-03 | ||
| - RFC PR: | ||
| - Bundler Issue: | ||
|
|
||
| # Summary | ||
|
|
||
| Add a new `bundle canonical` feature. The `bundle canonical` command will modify the gemfile by giving it consistent formatting and beautify it by adding summary of the gems if required. | ||
|
|
||
| The purpose of this RFC is to get feedback on use cases, cli format/syntax, and feature options. | ||
|
|
||
| # Motivation | ||
|
|
||
| The main use case is to make a large (maybe not easily maintainable) Gemfile consistent. | ||
|
|
||
| # Detailed design | ||
|
|
||
| The usage: | ||
|
|
||
| ```ruby | ||
| # Gemfile | ||
|
|
||
| source "https://rubygems.org/" | ||
|
|
||
| gem "rack" | ||
| ``` | ||
|
|
||
| ```bash | ||
| $ bundle canonical | ||
| ``` | ||
|
|
||
| ```ruby | ||
| # Gemfile after | ||
|
|
||
| source "https://rubygems.org/" | ||
|
|
||
| # a modular Ruby webserver interface | ||
| gem "rack" | ||
| ``` | ||
|
|
||
| Adding `--dry-run` option does not change the Gemfile rather shows what the Gemfile would look like if run without `--dry-run`. | ||
|
|
||
| # How We Teach This | ||
|
|
||
| An addition to the documentation. To bring awareness among users, I can think of normal blog articles, and/or bundler press/social media channels. | ||
|
|
||
| # Drawbacks | ||
|
|
||
| I don't think there are any. | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be good to have a lot more examples that reflect more real-world Gemfiles and how this command modifies them:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently, it only works well for a standard Gemfile.