chef

https://github.com/opscode/chef

Ruby

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

Chef::Provider::File#verify_symlink_sanity

Returns values suitable for use in a requirements assertion statement
when managing symlink source. If we're managing symlink source we can
hit 3 error cases:
1. Symlink to nowhere: File.realpath(symlink) -> raise Errno::ENOENT
2. Symlink loop: File.realpath(symlink) -> raise Errno::ELOOP
3. Symlink to not-a-real-file: File.realpath(symlink) -> (directory|blockdev|etc.)
If any of the above apply, returns a 3-tuple of Exception class,
exception message, whyrun message; otherwise returns a 3-tuple of nil.

Source | Google | Stack overflow

Edit

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

cd chef

open lib/chef/provider/file.rb

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-Chef--Provider--File-verify_symlink_sanity-for-pr


# Commit to git

git add lib/chef/provider/file.rbgit commit -m "better docs for Chef::Provider::File#verify_symlink_sanity"


# 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--Provider--File-verify_symlink_sanity-for-pr

hub pull-request


# Celebrate!