chef
https://github.com/opscode/chef
Ruby
A systems integration framework, built to bring the benefits of configuration management to your entire infrastructure.
ChefConfig::PathHelper.home
Retrieves the "home directory" of the current user while trying to ascertain the existence of said directory. The path returned uses / for all separators (the ruby standard format). If the home directory doesn't exist or an error is otherwise encountered, nil is returned. If a set of path elements is provided, they are appended as-is to the home path if the homepath exists. If an optional block is provided, the joined path is passed to that block if the home path is valid and the result of the block is returned instead. Home-path discovery is performed once. If a path is discovered, that value is memoized so that subsequent calls to home_dir don't bounce around. See self.all_homes.
Edit
git clone [email protected]:opscode/chef.git
cd chef
open chef-config/lib/chef-config/path_helper.rb
Contribute
# Make a new branchgit checkout -b -your-name--update-docs-ChefConfig--PathHelper-home-for-pr
# Commit to gitgit add chef-config/lib/chef-config/path_helper.rbgit commit -m "better docs for ChefConfig::PathHelper.home"
# Open pull requestgem install hub # on a mac you can `brew install hub`
hub fork
git push <your name> -your-name--update-docs-ChefConfig--PathHelper-home-for-pr
hub pull-request
# Celebrate!