github/hubot — pull request #339 by Iristyle (2012-08-23 04:31:23+00:00)
Title: Properly load hubot-scripts with NPM Hubot install

This builds on a prior __dirname patch from keithduncan

When Hubot is installed from NPM, the relative path of
../hubot-scripts.json is no longer valid

An npm install looks like

myhubot
node_modules
hubot
bin
hubot
hubot-scripts
src
scripts
hubot-scripts.json

Thefore the original paths specified here are not correct. We don't
run on Heroku, so the original path resolutions are left intact, with
fallbacks to the NPM style install if things don't exist.

Opted for sync Fs API here since this is an initial load and won't
hurt perf.