-
Notifications
You must be signed in to change notification settings - Fork 507
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Join files to Rails.root at load time #484
Merged
Merged
Conversation
This file contains 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
Yes, this works perfectly! Thanks for the quick response! |
that-jill
referenced
this pull request
in powerhome/power-web-development-interview
Feb 14, 2024
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [dotenv-rails](https://togithub.com/bkeepers/dotenv) | `3.0.0` -> `3.0.1` | [![age](https://developer.mend.io/api/mc/badges/age/rubygems/dotenv-rails/3.0.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/rubygems/dotenv-rails/3.0.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/rubygems/dotenv-rails/3.0.0/3.0.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/rubygems/dotenv-rails/3.0.0/3.0.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>bkeepers/dotenv (dotenv-rails)</summary> ### [`v3.0.1`](https://togithub.com/bkeepers/dotenv/blob/HEAD/Changelog.md#301) [Compare Source](https://togithub.com/bkeepers/dotenv/compare/v3.0.0...v3.0.1) **What's Changed** - Disable autorestore if using climate_control or ice_age by [@​bkeepers](https://togithub.com/bkeepers) in [https://github.com/bkeepers/dotenv/pull/483](https://togithub.com/bkeepers/dotenv/pull/483) - Join files to Rails.root at load time by [@​bkeepers](https://togithub.com/bkeepers) in [https://github.com/bkeepers/dotenv/pull/484](https://togithub.com/bkeepers/dotenv/pull/484) - Manually check optional Rails dependency version by [@​bkeepers](https://togithub.com/bkeepers) in [https://github.com/bkeepers/dotenv/pull/481](https://togithub.com/bkeepers/dotenv/pull/481) **Full Changelog**: bkeepers/dotenv@v3.0.0...v3.0.1 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/powerhome/power-web-development-interview). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4xNzMuMCIsInVwZGF0ZWRJblZlciI6IjM3LjE3My4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
lucasmazza
reviewed
Feb 15, 2024
].compact, | ||
autorestore: env.test? | ||
) | ||
end | ||
|
||
# The list of files to load, joined with Rails.root | ||
def files |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bkeepers fwiw this breaks the example from Customizing Rails where we modify Dotenv::Rails.files
in place.
From my current codebase, as we migrate from dotenv-rails
to only use dotenv
# This silently fails, and `.env.shared` is never loaded
Dotenv::Rails.files << ".env.shared" if defined?(Dotenv)
# this works
Dotenv::Rails.files += [".env.shared"] if defined?(Dotenv)
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.
In v2, files were joined with
Rails.root
during thebefore_configuration
callback. #468 refactored the list of files to be configurable, but caused the paths to be joined withRails.root
at the time of app initialization (before Rails.root is set).@mvz can you try this branch out and let me know if it fixes the issue you were running into?
cc #476 (comment)