diff --git a/CHANGELOG.md b/CHANGELOG.md index 5b9bc1d..59270b0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ - One more description for StaleChat error. - edit_message_* methods. +- Fix typo in module name: CallbackQueyContext -> CallbackQueryContext. # 0.8.0 diff --git a/README.md b/README.md index 0da5b0f..b0f64c1 100644 --- a/README.md +++ b/README.md @@ -245,7 +245,7 @@ class Telegram::WebhookController < Telegram::Bot::UpdatesController end ``` -You can use `CallbackQueyContext` in the similar way to split `#callback_query` into +You can use `CallbackQueryContext` in the similar way to split `#callback_query` into several specific methods. It doesn't require session support, and takes context from data. If data has a prefix with colon like this `my_ctx:smth...` it'll call `my_ctx_callback_query('smth...')` when there is such action method. Otherwise diff --git a/lib/telegram/bot/updates_controller.rb b/lib/telegram/bot/updates_controller.rb index e6709ec..9398076 100644 --- a/lib/telegram/bot/updates_controller.rb +++ b/lib/telegram/bot/updates_controller.rb @@ -57,7 +57,7 @@ module Telegram require 'telegram/bot/updates_controller/log_subscriber' require 'telegram/bot/updates_controller/instrumentation' require 'telegram/bot/updates_controller/reply_helpers' - autoload :CallbackQueyContext, 'telegram/bot/updates_controller/callback_query_context' + autoload :CallbackQueryContext, 'telegram/bot/updates_controller/callback_query_context' autoload :MessageContext, 'telegram/bot/updates_controller/message_context' autoload :Botan, 'telegram/bot/updates_controller/botan' diff --git a/lib/telegram/bot/updates_controller/callback_query_context.rb b/lib/telegram/bot/updates_controller/callback_query_context.rb index 2d4303c..5dde2f7 100644 --- a/lib/telegram/bot/updates_controller/callback_query_context.rb +++ b/lib/telegram/bot/updates_controller/callback_query_context.rb @@ -3,7 +3,7 @@ module Telegram class UpdatesController # Use separate actions for different callback queries. # It doesn't require session support. Simply add `%{context}:` prefix to data. - module CallbackQueyContext + module CallbackQueryContext protected # Uses #context_from_callback_query as context name. diff --git a/spec/telegram/bot/updates_controller/callback_query_context_spec.rb b/spec/telegram/bot/updates_controller/callback_query_context_spec.rb index c94433d..c4e5588 100644 --- a/spec/telegram/bot/updates_controller/callback_query_context_spec.rb +++ b/spec/telegram/bot/updates_controller/callback_query_context_spec.rb @@ -1,4 +1,4 @@ -RSpec.describe Telegram::Bot::UpdatesController::CallbackQueyContext do +RSpec.describe Telegram::Bot::UpdatesController::CallbackQueryContext do include_context 'telegram/bot/updates_controller' let(:controller_class) do described_class = self.described_class