Skip to content

Commit

Permalink
Update template README file to be more friendly
Browse files Browse the repository at this point in the history
  • Loading branch information
tombell committed Dec 4, 2011
1 parent c479064 commit ceff5fd
Showing 1 changed file with 37 additions and 12 deletions.
49 changes: 37 additions & 12 deletions src/templates/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,32 @@

This is a version of GitHub's Campfire bot, hubot. He's pretty cool.

This version is designed to be deployed on [Heroku](http://www.heroku.com).
This version is designed to be deployed on [Heroku][heroku].

[heroku]: http://www.heroku.com

## Playing with Hubot

You'll need to install the necessary dependencies for hubot. All of
those dependencies are provided by [npm](http://npmjs.org).
those dependencies are provided by [npm][npmjs].

[npmjs]: http://npmjs.org

### Redis

If you are going to use the `redis-brain.coffee` script from `hubot-scripts`
you will need to add the Redis to Go addon on Heroku which requires a verified
account or you can create an account at [Redis to Go](https://redistogo.com/)
and manually set the `REDISTOGO_URL` variable.
account or you can create an account at [Redis to Go][redistogo] and manually
set the `REDISTOGO_URL` variable.

% heroku config:add REDISTOGO_URL="..."

If you don't require any persistence feel free to remove the
`redis-brain.coffee` from `hubot-scripts.json` and you don't need to worry
about redis at all.

[redistogo]: https://redistogo.com/

### Testing Hubot Locally

You can test your hubot by running the following.
Expand Down Expand Up @@ -54,7 +60,7 @@ want hubot to have.
Adapters are the interface to the service you want your hubot to run on. This
can be something like Campfire or IRC. There are a number of third party
adapters that the community have contributed. Check the
[hubot wiki](https://github.com/github/hubot/wiki) for the available ones.
[hubot wiki][hubot-wiki] for the available ones.

If you would like to run a non-Campfire or shell adapter you will need to add
the adapter package as a dependency to the `package.json` file in the
Expand All @@ -67,17 +73,21 @@ then run hubot with the adapter.

Where `<adapter>` is the name of your adapter without the `hubot-` prefix.

[hubot-wiki]: https://github.com/github/hubot/wiki

## hubot-scripts

There will inevitably be functionality that everyone will want. Instead
of adding it to hubot itself, you can submit pull requests to
[hubot-scripts](https://github.com/github/hubot-scripts).
[hubot-scripts][hubot-scripts].

To enable scripts from the hubot-scripts package, add the script name with
extension as a double quoted string to the hubot-scripts.json file in this
repo.

# Deployment
[hubot-scripts]: https://github.com/github/hubot-scripts

## Deployment

% heroku create --stack cedar
% git push heroku master
Expand All @@ -88,16 +98,29 @@ and add the Redis to Go addon to your app.

% heroku addons:add redistogo:nano

If you run into any problems, checkout Heroku's
[docs](http://devcenter.heroku.com/articles/node-js).
If you run into any problems, checkout Heroku's [docs][heroku-node-docs].

You'll need to edit the `Procfile` to set the name of your hubot.

# Campfire Variables
More detailed documentation can be found on the
[deploying hubot onto Heroku][deploy-heroku] wiki page.

### Deploying to UNIX or Windows

If you would like to deploy to either a UNIX operating system or Windows.
Please check out the [deploying hubot onto UNIX][deploy-unix] and
[deploying hubot onto Windows][deploy-windows] wiki pages.

[heroku-node-docs]: http://devcenter.heroku/com/articles/node-js
[deploy-heroku]: https://github.com/github/hubot/wiki/Deploying-Hubot-onto-Heroku
[deploy-unix]: https://github.com/github/hubot/wiki/Deploying-Hubot-onto-UNIX
[deploy-windows]: https://github.com/github/hubot/wiki/Deploying-Hubot-onto-Windows

## Campfire Variables

If you are using the Campfire adapter you will need to set some environment
variables. Refer to the documentation for other adapters and the configuraiton
of those.
of those, links to the adapters can be found on the [hubot wiki][hubot-wiki].

Create a separate Campfire user for your bot and get their token from the web
UI.
Expand All @@ -115,7 +138,9 @@ Add the subdomain hubot should connect to. If you web URL looks like

% heroku config:add HUBOT_CAMPFIRE_ACCOUNT="mysubdomain"

# Restart the bot
[hubot-wiki]: https://github.com/github/hubot/wiki

## Restart the bot

You may want to get comfortable with `heroku logs` and `heroku restart`
if you're having issues.
Expand Down

0 comments on commit ceff5fd

Please sign in to comment.