chef

https://github.com/opscode/chef

Ruby

A systems integration framework, built to bring the benefits of configuration management to your entire infrastructure.

Chef::ChefFS::PathUtils.descendant_path

Given two general OS-dependent file paths, determines the relative path of the
child with respect to the ancestor.  Both child and ancestor must exist and be
fully resolved - this is strictly a lexical comparison.  No trailing slashes
and other shenanigans are allowed.

TODO: Move this to util/path_helper.

Source | Google | Stack overflow

Edit

git clone [email protected]:opscode/chef.git

cd chef

open lib/chef/chef_fs/path_utils.rb

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-Chef--ChefFS--PathUtils-descendant_path-for-pr


# Commit to git

git add lib/chef/chef_fs/path_utils.rbgit commit -m "better docs for Chef::ChefFS::PathUtils.descendant_path"


# Open pull request

gem install hub # on a mac you can `brew install hub`

hub fork

git push <your name> -your-name--update-docs-Chef--ChefFS--PathUtils-descendant_path-for-pr

hub pull-request


# Celebrate!