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.join

A Chef-FS path is a path in a chef-repository that can be used to address
both files on a local file-system as well as objects on a chef server.
These paths are stricter than file-system paths allowed on various OSes.
Absolute Chef-FS paths begin with "/" (on windows, "\" is acceptable as well).
"/" is used as the path element separator (on windows, "\" is acceptable as well).
No directory/path element may contain a literal "\" character.  Any such characters
encountered are either dealt with as separators (on windows) or as escape
characters (on POSIX systems).  Relative Chef-FS paths may use ".." or "." but
may never use these to back-out of the root of a Chef-FS path.  Any such extraneous
".."s are ignored.
Chef-FS paths are case sensitive (since the paths on the server are).
On OSes with case insensitive paths, you may be unable to locally deal with two
objects whose server paths only differ by case.  OTOH, the case of path segments
that are outside the Chef-FS root (such as when looking at a file-system absolute
path to discover the Chef-FS root path) are handled in accordance to the rules
of the local file-system and OS.

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-join-for-pr


# Commit to git

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


# 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-join-for-pr

hub pull-request


# Celebrate!