- Fix
NoMethodError
in non-Rails environments #394
- Fix for parallel spec tasks initializing in development #384
- Test against updated rubies #383, #387
- Conditional branch cleanup for clarity of intent #385
- Fix for load order issue with Railties #391
- NEW: dotenv-templates using the -t flag #377, #393
- Cleaned up CLI while resolving regressions in 2.7.1 #382
- Fixes regression with CLI experience (#376)
- Add Dotenv.parse method (#362)
- Add Support for Rails 6.0 (#370)
- Improve dotenv CLI output (#374)
- Add GitHub Actions automation (#369)
- Test against Ruby 2.6 (#372)
- Added require keys method to raise if not defined (#354)
- Use latest Ruby version on CI (#356, #363)
- Clarify variable hierarchy in README.md (#358)
- Use SVG Travis CI badge (#360)
This release re-introduces multiline values with proper protections against the regressions that were reported in 2.3.0, and corrects a breaking change in the API from 2.4 for Dotenv::Environment
.
This release reverts Parse multiline values
(#318, #329) due to a parsing regression that was discovered after the last release (#336, #339, #341).
- Skip over lines that don't set an envvars (#291)
- Document the -f flag (#310)
- Existing variable takes precendence when performing substitution (#313)
- Parse multiline values (#318, #329)
- Fix load to respect existing environment variables over env file when doing variable interpolation (#323)
- Add gem version badge to README.md (#328)
- Rescue from bundler require error (#330)
- Support Rails 5.2 (#325)
- Support Rails 5.1 (#299)
- Drop official support for Ruby 1.9, jruby, and Rubinius. They may continue to work, but tests are not run against them. (#283)
- Allow leading and trailing whitespace (#276, #277)
- [dotenv-rails] Fix for rspec rake tasks initializing in development (#241)
- [dotenv-rails] Allow a local file per environment, e.g.
.env.development.local
(#281) - [dotenv-rails] No longer load
.env.local
in rails' test environment (#280)
- Fix parser to allow leading whitespace before variables (#276)
- [dotenv-rails] Fix bug with
require "dotenv/rails-now"
in older versions of rails (#269)
- Fix load error when using Spring w/ custom config (#246)
- Relax dependency on
railties
to allow Rails 5.0 apps. (#226) - Fix scenario where some escaped
$
would not be unescaped. (#222) - Gracefully handle files with UTF-8 BOM (#225)
- Support carriage returns in addition to newlines in .env (#194)
- Add runtime dependency on rails 4 for dotenv-rails (#189)
- Fix for expansion of escaped variables (#181)
-
.env.local
and.env.#{Rails.env}
will be automatically be loaded with thedotenv-rails
gem. -
Drop official support for Ruby 1.8.7 and REE. They may still continue to work, but will not be tested against. Lock to version "<= 1.1" if you are using Ruby 1.8.
-
dotenv-rails
now only supports Rails 4. Manually configure dotenv if you are using Rails 3. -
Support -f option to dotenv executable
dotenv -f /path/to/.env,/path/to/another/.env
-
Fix issue calling
Dotenv::Railtie.load
in Rails 4.1 before application is defined (#155)
-
Define
#load
onDotenv::Railtie
, which can be called to manually loaddotenv
before Rails has initialized. -
add
dotenv/rails-now
, which can be required in theGemfile
to immediately load dotenv.gem 'dotenv-rails', require: 'dotenv/rails-now' gem 'gem-that-requires-env-variables'
- Fix load error with Spring when running
rails server
(#140)
-
dotenv-rails is now loaded during the
before_configuration
callback, which is fired when theApplication
constant is defined (class Application < Rails::Application
). -
Remove deprecated features. Upgrade to 0.11.0 and fix deprecation warnings before upgrading to 1.0.0.
-
Watch .env for changes with Spring in Rails 4 (#118)
-
Fix deprecation warnings for
File.exists?
(#121) -
Use
Rails.root
to find.env
(#122) -
Avoid substitutions inside single quotes (#124)
- Depend on dotenv-deployment ~>0.0.2, which fixes issues with 0.0.1
- Extract dotenv-deployment gem. https://github.com/bkeepers/dotenv-deployment
-
Add support for executing interpolated commands. (Ruby >= 1.9 only)
HEAD_SHA=$(git rev-parse HEAD)
-
Add
dotenv_role
option in Capistrano.set :dotenv_role, [:app, web]
-
Add
Dotenv.overload
to overwrite existing environment values.
-
Add support for variable expansion.
HOST="example.com" URL="http://${USER}@${HOST}" ESCAPED_VARIABLE="this is \$NOT replaced"
-
Allow setting variables without a value.
BLANK=
-
Add
dotenv
executable to load.env
for other scripts.$ dotenv ./script.py
-
Added a capistrano recipe to symlink in
.env
on deploy. -
Allow inline comments
VARIABLE=value # this is a comment
-
Raises Dotenv::FormatError when parsing fails
-
Remove deprectated autoloading. Upgrade to 0.6 first and fix any warnings.
-
Add Dotenv.load! which raises Errno::ENOENT if the file does not exist
-
Add dotenv-rails gem for autoloading in a Rails app
-
Deprecated autoloading with plain dotenv gem
-
Support for double quotes
A="some value" B="with \"escaped\" quotes" C="and newline\n expansion"
-
Support for pow-style variables prefixed with export
export VARIABLE="some value"
-
Load immediately on require in Rails instead of waiting for initialization
-
Add YAML-style variables
VARIABLE: some value
-
Add support for quoted options, e.g.:
VARIABLE='some value'
-
Fix rake deprecation warnings
- Avoid overriding existing ENV variables so values set before loading the app are maintained.