50 lines
877 B
Markdown
50 lines
877 B
Markdown
|
# senf
|
||
|
|
||
|
A safe environment variable requester.
|
||
|
Should not be used in any kind of production environment.
|
||
|
|
||
|
## Installation
|
||
|
|
||
|
1. Add the dependency to your `shard.yml`:
|
||
|
|
||
|
```yaml
|
||
|
dependencies:
|
||
|
senf:
|
||
|
git: https://git.dergrimm.net/dergrimm/senf.git
|
||
|
```
|
||
|
|
||
|
2. Run `shards install`
|
||
|
|
||
|
## Usage
|
||
|
|
||
|
```crystal
|
||
|
require "senf"
|
||
|
|
||
|
SAFE_ENV = Senf::SafeEnv.new([
|
||
|
"TEST_1",
|
||
|
"TEST_2"
|
||
|
])
|
||
|
|
||
|
SAFE_ENV << "TEST_3"
|
||
|
|
||
|
p! SAFE_ENV["TEST_1"],
|
||
|
SAFE_ENV["TEST_2"],
|
||
|
SAFE_ENV["TEST_3"]
|
||
|
```
|
||
|
|
||
|
## Development
|
||
|
|
||
|
TODO: Write development instructions here
|
||
|
|
||
|
## Contributing
|
||
|
|
||
|
1. Fork it
|
||
|
2. Create your feature branch (`git checkout -b my-new-feature`)
|
||
|
3. Commit your changes (`git commit -am 'Add some feature'`)
|
||
|
4. Push to the branch (`git push origin my-new-feature`)
|
||
|
5. Create a new Pull Request
|
||
|
|
||
|
## Contributors
|
||
|
|
||
|
- [Dominic Grimm](https://git.dergrimm.net/dergrimm) - creator and maintainer
|