Stop injecting rails_12factor from the Heroku generator - #672
Merged
Conversation
`rails generate ember:heroku` added `rails_12factor` to the `Gemfile` for the `staging` and `production` groups. The gem exists to backport twelve-factor behaviour — logging to stdout and serving static assets in production — onto Rails 4, which Rails has done natively since `5.0`. Its own README says a new Rails 5 application does not need it, and its repository was archived in February 2022. Every Rails version this gem supports is `>= 5.2`, so the injection could only ever add an unmaintained dependency to a project that has no use for it. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014rAfkAVGVifbaEoTVeT66u
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.
Why
rails generate ember:herokuaddedrails_12factorto the project'sGemfilefor thestagingandproductiongroups.The gem exists to backport twelve-factor behaviour — logging to stdout and serving static assets in production — onto Rails 4, which Rails has done natively since
5.0. Its own README says a new Rails 5 application does not need it, and its repository was archived in February 2022.Every Rails version this gem supports is
>= 5.2(README.md, "Ruby and Rails support"; the CI matrix runs7.2,8.0,8.1andmain), so the injection could only ever add an unmaintained dependency to a project that has no use for it.What changed
HerokuGenerator#inject_12factor_gem.USAGE.Gemfileuntouched. Renamed thecreate_empty_gemfile_for_bundlerhelper tocreate_empty_gemfile— with nogemaction left, the file is now the fixture the assertion reads rather than a prerequisite for Thor.rails_12factorfrom yourGemfile).Verification
The new spec was confirmed meaningful: with
inject_12factor_gemrestored it fails with+gem "rails_12factor", group: [:staging, :production]in the diff.Full
spec/libalso passes here exceptEmberCli::App#test exits with exit status of 0, which fails onmainin this container too —ember testreportsLauncher Chrome not found, unrelated to this change.Note on merge order
This branch and #671 both edit
lib/generators/ember/heroku/USAGE; whichever merges second needs a small conflict resolution.🤖 Generated with Claude Code
https://claude.ai/code/session_014rAfkAVGVifbaEoTVeT66u
Generated by Claude Code