1
0
зеркало из https://github.com/glebtv/telegram-bot.git synced 2026-08-28 15:26:18 +03:00

Support for :credentials on Rails v5.2.x. (#60)

Этот коммит содержится в:
Yuri S
2018-01-17 12:40:24 +05:00
коммит произвёл printercu
родитель 5407c5028f
Коммит 66991d3653
8 изменённых файлов: 41 добавлений и 6 удалений

Просмотреть файл

@@ -15,14 +15,21 @@ class TestApplication < Rails::Application
config.eager_load = false
config.log_level = :debug
config.action_dispatch.show_exceptions = false
secrets[:secret_key_base] = 'test'
secrets[:telegram] = {
telegram_config = {
bot: 'default_token',
bots: {
other: {token: 'other_token'},
named: {token: 'named_token', username: 'TestBot'},
},
}
if Rails.application.respond_to?(:credentials)
Rails.application.credentials.config[:telegram] = telegram_config
else
secrets[:secret_key_base] = 'test'
secrets[:telegram] = telegram_config
end
end
Rails.application.initialize!