зеркало из
https://github.com/glebtv/telegram-bot.git
synced 2026-08-28 15:26:18 +03:00
28
.travis.yml
28
.travis.yml
@@ -1,14 +1,28 @@
|
||||
language: ruby
|
||||
cache: bundler
|
||||
rvm:
|
||||
- 2.5
|
||||
- 2.4
|
||||
- 2.3
|
||||
- 2.5
|
||||
- 2.4
|
||||
gemfile:
|
||||
- gemfiles/rails_52.gemfile
|
||||
- gemfiles/rails_51.gemfile
|
||||
- gemfiles/rails_50.gemfile
|
||||
- gemfiles/rails_42.gemfile
|
||||
- gemfiles/rails_52.gemfile
|
||||
- gemfiles/rails_51.gemfile
|
||||
matrix:
|
||||
include:
|
||||
# old rails
|
||||
- rvm: 2.5
|
||||
gemfile: gemfiles/rails_50.gemfile
|
||||
- rvm: 2.5
|
||||
gemfile: gemfiles/rails_42.gemfile
|
||||
# old rubies
|
||||
- rvm: 2.3
|
||||
gemfile: gemfiles/rails_52.gemfile
|
||||
# future rails
|
||||
- rvm: 2.5
|
||||
gemfile: gemfiles/rails_60.gemfile
|
||||
# Allow rails 6 to fail while master branch is used
|
||||
allow_failures:
|
||||
- rvm: 2.5
|
||||
gemfile: gemfiles/rails_60.gemfile
|
||||
notifications:
|
||||
email: false
|
||||
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
appraise 'rails-60' do
|
||||
git 'https://github.com/rails/rails.git' do
|
||||
gem 'actionpack', '~> 6.0.0.alpha'
|
||||
gem 'railties', '~> 6.0.0.alpha'
|
||||
end
|
||||
end
|
||||
|
||||
appraise 'rails-52' do
|
||||
gem 'actionpack', '~> 5.2.0.beta2'
|
||||
gem 'railties', '~> 5.2.0.beta2'
|
||||
|
||||
23
gemfiles/rails_60.gemfile
Обычный файл
23
gemfiles/rails_60.gemfile
Обычный файл
@@ -0,0 +1,23 @@
|
||||
# This file was generated by Appraisal
|
||||
|
||||
source "https://rubygems.org"
|
||||
|
||||
git "https://github.com/rails/rails.git" do
|
||||
gem "actionpack", "~> 6.0.0.alpha"
|
||||
gem "railties", "~> 6.0.0.alpha"
|
||||
end
|
||||
|
||||
group :development do
|
||||
gem "appraisal", "~> 2.2"
|
||||
gem "pry", "~> 0.10.1"
|
||||
gem "pry-byebug", "~> 3.2.0"
|
||||
gem "sdoc", "~> 0.4.1"
|
||||
gem "telegram-bot-types", "~> 0.3.0"
|
||||
gem "rspec", "~> 3.5.0"
|
||||
gem "rspec-its", "~> 1.1.0"
|
||||
gem "rspec-rails", "~> 3.5.0"
|
||||
gem "rubocop", "~> 0.52.1"
|
||||
gem "coveralls", "~> 0.8.2", require: false
|
||||
end
|
||||
|
||||
gemspec path: "../"
|
||||
@@ -1,5 +1,4 @@
|
||||
require 'active_support/core_ext/hash/keys'
|
||||
require 'active_support/core_ext/hash/transform_values'
|
||||
require 'active_support/core_ext/hash/indifferent_access'
|
||||
|
||||
module Telegram
|
||||
@@ -43,7 +42,7 @@ module Telegram
|
||||
|
||||
# Hash of botan clients made from #bots.
|
||||
def botans
|
||||
@botans ||= bots.transform_values(&:botan)
|
||||
@botans ||= bots.map { |k, v| [k, v.botan] }.to_h
|
||||
end
|
||||
|
||||
# Returns config for .bots method. By default uses `telegram['bots']` section
|
||||
|
||||
@@ -35,7 +35,7 @@ RSpec.shared_context 'telegram/bot/updates_controller' do
|
||||
def deep_stringify(input)
|
||||
case input
|
||||
when Array then input.map(&method(__callee__))
|
||||
when Hash then input.transform_keys(&:to_s).transform_values(&method(__callee__))
|
||||
when Hash then input.map { |k, v| [k.to_s, deep_stringify(v)] }.to_h
|
||||
else input
|
||||
end
|
||||
end
|
||||
|
||||
Ссылка в новой задаче
Block a user