README.md in slack-ruby-bot-server-2.1.0 vs README.md in slack-ruby-bot-server-2.1.1
- old
+ new
@@ -38,11 +38,11 @@
A library that contains a web server and a RESTful [Grape](http://github.com/ruby-grape/grape) API serving a Slack bot to multiple teams. Use in conjunction with [slack-ruby-bot-server-events](https://github.com/slack-ruby/slack-ruby-bot-server-events) to build a complete Slack bot service, or [slack-ruby-bot-server-rtm](https://github.com/slack-ruby/slack-ruby-bot-server-rtm) to build a (legacy) Classic RealTime Slack bot. 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, 2.1.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, 2.1.1. See [UPGRADING](UPGRADING.md) when upgrading from an older version. See [MIGRATING](MIGRATING.md) for help with migrating Legacy Slack Apps to Granular Scopes.
## Make Your Own
This library alone will only register a new bot, but will not include any bot functionality. To make something useful, we recommend you get started from either [slack-ruby-bot-server-events-app-mentions-sample](https://github.com/slack-ruby/slack-ruby-bot-server-events-app-mentions-sample) (handles a single kind of event), or [slack-ruby-bot-server-events-sample](https://github.com/slack-ruby/slack-ruby-bot-server-events-sample) (handles all kinds of events) to bootstrap your project.
@@ -99,16 +99,16 @@
```
Establish a connection in your startup code.
```ruby
-ActiveRecord::Base.establish_connection(
- YAML.safe_load(
- ERB.new(
- File.read('config/postgresql.yml')
- ).result, [], [], true
- )[ENV['RACK_ENV']]
-)
+yml = ERB.new(File.read(File.expand_path('config/postgresql.yml', __dir__))).result
+db_config = if Gem::Version.new(Psych::VERSION) >= Gem::Version.new('3.1.0.pre1')
+ ::YAML.safe_load(yml, aliases: true)[ENV['RACK_ENV']]
+ else
+ ::YAML.safe_load(yml, [], [], true)[ENV['RACK_ENV']]
+ end
+ActiveRecord::Base.establish_connection(db_config)
```
### OAuth Version and Scopes
Configure your app's [OAuth version](https://api.slack.com/authentication/oauth-v2) and [scopes](https://api.slack.com/legacy/oauth-scopes) as needed by your application.