README.md in slack-ruby-bot-server-0.5.0 vs README.md in slack-ruby-bot-server-0.6.0

- old
+ new

@@ -11,26 +11,53 @@ A library that contains a [Grape](http://github.com/ruby-grape/grape) API serving a [Slack Ruby Bot](https://github.com/slack-ruby/slack-ruby-bot) to multiple teams. This gem combines a web server, a RESTful API and multiple instances of [slack-ruby-bot](https://github.com/slack-ruby/slack-ruby-bot). It integrates with the [Slack Platform API](https://medium.com/slack-developer-blog/launch-platform-114754258b91#.od3y71dyo). Your customers can use a Slack button to install the bot. ### Stable Release -You're reading the documentation for the **stable** release of slack-ruby-bot-server, 0.5.0. See [UPGRADING](UPGRADING.md) when upgrading from an older version. +You're reading the documentation for the **stable** release of slack-ruby-bot-server, 0.6.0. See [UPGRADING](UPGRADING.md) when upgrading from an older version. ### Try Me -A demo version of the [sample app](sample_app) is running on Heroku at [slack-ruby-bot-server.herokuapp.com](https://slack-ruby-bot-server.herokuapp.com). Use the _Add to Slack_ button. The bot will join your team as _@slackbotserver_. +A demo version of the [sample app with mongoid](sample_apps/sample_app_mongoid) is running on Heroku at [slack-ruby-bot-server.herokuapp.com](https://slack-ruby-bot-server.herokuapp.com). Use the _Add to Slack_ button. The bot will join your team as _@slackbotserver_. ![](images/slackbutton.gif) Once a bot is registered, you can invite to a channel with `/invite @slackbotserver` interact with it. DM "hi" to it, or say "@slackbotserver hi". ![](images/slackbotserver.gif) ### Run Your Own -You can use the [sample application](sample_app) to bootstrap your project and start adding slack command handlers on top of this code. +You can use one of the [sample applications](sample_apps) to bootstrap your project and start adding slack command handlers on top of this code. A database is required to store teams. -Install [MongoDB](https://www.mongodb.org/downloads), required to store teams. We would like your help with [supporting other databases](https://github.com/slack-ruby/slack-ruby-bot-server/issues/12). +### MongoDB + +Use MongoDB with [Mongoid](https://github.com/mongodb/mongoid) as ODM. Configure the database connection in `mongoid.yml`. Add the `mongoid` gem in your Gemfile. + +``` +gem 'mongoid' +gem 'kaminari-mongoid' +gem 'mongoid-scroll' +gem 'slack-ruby-bot-server' +``` + +See the [sample app using Mongoid](sample_apps/sample_app_mongoid) for more information. + +### ActiveRecord + +Use ActiveRecord with, for example, PostgreSQL via [pg](https://github.com/ged/ruby-pg). Configure the database connection in `postgresql.yml`. Add the `activerecord`, `pg`, `otr-activerecord` and `cursor_pagination` gems to your Gemfile. + +``` +gem 'pg' +gem 'activerecord', require: 'active_record' +gem 'slack-ruby-bot-server' +gem 'otr-activerecord' +gem 'cursor_pagination' +``` + +See the [sample app using ActiveRecord](sample_apps/sample_app_activerecord) for more information. + +### Usage [Create a New Application](https://api.slack.com/applications/new) on Slack. ![](images/new.png)