- Added
env_overrides
for overridingdefault
andrequired
attributes per environment (e.g.dev
,test
,prod
).
- Change from
Logger.warn/1
toLogger.warning/1
to avoid deprecation message on compile time. - Updated dependencies.
- Bugfix: Documentation generation throwed warnings for custom Skogsra types.
- Updated dependencies.
- Bugfix: [YAML Provider] fixed bug where it would duplicate apps.
- Bugfix: [YAML Provider] fixed bug where regular lists weren't accepted as values.
- Migrated pipeline from Travis to Github Actions.
- Improved code coverage.
- Updated dependencies.
- Added
:neg_integer
,:non_neg_integer
and:pos_integer
as custom types.
- Wrong spec in private function.
- Multiline docs in templates weren't properly commented.
- Added
preload/0
andpreload/1
functions for overriding Elixir config values when config providers and OS system variables have precedence.
-
When there is no default and it's not required, a variable should have the variable's type and
nil
as return value e.g. for the variable:my_var
that returns integer, the spec would be as follows:@spec my_var() :: {:ok, nil | integer()} | {:error, binary()}
- Added
validate!/0
andvalidate!/1
functions for checking whether the required variables have values or not (thanks to Riccardo Binetti). - Travis-CI build now checking
format
,credo
,dialyzer
andcoveralls
.
- When no type is defined and it cannot be derived from the default value,
then it should return
any()
instead ofbinary()
.
- Added JSON config provider.
- Added new
Skogsra.Binding
behaviour for adding custom variable bindings. - New option
binding_order
for setting a custom order for variable binding (defaults to[:system, :config]
). Possible values::system
: For loading OS environment variables.:config
: For loading application configuration variables.module()
: For loading variables using a custom module implementingSkogsra.Binding
behaviour.
- Added
binding_skip
option to skip one or several variable binding types (defaults to[]
).
- Improved YAML config provider by making it equivalent to the JSON provider.
- The option
skip_config
was deprecated favoringbinding_skip: [:config]
. - The option
skip_system
was deprecated favoringbinding_skip: [:system]
.
- Fixed bug where
Skogsra.Type
couldn't be used as a type (see Custom Type Fails at get_spec_type)
- Improved function specs.
- Improved generated docs.
- Added option to avoid automatically generated docs.
- Added function for OS environment variable generation for Unix, Releases and Windows.
- Improved documentation.
- Improved errors when a variable is missing.
- Added
:module
built-in type. - Added
:unsafe_module
built-in type.
- Added
Skogsra.Type
behaviour for defining custom types. - Application configuration values are now casted as well to the defined
type in the
Skogsra
environment variable definition. - Added YAML configuration provider.
- Namespaces now inherit values from default namespace.
- Favoring the use of
:persistent_term
s over:ets
tables. This avoids the creation of an application tree for this project, thus making it even faster.
- Fixed bug where
Skogsra.Cache
didn't work at compilation time.
- Added autogenerated reload functions.
- Added autogenerated setter functions.
- Improved documentation.
- Code rearrangement and refactor for maintainability.