зеркало из
https://github.com/glebtv/telegram-bot.git
synced 2026-09-04 02:05:52 +03:00
Update rubopcop (#227)
* Update rubopcop [WIP] * Further rubocop fixes * Fix rubocop-rails cops * Fix spec * Disable rubocop suggestions * Run rubocop in github actions rather than in codeclimate
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
7bcb0caded
Коммит
57b17f068c
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
namespace :telegram do
|
||||
namespace :bot do
|
||||
desc 'Run poller. It broadcasts Rails.logger to STDOUT in dev like `rails s` do. ' \
|
||||
@@ -6,14 +8,14 @@ namespace :telegram do
|
||||
ENV['BOT_POLLER_MODE'] = 'true'
|
||||
Rake::Task['environment'].invoke
|
||||
if ENV.fetch('LOG_TO_STDOUT') { Rails.env.development? }.present?
|
||||
console = ActiveSupport::Logger.new(STDERR)
|
||||
if ::Rails.logger.respond_to?(:broadcast_to)
|
||||
::Rails.logger.broadcast_to(console)
|
||||
console = ActiveSupport::Logger.new($stderr)
|
||||
if Rails.logger.respond_to?(:broadcast_to)
|
||||
Rails.logger.broadcast_to(console)
|
||||
else
|
||||
Rails.logger.extend ActiveSupport::Logger.broadcast console
|
||||
end
|
||||
end
|
||||
Telegram::Bot::UpdatesPoller.start(ENV['BOT'].try!(:to_sym) || :default)
|
||||
Telegram::Bot::UpdatesPoller.start(ENV['BOT']&.to_sym || :default)
|
||||
end
|
||||
|
||||
desc 'Set webhook urls for all bots'
|
||||
|
||||
Ссылка в новой задаче
Block a user