Add an advanced option to skip any Gemfile updates #95
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.