spumko/hapi — pull request #875 by iamdoron (2013-05-21 21:10:02+00:00)
Title: allow to require a plugin with no path prefix

I'm not sure this is the right way to test it - it took me a while to find this way, I just want to show it to someone :)

In node 0.6 you could control the `require.paths` from code, but it was removed, NODE_PATH is an environment variable that allows to inject these paths to the require paths. If you think about it, there's no need to specify the `requiredPath` for a pack if you assume hapi user uses NODE_PATH.

Anyhow, it solves https://github.com/spumko/hapi/issues/873, but testing it feels dirty.