puppetlabs/Razor — pull request #426 by daniel-pittman (2013-03-07 18:35:22+00:00)
Title: (#418) Resolve symlinks when determining razor install location

The `razor` binary installs in a non-standard location, and depends on the
value of the `__FILE__` variable supplied by the Ruby interpreter to find the
library code it depends on.

This didn't work when a symlink was used for the top-level file, since the
ruby interpreter would supply the symlink, not the resolved path, and that
could be outside the install tree.

This updates the command line and daemon scripts to resolve the absolute real
path on disk from `__FILE__` using the standard Pathname library, before
using it.

This closes #418.

Signed-off-by: Daniel Pittman