Ruboty
Ruby + Bot = Ruboty.
Dependencies
- Ruby 1.9.3+
Adapter
Adapter hooks up your robot to chat services.
Brain
Brain persists your robot's memory.
Handler
Handler provides various behaviors to your robot.
- ruboty-alias
- ruboty-cron
- ruboty-github
- ruboty-google_image
- ruboty-japan_weather
- ruboty-lgtm
- ruboty-syoboi_calendar
Configuration
Store configuration value in envorinment variables.
They are easy to change between deploys without changing any code.
We recommend to put .env
and run with ruboty --dotenv
option to manage them.
All you need to use your favorite plugins is to write their names into Gemfile. Ruboty will load them before running.
# Gemfile
gem "ruboty-cron"
gem "ruboty-google_image"
gem "ruboty-redis"
gem "ruboty-slack"
Environment
You can change loaded gems via RUBOTY_ENV
(default: development).
RUBOTY_ENV=production bundle exec ruboty
# Use ruboty-cron in any env
gem "ruboty-cron"
# Use HipChat in development env
group :development do
gem "ruboty-hipchat"
end
# Use Slack in production env
group :production do
gem "ruboty-slack"
end
Deploy
Here is the smallest example to deploy a simple chatterbot to Heroku.
$ echo 'source "https://rubygems.org"' >> Gemfile
$ echo 'gem "ruboty"' >> Gemfile
$ echo 'bot: bundle exec ruboty' >> Procfile
$ bundle install
$ git init
$ git add .
$ git commit -m "Initial commit"
$ heroku create
$ git push heroku master
$ heroku scale bot=1