README.md in slack-ruby-bot-server-0.3.1 vs README.md in slack-ruby-bot-server-0.4.0
- old
+ new
@@ -11,11 +11,11 @@
A library that contains a [Grape](http://github.com/ruby-grape/grape) API serving a [Slack Ruby Bot](https://github.com/dblock/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/dblock/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.3.1. 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.4.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_.
@@ -74,19 +74,19 @@
You can introduce custom behavior into the service lifecycle via callbacks. This can be useful when new team has been registered via the API or a team has been deactivated from Slack.
```ruby
instance = SlackRubyBotServer::Service.instance
-instance.on :created do |team, server, error|
+instance.on :created do |team, error|
# a new team has been registered
end
-instance.on :deactivated do |team, server, error|
+instance.on :deactivated do |team, error|
# an existing team has been deactivated in Slack
end
-instance.on :error do |team, server, error|
+instance.on :error do |team, error|
# an error has occurred
end
```
The following callbacks are supported. All callbacks receive a `team`, except `error`, which receives a `StandardError` object.
@@ -102,11 +102,9 @@
| stopped | the service has disconnected a team from Slack |
| starting | the service is (re)connecting a team to Slack |
| started | the service has (re)connected a team to Slack |
| deactivating | a team is being deactivated |
| deactivated | a team has been deactivated |
-| resetting | the service is resetting, all teams being stopped |
-| reset | the service has been reset, all teams have been stopped |
#### Server Class
You can override the server class to handle additional events, and configure the service to use it.