1
0
зеркало из https://github.com/glebtv/telegram-bot.git synced 2026-09-07 11:25:52 +03:00
Этот коммит содержится в:
Max Melentiev
2021-06-25 19:31:28 +01:00
родитель af229c8bcc
Коммит a49ef51da9
6 изменённых файлов: 24 добавлений и 9 удалений

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

@@ -1,5 +1,9 @@
# Unreleased # Unreleased
# 0.15.4
- Update to Bot API 5.3
# 0.15.3 # 0.15.3
- Ruby 3.0 support: fix translation helpers. - Ruby 3.0 support: fix translation helpers.

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

@@ -8,7 +8,7 @@ group :development do
gem 'pry-byebug', '~> 3.9.0' gem 'pry-byebug', '~> 3.9.0'
gem 'sdoc', '~> 2.0.3' gem 'sdoc', '~> 2.0.3'
gem 'telegram-bot-types', '~> 0.6.2' gem 'telegram-bot-types', '~> 0.6.3'
gem 'rspec', '~> 3.10.0' gem 'rspec', '~> 3.10.0'
gem 'rspec-its', '~> 1.3.0' gem 'rspec-its', '~> 1.3.0'

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

@@ -1,5 +1,5 @@
# Generated with bin/fetch-telegram-methods # Generated with bin/fetch-telegram-methods
# Bot API 5.0 # Bot API 5.3
getUpdates getUpdates
setWebhook setWebhook
@@ -30,13 +30,16 @@ sendDice
sendChatAction sendChatAction
getUserProfilePhotos getUserProfilePhotos
getFile getFile
kickChatMember banChatMember
unbanChatMember unbanChatMember
restrictChatMember restrictChatMember
promoteChatMember promoteChatMember
setChatAdministratorCustomTitle setChatAdministratorCustomTitle
setChatPermissions setChatPermissions
exportChatInviteLink exportChatInviteLink
createChatInviteLink
editChatInviteLink
revokeChatInviteLink
setChatPhoto setChatPhoto
deleteChatPhoto deleteChatPhoto
setChatTitle setChatTitle
@@ -47,12 +50,13 @@ unpinAllChatMessages
leaveChat leaveChat
getChat getChat
getChatAdministrators getChatAdministrators
getChatMembersCount getChatMemberCount
getChatMember getChatMember
setChatStickerSet setChatStickerSet
deleteChatStickerSet deleteChatStickerSet
answerCallbackQuery answerCallbackQuery
setMyCommands setMyCommands
deleteMyCommands
getMyCommands getMyCommands
editMessageText editMessageText

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

@@ -99,6 +99,8 @@ module Telegram
pre_checkout_query pre_checkout_query
poll poll
poll_answer poll_answer
my_chat_member
chat_member
].freeze ].freeze
class << self class << self

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

@@ -1,6 +1,6 @@
module Telegram module Telegram
module Bot module Bot
VERSION = '0.15.3'.freeze VERSION = '0.15.4'.freeze
def self.gem_version def self.gem_version
Gem::Version.new VERSION Gem::Version.new VERSION

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

@@ -9,14 +9,19 @@ RSpec.describe Telegram::Bot::UpdatesController::TypedUpdate do
context 'when `update` is a virtus model' do context 'when `update` is a virtus model' do
subject { controller } subject { controller }
unique_types = Telegram::Bot::UpdatesController::PAYLOAD_TYPES - %w[ unique_types = (Telegram::Bot::UpdatesController::PAYLOAD_TYPES - %w[
edited_message edited_message
channel_post channel_post
edited_channel_post edited_channel_post
] my_chat_member
unique_types.each do |type| chat_member
]).
map { |x| [x, Telegram::Bot::Types.const_get(type.camelize)] }.to_h.
merge(
'chat_member' => Telegram::Bot::Types::ChatMemberUpdated
)
unique_types.each do |type, type_class|
context "with #{type}" do context "with #{type}" do
type_class = Telegram::Bot::Types.const_get(type.camelize)
let(:payload_type) { type } let(:payload_type) { type }
let(:payload) do let(:payload) do
{}.tap do |result| {}.tap do |result|