Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support
default
value for optional environment variables
Prius helps us ensure that our application always boots with the required state. However in large applications with multiple contributors, this can cause a configuration error in an unrelated component to break the entire application. Providing a default value allows contributors to safely introduce new configuration without worrying if the application breaks. For example: ```ruby Prius.get(:my_worker_pool, type: int, required: false, default: 0) ``` It also means that boolean flags that are optional can be made to have a default value of `false` rather than `nil`. Note: This change _does not_ allow you to specify a default value for required config, for obvious reasons.
- Loading branch information