1
0
зеркало из https://github.com/glebtv/telegram-bot.git synced 2026-08-28 15:26:18 +03:00

Сравнить коммиты

..

2 Коммитов

Автор SHA1 Сообщение Дата
Max Melentiev
d1d15d9910 v0.7.1 2016-05-31 10:56:30 +03:00
Max Melentiev
e557a217eb Bot API 2.1 2016-05-31 10:53:38 +03:00
5 изменённых файлов: 7 добавлений и 26 удалений

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

@@ -1,8 +1,4 @@
# 0.7.3
- Fixed issues with poller in production (#3)
# 0.7.2
# 0.7.1
- Bot API 2.1
- Fixed possible crashes when payload type is not supported.

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

@@ -1,14 +1,9 @@
namespace :telegram do
namespace :bot do
desc 'Run poller. It broadcasts Rails.logger to STDOUT in dev like `rails s` do. ' \
'Use LOG_TO_STDOUT to enable/disable broadcasting.'
task :poller do
ENV['BOT_POLLER_MODE'] = 'true'
Rake::Task['environment'].invoke
if ENV.fetch('LOG_TO_STDOUT') { Rails.env.development? }.present?
console = ActiveSupport::Logger.new(STDERR)
Rails.logger.extend ActiveSupport::Logger.broadcast console
end
desc 'Run poller'
task poller: :environment do
console = ActiveSupport::Logger.new(STDERR)
Rails.logger.extend ActiveSupport::Logger.broadcast console
Telegram::Bot::UpdatesPoller.start(ENV['BOT'].try!(:to_sym) || :default)
end

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

@@ -71,16 +71,11 @@ module Telegram
answerCallbackQuery
answerInlineQuery
forwardMessage
getChat
getChatAdministrators
getChatMember
getChatMembersCount
getFile
getMe
getUpdates
getUserProfilePhotos
kickChatMember
leaveChat
sendAudio
sendChatAction
sendContact

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

@@ -14,14 +14,9 @@ module Telegram
# It just tells routes helpers whether to add routed bots to
# Bot::UpdatesPoller, so their config will be available by bot key in
# Bot::UpdatesPoller.start.
#
# It's enabled by default in Rails dev environment and `rake telegram:bot:poller`
# task. Use `BOT_POLLER_MODE=true` envvar to set it manually.
def bot_poller_mode?
return @bot_poller_mode if defined?(@bot_poller_mode)
@bot_poller_mode = ENV.fetch('BOT_POLLER_MODE') do
Rails.env.development? if defined?(Rails)
end
Rails.env.development? if defined?(Rails)
end
# Hash of bots made with bots_config.

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

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