_____
/_____\
____[\`---'/]____
/\ #\ \_____/ /# /\
/ \# \_.---._/ #/ \
/ /|\ | | /|\ \ RiBot - The Ruby API Reference Bot
/___/ | | | | | | \___\
| | | | |---| | | | |
|__| \_| |_#_| |_/ |__|
//\\ <\ _//^\\_ /> //\\
\||/ |\//// \\\\/| \||/
| | | |
|---| |---|
|---| |---|
| | | |
|___| |___|
/ \ / \
|_____| |_____|
|HHHHH| |HHHHH|
RiBot is a simple Slack bot that answers your questions about the Ruby Core/Stdlib documentation.
RiBot uses the ri CLI tool to provide documentation.
1. Create a new bot user in your Slack account:
- Visit https://my.slack.com/apps/new/A0F7YS25R-bots
- Choose a username for your bot, e.g:
ribot
- Take note of the API Token for this bot
- Click the Save Integration button
2. Clone this repository:
$ git clone https://github.com/tbalthazar/ribot.git
3. Change directory to ribot
and run the setup script:
It will install the ri
documentation for all your installed gems, it might take a while.
$ cd ribot
$ script/setup
4. Run the ribot client:
$ TOKEN=your-slack-api-token script/run
5. Open Slack and type the following command:
/msg @ribot help
In the channels where the bot has been invited, type one of the following commands:
ri Array#sort
@ribot Array#sort
Or send the bot a direct message:/msg @ribot Array#sort
To invite the bot to a channel, enter a channel and type:
/invite @ribot
The bot needs a Slack API Token to work properly.
The script/run
script will:
- look for a
TOKEN
environment variable - if not found, it will try to read the token from the
.token
file - if no
.token
file exists, it will prompt for the token
You can run the tests using:
$ script/test
Please see LICENSE for licensing details.