github/hubot — pull request #364 by ecarter (2012-11-05 00:58:10+00:00)
Title: allow loading of env vars via configuration json file

For a long time I was storing hubot's env vars in my local repo and managing them by simply sourcing the files like so:

```
$ source ./shell-config # file eg. export HUTOT_ENV_VAR="..."
$ source ./heroku-config # file eg. heroku config:add HUBOT_ENV_VAR="..."
```

When reusing the same configuration variables in development and production environments I've found it easier just to specify hubot's env vars in a single json file that gets called at runtime.

Maybe others will find it useful as well...

---

Adds `-i, --config PATH` option to `bin/hubot`.

Usage:

$ bin/hubot --config config.json

or

$ bin/hubot -i config.json

Example `config.json`:

```
{
"HUBOT_CAMPFIRE_ACCOUNT: "...",
"HUBOT_CAMPFIRE_ROOMS: "...",
"HUBOT_CAMPFIRE_TOKEN: "..."
}
```

Which in turn adds the configuration vars to `process.env` to be used by hubot scripts.

---

hubot is vip on all my teams, major thx github :octocat: :metal: