Introduce suspenders:cleanup:organize_gemfile task#1181
Merged
stevepolitodesign merged 1 commit intosuspenders-3-0-0from Apr 2, 2024
Merged
Introduce suspenders:cleanup:organize_gemfile task#1181stevepolitodesign merged 1 commit intosuspenders-3-0-0from
suspenders:cleanup:organize_gemfile task#1181stevepolitodesign merged 1 commit intosuspenders-3-0-0from
Conversation
5d89a64 to
c158b2e
Compare
Contributor
Author
There was a problem hiding this comment.
This is exactly how suspenders:install:web modifies the Gemfile.
8f493f5 to
6b4ae1b
Compare
Contributor
|
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
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
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
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::OrganizeGemfileclass 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.