@balena/hubot-jellyfish v2.0.3
hubot-jellyfish
A Jellyfish adapter for Hubot
Developing
Setup
Clone this repo and install the npm dependencies:
git clone git@github.com:product-os/hubot-jellyfish.git cd hubot-jellyfish && npm iCreate a local hubot instance:
npm i -g yo generator-hubot mkdir myhubot && cd myhubot yo hubotFollow the instructions. When prompted to specify an adapter, enter
jellyfish.Use
npm linkto link thehubot-jellyfishadapter to the hubot instance:cd myhubot npm link ../hubot-jellyfishEdit the
package.jsonfile inmyhubotto add thehubot-jellyfishnpm package as a dependency (set the version to the current version of this package):"dependencies": { ... "hubot-jellyfish": "^0.0.1" }Configure environment variables
The following environment variables must be defined before running hubot locally:
HUBOT_JELLYFISH_API_URL(e.g.http://localhost:8000for local development)HUBOT_JELLYFISH_LOGIN_USERHUBOT_JELLYFISH_LOGIN_PASSWORD
The easiest way to do this is to add a
.envto yourmyhubotfolder and specify the environment variables in that file.Use
npm linkto link to thehubotpackage in themyhubotproject (otherise the localnode_modules/hubotpackage is used and the adapter doesn't communicate with the same hubot asmyhubotis using!)cd hubot-jellyfish npm link ../myhubot/node_modules/hubotRun Hubot!
cd myhubot bin/hubot -n hubot -a jellyfish
Testing
To run the unit tests you have to unlink hubot from hubot-jellyfish:
cd hubot-jellyfish
npm unlink ../myhubot/node_modules/hubot
npm installThen you can run the tests:
npm run test