envy
Version, currently 0.1.02 versions
- 0.2.0latestFeb 11, 2018
- 0.1.0not indexedFeb 11, 2018
github.com/petoem/envy
Envy loads environment variables from a .env files
Nothing has been indexed for 0.1.0 yet. The tag is recorded, its shard.yml has not been read, so the manifest and dependency list below are empty because they are unknown rather than because they are absent.
Installation
# Add this to your shard.yml
dependencies:
envy:
github: petoem/envy
version: ~> 0.1.0Then run:
shards installshard.yml
No shard.yml has been indexed for 0.1.0. You can read it on the repository.
Dependencies
Unknown: the shard.yml for this version has not been read yet.
README
This README is the one indexed from the repository at its latest ref, not from the tag for this version.
envy
Envy is a shard that loads environment variables from a .env files into ENV.
Installation
Add this to your application's shard.yml:
dependencies:
envy:
github: petoem/envy
Usage
# As early as possible in your application, require and load a `.env` file
require "envy"
# Load environment variables from `.env` file in the current working directory
Envy.load
# This will load environment variables and overwrite existing ones
Envy.load!
# You can specify multiple files and they will be loaded in order.
Envy.load ".env.development", ".env.redis"
# To parse a `.env` file, returns `Hash(String, String)`. Raises if the file does not exist.
Envy.parse ".env"
# To raise an exception if the .env file does not exist, you can append a block to Envy#load or Envy#load!.
Envy.load! do
{ raise_exception: true }
end
.env files
# Comments and empty lines are ignored
# Basic environment variable
NAME=value
# You can add export in front of each line so you can source the file
export NAME=value
# Spaces inside values are kept
SPACES=are kept
# Double quotes are removed from beginning and end but kept in the inside
# e.g. QUOTES => here are \"\" inside
QUOTES="here are "" inside"
# Equal signs are allowd inside values
EQUAL_SIGNS=are=allowed=
# Variable names are automatically upcased
# e.g. NaMe => NAME
NaMe=value
# Empty value become empty string
EMPTY=
Contributing
- Fork it ( https://github.com/petoem/envy/fork )
- Create your feature branch (git checkout -b my-new-feature)
- Commit your changes (git commit -am 'Add some feature')
- Push to the branch (git push origin my-new-feature)
- Create a new Pull Request
Contributors
- petoem Michael Petö - creator, maintainer
Documentation
Built from the current release. The first visit to a release nobody has asked for starts its build.
Links
This release
- Version
0.1.0- Tagged
- Feb 11, 2018
- Commit
efe1c6436939- Indexed
- not yet
Dependents
Repository
github.com/petoem/envy
Metadata
- Created
- Aug 12, 2026
- Updated
- Aug 15, 2026
- Synced
- Aug 15, 2026
- Versions
- 2