A safe environment variable requester. Should not be used in any kind of production environment.
This repository has been archived on 2022-02-03. You can view files and clone it, but cannot push or open issues or pull requests.
Find a file
2022-02-03 16:28:48 +00:00
src Init 2022-01-22 21:31:30 +01:00
.editorconfig Init 2022-01-22 21:31:30 +01:00
.gitignore Init 2022-01-22 21:31:30 +01:00
LICENSE Init 2022-01-22 21:31:30 +01:00
README.md Update 'README.md' 2022-02-03 16:28:48 +00:00
shard.yml Init 2022-01-22 21:31:30 +01:00

senf

WARNING: You are better off using https://github.com/repomaa/env_config.cr!

A safe environment variable requester. Should not be used in any kind of production environment.

Installation

  1. Add the dependency to your shard.yml:

    dependencies:
      senf:
        git: https://git.dergrimm.net/dergrimm/senf.git
    
  2. Run shards install

Usage

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