-
key alias
# file: Envfile key_alias! { Rails.env } variable :FOO The value of ENV['FOO_DEVELOPMENT'] will take precedence over ENV['FOO'] when running in development.
- Project moved to GitLab (https://gitlab.com/envied/envied)
- Now requiring Ruby 2.4+ [#48], [#51]
- Removed
coercible
dependency as now all coercion functionality is implemented locally. This is a backwards compatible change. [#49] - Lots of refactoring and bringing the project up-to-date
-
default values
See https://gitlab.com/envied/envied/tree/0-9-releases#defaults
- Updates
envied check:heroku
to support multiline ENV variables #42
- Support multiple groups #16
- Replaced rack dependency with stdlib solution using CGI for supporting hash type
- Now requiring Ruby 2.1.x and up
- Added float type which resolves #30
- Added uri type #22
- Updated extractor to find interpolated ENV vars which fixes #21
- Various typo fixes #24 and #28
- Resolved warnings when running tests
- Rails 5 support #25
- Envfile: type string is also correctly implied when providing a default.
- the
check
task uses ENV['ENVIED_GROUPS'] as default groups-option if present
-
Rails: you can use ENVied now in config/application.rb and config/environments/*.rb
For existing projects: rerun the
init:rails
-task -
running
check:heroku
takes Heroku's value of ENVIED_GROUPS into account -
calling
enable_defaults!
without arguments now does what it says
-
doing
ENVied.require
inconfig/initializers/envied.rb
(as previously generated byinit:rails
-task) is not recommended anymore. It triggers a deprecation warning.It's recommended to rerun the
init:rails
-task.
-
the
check:heroku:binstub
task uses ENV['HEROKU_APP'] as app-option if present -
the
check
andcheck:heroku
task now have a--quiet
optionThis prevents output on STDOUT for a successful check. Handy for wrapper-scripts:
# some bash-script 'ensure-env' #!/usr/bin/env bash bundle exec envied check --quiet --groups default && $@ $ ./ensure-env echo 'works!' works!
-
ENVied.require accepts string with groups, e.g. 'default,production'
This way it's possible to easily require groups using the ENV:
# config/initializers/envied.rb ENVied.require(*ENV['ENVIED_GROUPS'] || Rails.groups) $ ENVIED_GROUPS='default,production' bin/rails server
- extract-task would report at most one variable per line of code.
- extract-task would not extract variable names with digits
- titlecase variable types. Use downcased instead:
variable :PORT, :integer
-
extract: test/spec-folder are no longer part of the default globs.
Use the option
--tests
to include it:$ bundle exec envied extract --tests
-
extract-task: see all ENV-variables used in your project.
$ envied extract Found 63 occurrences of 45 variables: BUNDLE_GEMFILE * config/boot.rb:4 * config/boot.rb:6 ...
-
version-task (i.e. bin/envied --version)
-
Total refactor (TM).
-
Fix bug in Heroku binstub.
It checked for group 'default,production' instead of 'default' and 'production'.
- Add init:rails-task for setup in Rails applications.
- Fix bug: 'false' was not a coercible value.
-
Add
envied check:heroku
to do a check on your Heroku app. -
Add
envied check:heroku:binstub
to generate script for convenient 'check:heroku'
- Add
envied check
to check whether defined variables are present and valid.
- The configuration now lives in
Envfile
by default.
-
add Array Hash types
# in env.rb ENVied.configure { variable :TAGS, :Array; variable :HASH, :Hash } ENVied.require $ HASH=a=1&b=2 TAGS=tag1,tag2 ruby -renvied -r./env.rb -e 'p ENVied.TAGS' # ["tag1", "tag2"] $ HASH='a=1&b=2' TAGS=tag1,tag2 ruby -renvied -r./env.rb -e 'p ENVied.HASH' # {'a' => '1', 'b' => '2'}
-
groups added
This allows for more fine-grained requiring. See the section in the README.
-
configuring is now simpler:
ENVied.configure { variable :RACK_ENV } # vs ENVied.configure {|env| env.variable :RACK_ENV }
-
Deprecate
require!
. Userequire
instead.Just like requiring groups with Bundler.
-
Deprecate lowercase methods for uppercase ENV-variables.
ENV['RACK_ENV']
is no longer accessible asENVied.rack_env
, only asENVied.RACK_ENV
. This is not only what you would expect, but it also reduces the chance of clashing with existing class-methods.
-
defaults need to be enabled explicitly:
ENVied.configure(enable_defaults: Rails.env.development?) { ... }
- add defaults
- add defaults