https://github.com/aaronlasseigne/unifig-env
https://github.com/aaronlasseigne/unifig-env
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/aaronlasseigne/unifig-env
- Owner: AaronLasseigne
- License: mit
- Created: 2022-07-22T02:42:47.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2022-12-30T22:48:51.000Z (over 2 years ago)
- Last Synced: 2025-03-14T17:44:45.790Z (about 1 month ago)
- Language: Ruby
- Size: 28.3 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# [Unifig::Env][]
Adds a provider to support loading environment variables to [Unifig][].
[](https://rubygems.org/gems/unifig-env)
[](https://github.com/AaronLasseigne/unifig-env/actions?query=workflow%3ATest)## Installation
Add it to your Gemfile:
``` rb
gem 'unifig-env', '~> 0.3.1'
```Or install it manually:
``` sh
$ gem install unifig-env --version '~> 0.3.1'
```This project uses [Semantic Versioning][].
Check out [GitHub releases][] for a detailed list of changes.## Usage
### Environment
Use `env` as your provider or add it to your list of providers:
``` yml
unifig:
providers: envHOST:
```This will pull `"HOST"` from `ENV` and add it to Unifig.
### Environment File
Use `env-file` as your provider or add it to your list of providers:
``` yml
unifig:
providers: env-file
```By default, it looks for `.env` in the local directory.
The file can be specified by passing `file` to the configuration.``` yml
unifig:
providers:
list: env-file
config:
env-file:
file: my.env
```## Contributing
If you want to contribute to Unifig:Env, please read [our contribution guidelines][].
A [complete list of contributors][] is available on GitHub.## License
Unifig is licensed under [the MIT License][].
[Unifig::Env]: https://github.com/AaronLasseigne/unifig-env
[Unifig]: https://github.com/AaronLasseigne/unifig
[Semantic Versioning]: http://semver.org/spec/v2.0.0.html
[GitHub releases]: https://github.com/AaronLasseigne/unifig-env/releases
[our contribution guidelines]: CONTRIBUTING.md
[complete list of contributors]: https://github.com/AaronLasseigne/unifig-env/graphs/contributors
[the MIT License]: LICENSE.txt