Skip to content

Commit 42b98db

Browse files
authored
Update rails (#251)
* Rails 8.0 support * Update to Bot API 8.0
1 parent 225e02a commit 42b98db

File tree

9 files changed

+43
-5
lines changed

9 files changed

+43
-5
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ jobs:
2626
- gemfiles/rails_51.gemfile
2727
include:
2828
# ruby 3.x
29+
- ruby: '3.2'
30+
gemfile: gemfiles/rails_80.gemfile
2931
- ruby: '3.2'
3032
gemfile: gemfiles/rails_72.gemfile
3133
- ruby: '3.2'

Appraisals

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# frozen_string_literal: true
22

3+
appraise 'rails-80' do
4+
gem 'actionpack', '~> 8.0.0'
5+
gem 'railties', '~> 8.0.0'
6+
end
7+
38
appraise 'rails-72' do
49
gem 'actionpack', '~> 7.2.0'
510
gem 'railties', '~> 7.2.0'

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Unreleased
22

3+
- Rails 8.0 support
4+
- Update to Bot API 8.0
5+
36
# 0.16.4
47

58
- Rails 7.2 support

gemfiles/rails_80.gemfile

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# This file was generated by Appraisal
2+
3+
source "https://rubygems.org"
4+
5+
gem "actionpack", "~> 8.0.0"
6+
gem "railties", "~> 8.0.0"
7+
8+
group :development do
9+
gem "appraisal", "~> 2.2"
10+
gem "debug", "~> 1.9.2"
11+
gem "sdoc", "~> 2.0.3"
12+
gem "telegram-bot-types", "~> 0.6.3"
13+
gem "rspec", "~> 3.12.0"
14+
gem "rspec-its", "~> 1.3.0"
15+
gem "rspec-rails", "~> 4.0.2"
16+
gem "rubocop", "~> 1.59.0"
17+
gem "rubocop-rails", "~> 2.23.1"
18+
gem "coveralls", "~> 0.8.23", require: false
19+
end
20+
21+
gemspec path: "../"

lib/telegram/bot/client/api_methods.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Generated with bin/fetch-telegram-methods
2-
# Bot API 7.9
2+
# Bot API 8.0
33

44
getUpdates
55
setWebhook
@@ -31,6 +31,7 @@ sendDice
3131
sendChatAction
3232
setMessageReaction
3333
getUserProfilePhotos
34+
setUserEmojiStatus
3435
getFile
3536
banChatMember
3637
unbanChatMember
@@ -118,16 +119,20 @@ setStickerSetTitle
118119
setStickerSetThumbnail
119120
setCustomEmojiStickerSetThumbnail
120121
deleteStickerSet
122+
getAvailableGifts
123+
sendGift
121124

122125
answerInlineQuery
123126
answerWebAppQuery
127+
savePreparedInlineMessage
124128

125129
sendInvoice
126130
createInvoiceLink
127131
answerShippingQuery
128132
answerPreCheckoutQuery
129133
getStarTransactions
130134
refundStarPayment
135+
editUserStarSubscription
131136

132137
setPassportDataErrors
133138

lib/telegram/bot/updates_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,14 +105,14 @@ class UpdatesController < AbstractController::Base # rubocop:disable Metrics/Cla
105105
callback_query
106106
shipping_query
107107
pre_checkout_query
108+
purchased_paid_media
108109
poll
109110
poll_answer
110111
my_chat_member
111112
chat_member
112113
chat_join_request
113114
chat_boost
114115
removed_chat_boost
115-
pre_checkout_query
116116
].freeze)
117117

118118
class << self

spec/integration_helper.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
class TestApplication < Rails::Application
1616
config.eager_load = false
1717
config.log_level = :debug
18-
if ActionPack::VERSION::MAJOR >= 7 && ActionPack::VERSION::MINOR >= 2
18+
if (ActionPack::VERSION::MAJOR >= 8) ||
19+
(ActionPack::VERSION::MAJOR == 7 && ActionPack::VERSION::MINOR >= 2)
1920
config.action_dispatch.show_exceptions = :none
2021
else
2122
config.action_dispatch.show_exceptions = false

spec/telegram/bot/updates_controller/typed_update_spec.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
message_reaction_count
2929
chat_boost
3030
removed_chat_boost
31+
purchased_paid_media
3132
pre_checkout_query
3233
]).
3334
map { |x| [x, Telegram::Bot::Types.const_get(x.camelize)] }.to_h.

telegram-bot.gemspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ Gem::Specification.new do |spec|
2525

2626
spec.required_ruby_version = '>= 2.4'
2727

28-
spec.add_dependency 'actionpack', '>= 4.0', '< 7.3'
29-
spec.add_dependency 'activesupport', '>= 4.0', '< 7.3'
28+
spec.add_dependency 'actionpack', '>= 4.0', '< 8.1'
29+
spec.add_dependency 'activesupport', '>= 4.0', '< 8.1'
3030
spec.add_dependency 'httpclient', '~> 2.7'
3131

3232
spec.add_development_dependency 'bundler', '> 1.16'

0 commit comments

Comments
 (0)