Project

hood

0.0
No commit activity in last 3 years
No release in over 3 years
Hood gives you a standard way to define environment variable requirements for your app.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies
 Project Readme

Hood

Hood is currently in alpha development. Our feature-set isn't fully developed, our specs are weak, and there are probably bugs.

Hood is to enviroment variables as bundler is to gems. To put it simply, we have the following goals:

  • Serve as a means to document all enviroment variables for a given Ruby or Rails project.
  • Give developers an easy way to ensure the presence of required variables
  • Streamline the process of bootstrapping a new environment

Envfile

Hood uses something called an "Envfile" to define environment variables. It uses a DSL (Domain Specific Language) similar to Bundler's to do so:

env "GOOGLE_MAPS_API_KEY"

env "REDIS_URI", :default => "localhost:6379"

env "SALES_TAX", :description => "Current sales tax in Los Angeles (eg. 0.0875)"

prefix "DB_" do
  env "PASSWORD"
  env "USER"
  env "DATABASE"
  env "SOCKET"
  env "ADAPTER"
end

Options

  • :description If the desired value isn't obvious, you can include a description
  • :optional Pass true to avoid throwing a runtime error when the app starts and this var isn't present
  • :default A pre-defined default value for this var

Compatibility

Hood is tested against the following Rubies: MRI 1.8.7, MRI 1.9.2, MRI 1.9.3, Rubinius 2.0, and JRuby.

Build Status

Build History

License

Hood is released under the MIT license. See the LICENSE file for more info.