telegram-bot-ruby 0.23.0 → 1.0.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (144) hide show
  1. checksums.yaml +4 -4
  2. data/.env.sample +2 -0
  3. data/.gitignore +1 -0
  4. data/.rubocop.yml +2 -1
  5. data/README.md +25 -13
  6. data/Rakefile +43 -0
  7. data/lib/telegram/bot/api.rb +3 -1
  8. data/lib/telegram/bot/types/animation.rb +9 -9
  9. data/lib/telegram/bot/types/audio.rb +9 -9
  10. data/lib/telegram/bot/types/base.rb +3 -2
  11. data/lib/telegram/bot/types/bot_command.rb +2 -2
  12. data/lib/telegram/bot/types/bot_command_scope_all_chat_administrators.rb +1 -1
  13. data/lib/telegram/bot/types/bot_command_scope_all_group_chats.rb +1 -1
  14. data/lib/telegram/bot/types/bot_command_scope_all_private_chats.rb +1 -1
  15. data/lib/telegram/bot/types/bot_command_scope_chat.rb +2 -2
  16. data/lib/telegram/bot/types/bot_command_scope_chat_administrators.rb +2 -2
  17. data/lib/telegram/bot/types/bot_command_scope_chat_member.rb +3 -3
  18. data/lib/telegram/bot/types/bot_command_scope_default.rb +1 -1
  19. data/lib/telegram/bot/types/callback_query.rb +6 -6
  20. data/lib/telegram/bot/types/chat.rb +29 -28
  21. data/lib/telegram/bot/types/chat_administrator_rights.rb +13 -12
  22. data/lib/telegram/bot/types/chat_invite_link.rb +8 -8
  23. data/lib/telegram/bot/types/chat_join_request.rb +3 -3
  24. data/lib/telegram/bot/types/chat_location.rb +1 -1
  25. data/lib/telegram/bot/types/chat_member.rb +0 -22
  26. data/lib/telegram/bot/types/chat_member_administrator.rb +26 -0
  27. data/lib/telegram/bot/types/chat_member_banned.rb +13 -0
  28. data/lib/telegram/bot/types/chat_member_left.rb +12 -0
  29. data/lib/telegram/bot/types/chat_member_member.rb +12 -0
  30. data/lib/telegram/bot/types/chat_member_owner.rb +14 -0
  31. data/lib/telegram/bot/types/chat_member_restricted.rb +23 -0
  32. data/lib/telegram/bot/types/chat_member_updated.rb +2 -2
  33. data/lib/telegram/bot/types/chat_permissions.rb +9 -8
  34. data/lib/telegram/bot/types/chat_photo.rb +4 -4
  35. data/lib/telegram/bot/types/chosen_inline_result.rb +4 -4
  36. data/lib/telegram/bot/types/contact.rb +5 -5
  37. data/lib/telegram/bot/types/dice.rb +2 -2
  38. data/lib/telegram/bot/types/document.rb +6 -6
  39. data/lib/telegram/bot/types/encrypted_credentials.rb +3 -3
  40. data/lib/telegram/bot/types/encrypted_passport_element.rb +10 -10
  41. data/lib/telegram/bot/types/file.rb +4 -4
  42. data/lib/telegram/bot/types/force_reply.rb +3 -3
  43. data/lib/telegram/bot/types/forum_topic.rb +14 -0
  44. data/lib/telegram/bot/types/forum_topic_closed.rb +10 -0
  45. data/lib/telegram/bot/types/forum_topic_created.rb +13 -0
  46. data/lib/telegram/bot/types/forum_topic_edited.rb +12 -0
  47. data/lib/telegram/bot/types/forum_topic_reopened.rb +10 -0
  48. data/lib/telegram/bot/types/game.rb +6 -6
  49. data/lib/telegram/bot/types/game_high_score.rb +2 -2
  50. data/lib/telegram/bot/types/general_forum_topic_hidden.rb +10 -0
  51. data/lib/telegram/bot/types/general_forum_topic_unhidden.rb +10 -0
  52. data/lib/telegram/bot/types/inline_keyboard_button.rb +9 -9
  53. data/lib/telegram/bot/types/inline_keyboard_markup.rb +1 -1
  54. data/lib/telegram/bot/types/inline_query.rb +5 -5
  55. data/lib/telegram/bot/types/inline_query_result_article.rb +10 -10
  56. data/lib/telegram/bot/types/inline_query_result_audio.rb +11 -10
  57. data/lib/telegram/bot/types/inline_query_result_cached_audio.rb +8 -7
  58. data/lib/telegram/bot/types/inline_query_result_cached_document.rb +10 -9
  59. data/lib/telegram/bot/types/inline_query_result_cached_gif.rb +9 -8
  60. data/lib/telegram/bot/types/inline_query_result_cached_mpeg4_gif.rb +9 -8
  61. data/lib/telegram/bot/types/inline_query_result_cached_photo.rb +10 -9
  62. data/lib/telegram/bot/types/inline_query_result_cached_sticker.rb +5 -5
  63. data/lib/telegram/bot/types/inline_query_result_cached_video.rb +10 -9
  64. data/lib/telegram/bot/types/inline_query_result_cached_voice.rb +9 -8
  65. data/lib/telegram/bot/types/inline_query_result_contact.rb +11 -11
  66. data/lib/telegram/bot/types/inline_query_result_document.rb +14 -13
  67. data/lib/telegram/bot/types/inline_query_result_game.rb +4 -4
  68. data/lib/telegram/bot/types/inline_query_result_gif.rb +14 -12
  69. data/lib/telegram/bot/types/inline_query_result_location.rb +14 -14
  70. data/lib/telegram/bot/types/inline_query_result_mpeg4_gif.rb +14 -13
  71. data/lib/telegram/bot/types/inline_query_result_photo.rb +13 -12
  72. data/lib/telegram/bot/types/inline_query_result_venue.rb +15 -15
  73. data/lib/telegram/bot/types/inline_query_result_video.rb +15 -14
  74. data/lib/telegram/bot/types/inline_query_result_voice.rb +10 -9
  75. data/lib/telegram/bot/types/input_contact_message_content.rb +4 -4
  76. data/lib/telegram/bot/types/input_invoice_message_content.rb +20 -20
  77. data/lib/telegram/bot/types/input_location_message_content.rb +6 -6
  78. data/lib/telegram/bot/types/input_media_animation.rb +10 -8
  79. data/lib/telegram/bot/types/input_media_audio.rb +9 -8
  80. data/lib/telegram/bot/types/input_media_document.rb +7 -7
  81. data/lib/telegram/bot/types/input_media_photo.rb +6 -4
  82. data/lib/telegram/bot/types/input_media_video.rb +11 -8
  83. data/lib/telegram/bot/types/input_text_message_content.rb +4 -3
  84. data/lib/telegram/bot/types/input_venue_message_content.rb +8 -8
  85. data/lib/telegram/bot/types/invoice.rb +5 -5
  86. data/lib/telegram/bot/types/keyboard_button.rb +5 -5
  87. data/lib/telegram/bot/types/keyboard_button_poll_type.rb +1 -1
  88. data/lib/telegram/bot/types/labeled_price.rb +2 -2
  89. data/lib/telegram/bot/types/location.rb +6 -6
  90. data/lib/telegram/bot/types/login_url.rb +4 -4
  91. data/lib/telegram/bot/types/mask_position.rb +4 -4
  92. data/lib/telegram/bot/types/menu_button_commands.rb +1 -1
  93. data/lib/telegram/bot/types/menu_button_default.rb +1 -1
  94. data/lib/telegram/bot/types/menu_button_web_app.rb +2 -2
  95. data/lib/telegram/bot/types/message.rb +68 -58
  96. data/lib/telegram/bot/types/message_auto_delete_timer_changed.rb +1 -1
  97. data/lib/telegram/bot/types/message_entity.rb +7 -7
  98. data/lib/telegram/bot/types/order_info.rb +4 -4
  99. data/lib/telegram/bot/types/passport_data.rb +1 -1
  100. data/lib/telegram/bot/types/passport_element_error_data_field.rb +5 -5
  101. data/lib/telegram/bot/types/passport_element_error_file.rb +4 -4
  102. data/lib/telegram/bot/types/passport_element_error_files.rb +4 -4
  103. data/lib/telegram/bot/types/passport_element_error_front_side.rb +4 -4
  104. data/lib/telegram/bot/types/passport_element_error_reverse_side.rb +4 -4
  105. data/lib/telegram/bot/types/passport_element_error_selfie.rb +4 -4
  106. data/lib/telegram/bot/types/passport_element_error_translation_file.rb +4 -4
  107. data/lib/telegram/bot/types/passport_element_error_translation_files.rb +4 -4
  108. data/lib/telegram/bot/types/passport_element_error_unspecified.rb +4 -4
  109. data/lib/telegram/bot/types/passport_file.rb +4 -4
  110. data/lib/telegram/bot/types/photo_size.rb +5 -5
  111. data/lib/telegram/bot/types/poll.rb +13 -13
  112. data/lib/telegram/bot/types/poll_answer.rb +2 -2
  113. data/lib/telegram/bot/types/poll_option.rb +2 -2
  114. data/lib/telegram/bot/types/pre_checkout_query.rb +6 -6
  115. data/lib/telegram/bot/types/proximity_alert_triggered.rb +1 -1
  116. data/lib/telegram/bot/types/reply_keyboard_markup.rb +6 -5
  117. data/lib/telegram/bot/types/reply_keyboard_remove.rb +2 -2
  118. data/lib/telegram/bot/types/sent_web_app_message.rb +1 -1
  119. data/lib/telegram/bot/types/shipping_address.rb +6 -6
  120. data/lib/telegram/bot/types/shipping_option.rb +3 -3
  121. data/lib/telegram/bot/types/shipping_query.rb +2 -2
  122. data/lib/telegram/bot/types/sticker.rb +14 -14
  123. data/lib/telegram/bot/types/sticker_set.rb +7 -8
  124. data/lib/telegram/bot/types/successful_payment.rb +7 -7
  125. data/lib/telegram/bot/types/update.rb +15 -15
  126. data/lib/telegram/bot/types/user.rb +11 -11
  127. data/lib/telegram/bot/types/user_profile_photos.rb +2 -2
  128. data/lib/telegram/bot/types/venue.rb +6 -6
  129. data/lib/telegram/bot/types/video.rb +9 -9
  130. data/lib/telegram/bot/types/video_chat_ended.rb +1 -1
  131. data/lib/telegram/bot/types/video_chat_participants_invited.rb +1 -1
  132. data/lib/telegram/bot/types/video_chat_scheduled.rb +1 -1
  133. data/lib/telegram/bot/types/video_note.rb +6 -6
  134. data/lib/telegram/bot/types/voice.rb +5 -5
  135. data/lib/telegram/bot/types/web_app_data.rb +2 -2
  136. data/lib/telegram/bot/types/web_app_info.rb +1 -1
  137. data/lib/telegram/bot/types/webhook_info.rb +9 -9
  138. data/lib/telegram/bot/types/write_access_allowed.rb +10 -0
  139. data/lib/telegram/bot/types.rb +7 -124
  140. data/lib/telegram/bot/version.rb +1 -1
  141. data/lib/telegram/bot.rb +7 -9
  142. data/telegram-bot-ruby.gemspec +4 -2
  143. metadata +56 -14
  144. data/lib/telegram/bot/exceptions.rb +0 -4
