Machinery.bot

The Machinery.bot for Campfire.

Author

Michael van Rooijen at Machinery ( meskyanichi )

Installation

Preparing a Machinery.bot application:

mkdir Machinery.bot
cd Machinery.bot
git init
bundle init
echo "app: bundle exec mbot" > Procfile

Finishing up the Gemfile:

source "http://rubygems.org"

gem "mbot",
  :git => "git://github.com/machinery/mbot.git"

group :services do
  gem "mbot-service-google-images",
    :git => "git://github.com/machinery/mbot-service-google-images.git"
end

Resolving dependencies:

bundle install

Committing:

git add .
git commit -m "Built the Machinery.bot."

Deployment (Heroku, Free)

Use Heroku to deploy your Machinery.bot. It's dead simple and free:

heroku create
git push heroku master

Add environment variables:

heroku config:add      \
  TOKEN="yourtoken"    \
  SUBDOMAIN="example"  \
  ROOMS="38912, 44821"

Boot the bot:

heroku ps:scale app=1

When Machinery.bot enters the Campfire Room:

mbot image winning

Documentation

Machinery.bot is documented using YARD. See documentation/api.

Service development

Teaching Machinery.bot new things is done through Services. It's very simple. Check out our Machinery.bot Template Service.

Fork it, rm -rf .git it, git init it. Modify it. git add and git commit it. Use it.

Machinery.bot Development

Install dependencies:

bundle

Run Guard:

bundle exec guard