Add an advanced option to skip any Gemfile updates#95
Merged
rubys merged 1 commit intofly-apps:mainfrom May 8, 2024
Merged
Conversation
rubys
approved these changes
May 3, 2024
Contributor
That indeed is annoying, and should be fixed. Preferably by scanning Gemfiles and/or config files rather than requiring an option. Care to take a pass at fixing that? I've invited you to the repository... all I ask is that you maintain the current tests and add new ones when you feel it is appropriate. |
Collaborator
Author
|
I have added an issue to track it (#96), but I don't have the spare time to tackle it immediately. I have an inclination that it should be somewhat straight forward to read the ActionCable config, but I've been doing open source long enough to know there are often hidden dragons. |
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.
Motivation
Our standard dockerfile-rails update flow is to bump the gem, run
rails generate dockerfile, have it overwrite everything, use the git diff to undo anything we don't want. This is getting really close to not requiring undoing anything, with the Gemfile being a notable exception. For us, we know exactly what we do and don't want in our Gemfile, but we don't have the same level of confidence with the docker interactions, which is what we use this gem for. Particularly annoying at the moment is the insistence that Redis is the only way to run ActionCable.Generally, I would argue that interacting with the Gemfile at all is beyond the scope of what dockerfile-rails should do, possibly with the exception of checking lock platforms, but I suspect that is likely an uphill battle.
Proposed solution
Add an option to skip modifying the Gemfile. I added the option description to the Readme under the advanced section because it's skipping a significant number of touch points.
I went looking for a place to add tests, but it doesn't appear there are currently tests for any of the Gemfile interactions.