metadata CHANGED
@@ -1,29 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: telegram-bot-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.23.0
4
+ version: 1.0.0.rc1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexander Tipugin
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-11-29 00:00:00.000000000 Z
11
+ date: 2023-01-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: dry-inflector
14
+ name: dry-struct
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">="
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '0'
19
+ version: '1.6'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ">="
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '0'
26
+ version: '1.6'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: faraday
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -53,19 +53,47 @@ dependencies:
53
53
  - !ruby/object:Gem::Version
54
54
  version: '1.0'
55
55
  - !ruby/object:Gem::Dependency
56
- name: virtus
56
+ name: zeitwerk
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '2.0'
61
+ version: '2.6'
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: '2.0'
68
+ version: '2.6'
69
+ - !ruby/object:Gem::Dependency
70
+ name: dotenv
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: '2.8'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: '2.8'
83
+ - !ruby/object:Gem::Dependency
84
+ name: nokogiri
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: '1.13'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - "~>"
95
+ - !ruby/object:Gem::Version
96
+ version: '1.13'
69
97
  - !ruby/object:Gem::Dependency
70
98
  name: pry
71
99
  requirement: !ruby/object:Gem::Requirement
@@ -157,6 +185,7 @@ executables: []
157
185
  extensions: []
158
186
  extra_rdoc_files: []
