Ruboty Build Status Code Climate Code Climate

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.

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

Ruboty has global environment configuration like Rails.env. You can specify Ruboty environment via environment variables:

RUBOTY_ENV=production bundle exec ruboty

Ruboty only loads dependent gems group by current environment.

# Gemfile
group :development do
  gem "ruboty" # For development shell console
end

group :production do
  gem "ruboty-slack" # For production adapter
end

The default Ruboty environment is development.

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

Screenshot