Skip to content

Commit

Permalink
Fix poller rake task for Rails 8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
printercu committed Jan 3, 2025
1 parent 814c4e7 commit 7c30022
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Unreleased

# 0.16.6

- Fix poller rake task for Rails 8.0

# 0.16.5

- Rails 8.0 support
Expand Down
3 changes: 3 additions & 0 deletions lib/tasks/telegram-bot.rake
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ namespace :telegram do
Rails.logger.extend ActiveSupport::Logger.broadcast console
end
end
# Routes are not loaded by default in Rails >= 8.0.
# Load them explicitly to identify a controller for a bot.
Rails.application.try(:reload_routes_unless_loaded)
Telegram::Bot::UpdatesPoller.start(ENV['BOT']&.to_sym || :default)
end

Expand Down
2 changes: 1 addition & 1 deletion lib/telegram/bot/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

module Telegram
module Bot
VERSION = '0.16.5'
VERSION = '0.16.6'

def self.gem_version
Gem::Version.new VERSION
Expand Down

0 comments on commit 7c30022

Please sign in to comment.