159
187
  files:
188
+ - ".env.sample"
160
189
  - ".github/workflows/ci.yml"
161
190
  - ".gitignore"
162
191
  - ".rspec"
@@ -173,7 +202,6 @@ files:
173
202
  - lib/telegram/bot/api.rb
174
203
  - lib/telegram/bot/client.rb
175
204
  - lib/telegram/bot/configuration.rb
176
- - lib/telegram/bot/exceptions.rb
177
205
  - lib/telegram/bot/exceptions/base.rb
178
206
  - lib/telegram/bot/exceptions/response_error.rb
179
207
  - lib/telegram/bot/null_logger.rb
@@ -197,6 +225,12 @@ files:
197
225
  - lib/telegram/bot/types/chat_join_request.rb
198
226
  - lib/telegram/bot/types/chat_location.rb
199
227
  - lib/telegram/bot/types/chat_member.rb
228
+ - lib/telegram/bot/types/chat_member_administrator.rb
229
+ - lib/telegram/bot/types/chat_member_banned.rb
230
+ - lib/telegram/bot/types/chat_member_left.rb
231
+ - lib/telegram/bot/types/chat_member_member.rb
232
+ - lib/telegram/bot/types/chat_member_owner.rb
233
+ - lib/telegram/bot/types/chat_member_restricted.rb
200
234
  - lib/telegram/bot/types/chat_member_updated.rb
