Under Katello, foreman_hooks is loaded under the foreman-tasks process
which is separate from the main foreman process and has a different
working directory. The result is that when hooks run from jobs executed
by foreman-tasks, they raise an exception when rendering the hook json
due to not being able to find the views.
Fix that by specifying an absolute path to the views, based on the Rails
root.
Under Katello, foreman_hooks is loaded under the foreman-tasks process which is separate from the main foreman process and has a different working directory. The result is that when hooks run from jobs executed by foreman-tasks, they raise an exception when rendering the hook json due to not being able to find the views.
Fix that by specifying an absolute path to the views, based on the Rails root.
Fixes #28