Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Loads a Foreman-style environment file.
Ruby
Branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
spec
.gitignore
Gemfile
LICENSE
README.md
Rakefile
foreman-env.gemspec

README.md

foreman-env

Loads a Foreman-style environment file. To automagically load .env files into ENV use dotenv.

Installation

Add this line to your application Gemfile

gem 'foreman-env'

Usage

require 'foreman/env'

def foo filename
  env = {}
  Foreman::Env.new(filename).entries do |name, value|
    env[name] = value
  end
  env
end

The file should contain key/value pairs, separated by =, with one key/value pair per line.

FOO=bar
BAZ=qux

See Foreman for more info.

License

MIT

Something went wrong with that request. Please try again.