201
235
  - lib/telegram/bot/types/chat_permissions.rb
202
236
  - lib/telegram/bot/types/chat_photo.rb
@@ -209,8 +243,15 @@ files:
209
243
  - lib/telegram/bot/types/encrypted_passport_element.rb
210
244
  - lib/telegram/bot/types/file.rb
211
245
  - lib/telegram/bot/types/force_reply.rb
246
+ - lib/telegram/bot/types/forum_topic.rb
247
+ - lib/telegram/bot/types/forum_topic_closed.rb
248
+ - lib/telegram/bot/types/forum_topic_created.rb
249
+ - lib/telegram/bot/types/forum_topic_edited.rb
250
+ - lib/telegram/bot/types/forum_topic_reopened.rb
212
251
  - lib/telegram/bot/types/game.rb
213
252
  - lib/telegram/bot/types/game_high_score.rb
253
+ - lib/telegram/bot/types/general_forum_topic_hidden.rb
254
+ - lib/telegram/bot/types/general_forum_topic_unhidden.rb
214
255
  - lib/telegram/bot/types/inline_keyboard_button.rb
215
256
  - lib/telegram/bot/types/inline_keyboard_markup.rb
216
257
  - lib/telegram/bot/types/inline_query.rb
@@ -300,6 +341,7 @@ files:
300
341
  - lib/telegram/bot/types/web_app_data.rb
301
342
  - lib/telegram/bot/types/web_app_info.rb
302
343
  - lib/telegram/bot/types/webhook_info.rb
344
+ - lib/telegram/bot/types/write_access_allowed.rb
303
345
  - lib/telegram/bot/version.rb
304
346
  - telegram-bot-ruby.gemspec
305
347
  homepage: https://github.com/atipugin/telegram-bot
@@ -317,11 +359,11 @@ required_ruby_version: !ruby/object:Gem::Requirement
317
359
  version: '2.7'
318
360
  required_rubygems_version: !ruby/object:Gem::Requirement
319
361
  requirements:
320
- - - ">="
362
+ - - ">"
321
363
  - !ruby/object:Gem::Version
322
- version: '0'
364
+ version: 1.3.1
323
365
  requirements: []
324
- rubygems_version: 3.3.7
366
+ rubygems_version: 3.4.1
325
367
  signing_key:
326
368
  specification_version: 4
327
369
  summary: Ruby wrapper for Telegram's Bot API
@@ -1,4 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'telegram/bot/exceptions/base'
4
- require 'telegram/bot/exceptions/response_error'