A Ruby gem to load environment variables from `.env`.
Full Changelog: https://github.com/bkeepers/dotenv/compare/v3.1.0...v3.1.1
# config/application.rb
# Set a custom dotenv logger
Dotenv::Rails.logger = MyCustomLogger.new
module YourApp
class Application < Rails::Application
# …
end
end
Full Changelog: https://github.com/bkeepers/dotenv/compare/v3.0.3...v3.1.0
Full Changelog: https://github.com/bkeepers/dotenv/compare/v3.0.2...v3.0.3
Full Changelog: https://github.com/bkeepers/dotenv/compare/v3.0.1...v3.0.2
Full Changelog: https://github.com/bkeepers/dotenv/compare/v3.0.0...v3.0.1
See #476 for more details and to discuss this release.
Breaking Changes
~> 2.0
if you are using an outdated Ruby or Rails version. https://github.com/bkeepers/dotenv/pull/466, https://github.com/bkeepers/dotenv/pull/471
\n
is no longer expanded into a newline in quoted strings. Use multi-line strings with real line breaks, or set DOTENV_LINEBREAK_MODE=legacy
to preserve the old behavior. @nitsujri https://github.com/bkeepers/dotenv/pull/423
ENV
will be automatically restored between tests (ActiveSupport::TestCase
and Rspec
). https://github.com/bkeepers/dotenv/pull/472, https://github.com/bkeepers/dotenv/pull/475
Dotenv::Rails.overload
. So now .env.development.local
will overwrite .env.local
, which will overwrite .env.development
, which will overwrite .env
. @eriklovmo - https://github.com/bkeepers/dotenv/pull/460
dotenv.load
has been renamed to load.dotenv
to properly make use of namespaces in ActiveSupport::Notifications https://github.com/bkeepers/dotenv/pull/472
Other improvements
rake
loaded development files (.env*development
) for test-related tasks. https://github.com/bkeepers/dotenv/pull/470
-i
/--ignore
option to dotenv
CLI to optionally ignore missing files. @stevenharman https://github.com/bkeepers/dotenv/pull/463
Dotenv::Rails.files
. https://github.com/bkeepers/dotenv/pull/468
Deprecations
dotenv-rails
gem is now superfluous. It's not technically deprecated yet and will continue to work, but the dotenv
gem does the same thing. https://github.com/bkeepers/dotenv/pull/468
Dotenv::Railtie
has been deprecated. Use Dotenv::Rails
. https://github.com/bkeepers/dotenv/pull/468
Dotenv.overload
has been replaced with overwrite
. overload
will still work and is not technically deprecated, but documentation refers to Dotenv.overwrite
now. https://github.com/bkeepers/dotenv/pull/469
New Contributors
Full Changelog: https://github.com/bkeepers/dotenv/compare/v2.8.1...v3.0.0.beta
Breaking Changes
~> 2.0
if you are using an outdated Ruby or Rails version. https://github.com/bkeepers/dotenv/pull/466, https://github.com/bkeepers/dotenv/pull/471
\n
is no longer expanded into a newline in quoted strings. Use multi-line strings with real line breaks, or set DOTENV_LINEBREAK_MODE=legacy
to preserve the old behavior. @nitsujri https://github.com/bkeepers/dotenv/pull/423
ENV
will be automatically restored between tests (ActiveSupport::TestCase
and Rspec
). https://github.com/bkeepers/dotenv/pull/472, https://github.com/bkeepers/dotenv/pull/475
Dotenv::Rails.overload
. So now .env.development.local
will overwrite .env.local
, which will overwrite .env.development
, which will overwrite .env
. @eriklovmo - https://github.com/bkeepers/dotenv/pull/460
dotenv.load
has been renamed to load.dotenv
to properly make use of namespaces in ActiveSupport::Notifications https://github.com/bkeepers/dotenv/pull/472
Other improvements
rake
loaded development files (.env*development
) for test-related tasks. https://github.com/bkeepers/dotenv/pull/470
-i
/--ignore
option to dotenv
CLI to optionally ignore missing files. @stevenharman https://github.com/bkeepers/dotenv/pull/463
Dotenv::Rails.files
. https://github.com/bkeepers/dotenv/pull/468
Deprecations
dotenv-rails
gem is now superfluous. It's not technically deprecated yet and will continue to work, but the dotenv
gem does the same thing. https://github.com/bkeepers/dotenv/pull/468
Dotenv::Railtie
has been deprecated. Use Dotenv::Rails
. https://github.com/bkeepers/dotenv/pull/468
Dotenv.overload
has been replaced with overwrite
. overload
will still work and is not technically deprecated, but documentation refers to Dotenv.overwrite
now. https://github.com/bkeepers/dotenv/pull/469
New Contributors
Full Changelog: https://github.com/bkeepers/dotenv/compare/v2.8.1...v3.0.0.beta
Full Changelog: https://github.com/bkeepers/dotenv/compare/v2.8.0...v2.8.1
$ dotenv --overload -f .env.local
) #445
Full Changelog: https://github.com/bkeepers/dotenv/compare/v2.7.6...v2.8.0