Fix README: .env.local in test should not outrank .env.test.local - #552
Open
hikmetba-bit wants to merge 1 commit into
Open
hikmetba-bit wants to merge 1 commit into
hikmetba-bit wants to merge 1 commit into
Conversation
The Customizing Rails section's example used Dotenv::Rails.files.unshift( ".env.local"), which puts .env.local at index 0 -- the highest precedence, ahead of .env.test.local. Per the precedence table earlier in the same README, .env.local is meant to sit at the '2nd' precedence tier in every environment (between the .env.<env>.local and .env.<env> tiers), the same position it already has by default in development and production. The test-only snippet re-adding it should insert it there too, not at the very front. Fixes bkeepers#543. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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.
Fixes #543.
The Customizing Rails section's example used
Dotenv::Rails.files.unshift(".env.local"), which puts.env.localat index 0 — the highest precedence, ahead of.env.test.local.Per the precedence table earlier in the same README,
.env.localis meant to sit at the 2nd precedence tier in every environment (between the.env.<env>.localand.env.<env>tiers) — the same position it already has by default in development and production (it's just excluded by default in test, perlib/dotenv/rails.rb's(".env.local" unless env.test?)). The test-only snippet that re-adds it should insert it at that same position, not shove it in front of everything.Verified the replacement snippet actually produces the right order:
Docs-only change (README example code), matching the fix the issue reporter already worked out and verified.
🤖 Generated with Claude Code