-
-
Notifications
You must be signed in to change notification settings - Fork 528
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
Introduce suspenders:cleanup:organize_gemfile
task
#1181
Merged
stevepolitodesign
merged 1 commit into
suspenders-3-0-0
from
suspenders-3-0-0-organize-gemfile
Apr 2, 2024
Merged
Introduce suspenders:cleanup:organize_gemfile
task
#1181
stevepolitodesign
merged 1 commit into
suspenders-3-0-0
from
suspenders-3-0-0-organize-gemfile
Apr 2, 2024
Conversation
This file contains 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
stevepolitodesign
force-pushed
the
suspenders-3-0-0-organize-gemfile
branch
from
March 30, 2024 00:07
5d89a64
to
c158b2e
Compare
test/fixtures/files/gemfile_messy
Outdated
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.
This is exactly how suspenders:install:web
modifies the Gemfile.
stevepolitodesign
force-pushed
the
suspenders-3-0-0-organize-gemfile
branch
2 times, most recently
from
March 30, 2024 09:30
8f493f5
to
6b4ae1b
Compare
Potentially closes #915. |
mike-burns
reviewed
Apr 1, 2024
Introduce `Suspenders::Cleanup::OrganizeGemfile` class and corresponding task in an effort to reduce duplicate groups in the modified Gemfile. This is because the [gem_group][] method does not modify existing groups. I've opened [#49512][] in an effort to fix this, but until then, this task will suffice. This class is designed to be run after `suspenders:install:web`, and does not account for all edge cases. For example, it assumes gems are grouped by symbols (i.e. :test and not "test"), and does not account for inline syntax: ```ruby gem 'my-gem', group: [:cucumber, :test] ``` We could consider extracting this into a Gem (with a fun name, of course. Maybe "Polish"), but for now, I think this simple procedural code if just fine. Additionally, this commit removes duplicate Rake task that was generated with the plugin. [gem_group]: https://api.rubyonrails.org/classes/Rails/Generators/Actions.html#method-i-gem_group [#49512]: rails/rails#49512
stevepolitodesign
force-pushed
the
suspenders-3-0-0-organize-gemfile
branch
from
April 2, 2024 23:45
fd6db90
to
e2f6a0b
Compare
stevepolitodesign
added a commit
that referenced
this pull request
May 10, 2024
Introduce `Suspenders::Cleanup::OrganizeGemfile` class and corresponding task in an effort to reduce duplicate groups in the modified Gemfile. This is because the [gem_group][] method does not modify existing groups. I've opened [#49512][] in an effort to fix this, but until then, this task will suffice. This class is designed to be run after `suspenders:install:web`, and does not account for all edge cases. For example, it assumes gems are grouped by symbols (i.e. :test and not "test"), and does not account for inline syntax: ```ruby gem 'my-gem', group: [:cucumber, :test] ``` We could consider extracting this into a Gem (with a fun name, of course. Maybe "Polish"), but for now, I think this simple procedural code if just fine. Additionally, this commit removes duplicate Rake task that was generated with the plugin. [gem_group]: https://api.rubyonrails.org/classes/Rails/Generators/Actions.html#method-i-gem_group [#49512]: rails/rails#49512
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Introduce
Suspenders::Cleanup::OrganizeGemfile
class and corresponding task in an effort to reduce duplicate groups in the modified Gemfile.This is because the gem_group method does not modify existing groups. I've opened #49512 in an effort to fix this, but until then, this task will suffice.
This class is designed to be run after
suspenders:install:web
, and does not account for all edge cases. For example, it assumes gems are grouped by symbols (i.e. :test and not "test"), and does not account for inline syntax:We could consider extracting this into a Gem (with a fun name, of course. Maybe "Polish"), but for now, I think this simple procedural code if just fine.
Additionally, this commit removes duplicate Rake task that was generated with the plugin.