telegram_meetup_bot 0.0.2 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e496544d412e4ded058528c0ce1c62bb97976f29
4
- data.tar.gz: 09d7b861bf4b309629e8ae37784883659366f2bb
3
+ metadata.gz: e0f006330cda4dcc1f556f33824fe35b02021336
4
+ data.tar.gz: c57bfd3e78002113e820946dc5a1353d55421bba
5
5
  SHA512:
6
- metadata.gz: c6d95c65a742dd485d7e5ab208cad2dd02df26722d001a0f933b06271d948fbc76734b3ad19fdbe8895a31261a8606ca98d68293d39b07895e8bc70c33b2b40d
7
- data.tar.gz: fcfd3a73e91218d3fb5a74ed5330f623cb667c99ccb5621e02ce4d58d4cae876992bef309ef3b7826109ada4bc4b27d51f3799c253a402771184d93f0d1bc45a
6
+ metadata.gz: fa2ba469c84317ae87940a4cd697f13662377566403768fc1066addc2825bc657da3374831554d4cd9a66fefe3f347a3f7ab96c95501237f7a84025d8c1df071
7
+ data.tar.gz: 76e08f87c49e62f44808a8dd01b0f44d737eabced30190825a987f283726cd80defde6b2ed4be30a84338d49cf8a9235c8734aac3da29553661fb0e02666d6a1
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # TelegramMeetupBot
2
2
 
3
- [![Build Status](https://travis-ci.org/mendab1e/telegram_meetup_bot.svg)](https://travis-ci.org/mendab1e/telegram_meetup_bot)
3
+ [![Gem Version](https://badge.fury.io/rb/telegram_meetup_bot.svg)](http://badge.fury.io/rb/telegram_meetup_bot) [![Build Status](https://travis-ci.org/mendab1e/telegram_meetup_bot.svg)](https://travis-ci.org/mendab1e/telegram_meetup_bot)
4
4
 
5
5
  Telegram bot for meetups organisation. It suits really well for small communities, where people want to attend a place together, but not on regular basis.
6
6
 
@@ -44,7 +44,7 @@ Run your bot:
44
44
 
45
45
  ## Contributing
46
46
 
47
- 1. Fork it ( https://github.com/[my-github-username]/telegram_meetup_bot/fork )
47
+ 1. Fork it ( https://github.com/mendab1e/telegram_meetup_bot/fork )
48
48
  2. Create your feature branch (`git checkout -b my-new-feature`)
49
49
  3. Commit your changes (`git commit -am 'add some feature'`)
50
50
  4. Push to the branch (`git push origin my-new-feature`)
@@ -8,6 +8,7 @@ config_path = File.join(ENV['HOME'], '.telegram_meetup_bot')
8
8
  if ARGV.first == '--generate'
9
9
  FileUtils.mkdir(config_path) unless Dir.exist?(config_path)
10
10
  samples_dir = File.expand_path('../../config_samples', __FILE__)
11
+
11
12
  %w(config.yml responses.yml).each do |sample|
12
13
  file = File.join(samples_dir, sample)
13
14
  FileUtils.cp(file, config_path)
@@ -9,6 +9,7 @@ old_date: "This date is too old."
9
9
  nobody: "No one planned to come on %date%."
10
10
  not_subscribed: "You wasn't subscribed on %date%."
11
11
  no_username: "%first_name%, please set a username in the Telegram settings."
12
+ cal: "Reserved days in %date%:"
12
13
  help: |
13
14
  Hi, %first_name%. Use this commands list:
14
15
  /today 14:00 - add yourself to the today list (time is optional);
@@ -17,4 +18,5 @@ help: |
17
18
  /date 23 14:00 - add yourself to the list on 23rd of the current month (time is optional);
18
19
  /date_list 23.04 - display the list for April 23 of the current year;
19
20
  /date_cancel 23.04.16 - remove yourself from the list on 23.04.16;
21
+ /cal 1 - display reserved days in January (it uses current month by default)
20
22
  There are 3 formats for date available: 14 - day, 14.09 - day and month, 14.09.15 - day, month and year;
@@ -9,16 +9,6 @@ module TelegramMeetupBot
9
9
  @time = args[:time]
10
10
  end
11
11
 
12
- def self.formated_users_for_date(date)
13
- storage = Initializers::ConfigLoader.storage
14
- users = storage.get_users_for_date(date)
15
- users.map! do |user|
16
- username = user[:username] ? " @#{user[:username]}" : ''
17
- "#{user[:first_name]}#{username} #{user[:time]}"
18
- end
19
- users.join("\n")
20
- end
21
-
22
12
  def add_user_to_date
23
13
  process_user do |users, saved_user|
24
14
  return if saved_user == user_hash
@@ -38,6 +28,25 @@ module TelegramMeetupBot
38
28
  end
39
29
  end
40
30
 
31
+ def self.formated_users_for_date(date)
32
+ storage = Initializers::ConfigLoader.storage
33
+ users = storage.get_users_for_date(date)
34
+ users.map! do |user|
35
+ username = user[:username] ? " @#{user[:username]}" : ''
36
+ "#{user[:first_name]}#{username} #{user[:time]}"
37
+ end
38
+ users.join("\n")
39
+ end
40
+
41
+ def self.submited_days_of_month(month)
42
+ storage = Initializers::ConfigLoader.storage
43
+ dates = storage.get_all_available_dates
44
+ min, max = build_date_window(month)
45
+
46
+ dates.keep_if { |date| date >= min && date <= max }.sort.
47
+ map { |date| date.match(/\d\d$/) }.join(' ')
48
+ end
49
+
41
50
  private
42
51
 
43
52
  def process_user(&block)
@@ -54,5 +63,14 @@ module TelegramMeetupBot
54
63
  user.to_h
55
64
  end
56
65
  end
66
+
67
+ def self.build_date_window(month)
68
+ today = Date.today
69
+ year = month < today.month ? today.next_year.year : today.year
70
+ max = Date.new(year, month, -1).to_s
71
+ min = today.month == month ? today.to_s : Date.new(year, month, 1).to_s
72
+
73
+ [min, max]
74
+ end
57
75
  end
58
76
  end
@@ -19,7 +19,7 @@ module TelegramMeetupBot
19
19
  rescue Telegram::Bot::Exceptions::ResponseError => e
20
20
  puts e
21
21
  sleep 1
22
- run # run again on telegram server error
22
+ retry # run again on telegram server error
23
23
  end
24
24
  end
25
25
  end
@@ -1,108 +1,69 @@
1
1
  module TelegramMeetupBot
2
2
  class CommandsHandler
3
- COMMANDS = %w(today today_list today_cancel date date_list date_cancel help)
4
- attr_reader :command, :params, :author, :messenger
3
+ COMMANDS = %w(today today_list today_cancel
4
+ date date_list date_cancel help cal)
5
+ attr_reader :command, :params, :helper
5
6
 
6
7
  def initialize(args)
7
8
  parser = MessageParser.new(args.fetch(:message))
8
- @messenger = args.fetch(:messenger)
9
9
  @command = COMMANDS.include?(parser.command) ? parser.command : 'help'
10
10
  @params = parser.params
11
- @author = parser.author
11
+ @helper = HandlerHelper.new(
12
+ author: parser.author,
13
+ command: @command,
14
+ messenger: args.fetch(:messenger)
15
+ )
12
16
  end
13
17
 
14
18
  def process
15
- if method(command).arity == 0
19
+ if self.class.instance_method(command).arity == 0
16
20
  send command
17
21
  else
18
22
  send command, params
19
23
  end
20
24
 
21
- no_username_notification unless author.username
25
+ helper.send_empty_username_notification unless helper.author_has_username?
22
26
  end
23
27
 
24
28
  private
25
29
 
26
30
  def today(params)
27
- time = ParamsParser.new(params.first).parse_time if params.first
28
- handle_date(Date.today, time)
31
+ time = ParamsParser.new(params.first).parse_time if params.any?
32
+ helper.handle_date(Date.today, time)
29
33
  end
30
34
 
31
35
  def date(params)
32
36
  date = ParamsParser.new(params.first).parse_date
33
37
  time = ParamsParser.new(params[1]).parse_time if params[1]
34
- handle_date(date, time) if date_is_valid?(date)
35
- end
36
-
37
- def handle_date(date, time)
38
- Calendar.new(date: date, user: author, time: time).add_user_to_date
39
- messenger.send build_response(date: date)
38
+ helper.handle_date(date, time)
40
39
  end
41
40
 
42
41
  def today_list
43
- handle_date_list Date.today
42
+ helper.handle_date_list Date.today
44
43
  end
45
44
 
46
45
  def date_list(params)
47
46
  date = ParamsParser.new(params.first).parse_date
48
- handle_date_list(date) if date_is_valid?(date)
49
- end
50
-
51
- def handle_date_list(date)
52
- users = Calendar.formated_users_for_date(date)
53
- messenger.send list_response(date, users)
47
+ helper.handle_date_list date
54
48
  end
55
49
 
56
50
  def today_cancel
57
- handle_date_cancel Date.today
51
+ helper.handle_date_cancel Date.today
58
52
  end
59
53
 
60
54
  def date_cancel(params)
61
55
  date = ParamsParser.new(params.first).parse_date
62
- handle_date_cancel(date) if date_is_valid?(date)
56
+ helper.handle_date_cancel date
63
57
  end
64
58
 
65
- def handle_date_cancel(date)
66
- calendar = Calendar.new(date: date, user: author)
67
- deleted = calendar.delete_user_from_date
68
- args = deleted ? {} : {key: 'not_subscribed', date: date}
69
- messenger.send build_response(args)
59
+ def cal(params)
60
+ month = ParamsParser.new(params.first).parse_month if params.any?
61
+ month ||= Date.today.month
62
+ helper.handle_cal month
70
63
  end
71
64
 
72
65
  def help
73
- messenger.send build_response
74
- end
75
-
76
- def no_username_notification
77
- messenger.send build_response(key: 'no_username')
78
- end
79
-
80
- def date_is_valid?(date)
81
- if date.nil?
82
- messenger.send build_response(key: 'wrong_date_format')
83
- return false
84
- elsif date < Date.today
85
- messenger.send build_response(key: 'old_date')
86
- return false
87
- end
88
- true
89
- end
90
-
91
- def list_response(date, list)
92
- if list.empty?
93
- build_response(key: 'nobody', date: date)
94
- else
95
- build_response(date: date) { |response| "#{response}\n#{list}" }
96
- end
97
- end
98
-
99
- def build_response(args = {})
100
- response_key = args.fetch(:key) { command }
101
- response = Initializers::ResponsesLoader.responses[response_key].dup
102
- response.gsub!('%first_name%', author.first_name)
103
- response.gsub!('%date%', args[:date].strftime('%d %h %Y')) if args[:date]
104
-
105
- block_given? ? yield(response) : response
66
+ helper.handle_default_command
106
67
  end
107
68
  end
108
69
  end
@@ -0,0 +1,90 @@
1
+ module TelegramMeetupBot
2
+ class HandlerHelper
3
+ attr_reader :command, :author, :messenger, :error
4
+
5
+ def initialize(args)
6
+ @command = args.fetch(:command)
7
+ @author = args.fetch(:author)
8
+ @messenger = args.fetch(:messenger)
9
+ end
10
+
11
+ def handle_date(date, time)
12
+ handle(date) do
13
+ Calendar.new(date: date, user: author, time: time).add_user_to_date
14
+ messenger.send_text build_response(date: date)
15
+ end
16
+ end
17
+
18
+ def handle_date_list(date)
19
+ handle(date) do
20
+ users = Calendar.formated_users_for_date(date)
21
+ messenger.send_text list_response(list: users, date: date)
22
+ end
23
+ end
24
+
25
+ def handle_date_cancel(date)
26
+ handle(date) do
27
+ calendar = Calendar.new(date: date, user: author)
28
+ deleted_user = calendar.delete_user_from_date
29
+ args = deleted_user ? {} : {key: 'not_subscribed', date: date}
30
+ messenger.send_text build_response(args)
31
+ end
32
+ end
33
+
34
+ def handle_default_command
35
+ messenger.send_text build_response
36
+ end
37
+
38
+ def send_empty_username_notification
39
+ messenger.send_text build_response(key: 'no_username')
40
+ end
41
+
42
+ def author_has_username?
43
+ author.username
44
+ end
45
+
46
+ def handle_cal(month)
47
+ dates = Calendar.submited_days_of_month(month)
48
+ today = Date.today
49
+ year = month < today.month ? today.next_year.year : today.year
50
+ month = Date.new(year, month)
51
+ messenger.send_text list_response(list: dates, month: month)
52
+ end
53
+
54
+ private
55
+
56
+ def handle(date, &block)
57
+ if date_has_error?(date)
58
+ messenger.send_text error
59
+ else
60
+ yield
61
+ end
62
+ end
63
+
64
+ def date_has_error?(date)
65
+ if date.nil?
66
+ @error = build_response(key: 'wrong_date_format')
67
+ elsif date < Date.today
68
+ @error = build_response(key: 'old_date')
69
+ end
70
+ end
71
+
72
+ def list_response(args)
73
+ if args.fetch(:list).empty?
74
+ build_response(args.merge(key: 'nobody'))
75
+ else
76
+ build_response(args) { |response| "#{response}\n#{args.fetch(:list)}" }
77
+ end
78
+ end
79
+
80
+ def build_response(args = {})
81
+ response_key = args.fetch(:key) { command }
82
+ response = Initializers::ResponsesLoader.responses[response_key].dup
83
+ response.gsub!('%first_name%', author.first_name)
84
+ response.gsub!('%date%', args[:date].strftime('%d %h %Y')) if args[:date]
85
+ response.gsub!('%date%', args[:month].strftime('%h %Y')) if args[:month]
86
+
87
+ block_given? ? yield(response) : response
88
+ end
89
+ end
90
+ end
@@ -7,7 +7,7 @@ module TelegramMeetupBot
7
7
  def preload(config_path)
8
8
  @configurations ||= begin
9
9
  file = File.join(config_path, self::FILE_NAME)
10
- check_if_exist(file)
10
+ exit_if_file_not_exist(file)
11
11
  config = YAML.load(File.open(file).read)
12
12
  validate(config.keys, file)
13
13
  config.map { |_,v| v.freeze }
@@ -15,7 +15,7 @@ module TelegramMeetupBot
15
15
  end
16
16
  end
17
17
 
18
- def check_if_exist(file)
18
+ def exit_if_file_not_exist(file)
19
19
  unless File.exist? file
20
20
  puts "Error: file not found #{file}"
21
21
  exit
@@ -31,7 +31,6 @@ module TelegramMeetupBot
31
31
  end
32
32
  end
33
33
  end
34
-
35
34
  end
36
35
  end
37
36
  end
@@ -1,5 +1,3 @@
1
- require 'redis'
2
-
3
1
  module TelegramMeetupBot
4
2
  module Initializers
5
3
  class ConfigLoader < Base
@@ -32,7 +30,6 @@ module TelegramMeetupBot
32
30
  )
33
31
  end
34
32
  end
35
-
36
33
  end
37
34
  end
38
35
  end
@@ -3,7 +3,8 @@ module TelegramMeetupBot
3
3
  class ResponsesLoader < Base
4
4
  FILE_NAME = 'responses.yml'
5
5
  AVAILABLE_KEYS = %w(today today_list today_cancel date date_list
6
- date_cancel wrong_date_format old_date nobody not_subscribed help)
6
+ date_cancel wrong_date_format old_date nobody not_subscribed
7
+ no_username help cal)
7
8
 
8
9
  def self.responses
9
10
  @configurations
@@ -7,7 +7,7 @@ module TelegramMeetupBot
7
7
  @chat_id = args.fetch(:chat_id)
8
8
  end
9
9
 
10
- def send(text)
10
+ def send_text(text)
11
11
  api.send_message(chat_id: chat_id, text: text)
12
12
  end
13
13
  end
@@ -25,5 +25,13 @@ module TelegramMeetupBot
25
25
  def parse_time
26
26
  Time.parse(arg).strftime('%R') rescue nil
27
27
  end
28
+
29
+ def parse_month
30
+ month = arg.to_i
31
+
32
+ if month >= 1 && month <= 12
33
+ month
34
+ end
35
+ end
28
36
  end
29
37
  end
@@ -15,5 +15,9 @@ module TelegramMeetupBot
15
15
  def set_users_to_date(users, date)
16
16
  redis.hset(key, date, users.to_yaml)
17
17
  end
18
+
19
+ def get_all_available_dates
20
+ dates = redis.hkeys(key)
21
+ end
18
22
  end
19
23
  end
@@ -1,3 +1,3 @@
1
1
  module TelegramMeetupBot
2
- VERSION = "0.0.2"
2
+ VERSION = "0.1.0"
3
3
  end
@@ -1,15 +1,16 @@
1
1
  require 'telegram/bot'
2
+ require 'redis'
2
3
 
3
- require "telegram_meetup_bot/version"
4
- require "telegram_meetup_bot/initializers"
5
- require "telegram_meetup_bot/client"
6
- require "telegram_meetup_bot/messenger"
7
- require "telegram_meetup_bot/message_parser"
8
- require "telegram_meetup_bot/storage"
9
- require "telegram_meetup_bot/calendar"
10
- require "telegram_meetup_bot/commands_handler"
11
- require "telegram_meetup_bot/params_parser"
12
- # require 'pry'
4
+ require 'telegram_meetup_bot/version'
5
+ require 'telegram_meetup_bot/initializers'
6
+ require 'telegram_meetup_bot/client'
7
+ require 'telegram_meetup_bot/messenger'
8
+ require 'telegram_meetup_bot/message_parser'
9
+ require 'telegram_meetup_bot/storage'
10
+ require 'telegram_meetup_bot/calendar'
11
+ require 'telegram_meetup_bot/commands_handler'
12
+ require 'telegram_meetup_bot/params_parser'
13
+ require 'telegram_meetup_bot/handler_helper'
13
14
 
14
15
  module TelegramMeetupBot
15
16
  def self.run(config_path)
data/spec/spec_helper.rb CHANGED
@@ -2,6 +2,7 @@ require 'bundler/setup'
2
2
  Bundler.setup
3
3
 
4
4
  require 'telegram_meetup_bot'
5
+ require 'timecop'
5
6
  require File.expand_path('../../lib/telegram_meetup_bot.rb', __FILE__)
6
7
 
7
8
  RSpec.configure do |config|
@@ -60,4 +60,38 @@ RSpec.describe TelegramMeetupBot::Calendar do
60
60
  end
61
61
  end
62
62
  end
63
+
64
+ describe 'Calendar#submited_days_of_month' do
65
+ let(:storage) { double('storage') }
66
+ let(:month) { 7 }
67
+ subject { described_class }
68
+ before { allow(storage).to receive(:get_all_available_dates).and_return(dates) }
69
+
70
+ context "when month isn't current" do
71
+ let(:dates) { %w(2015-07-30 2015-07-15 2015-07-16 2015-06-14 2015-08-17) }
72
+ it "works" do
73
+ Timecop.freeze(Date.new(2015, month - 1, 1)) do
74
+ expect(subject.submited_days_of_month(month)).to eq("15 16 30")
75
+ end
76
+ end
77
+ end
78
+
79
+ context "when month is current" do
80
+ let(:dates) { %w(2015-07-30 2015-07-15 2015-07-16 2015-06-14 2015-08-17) }
81
+ it "starts from today" do
82
+ Timecop.freeze(Date.new(2015, month, 16)) do
83
+ expect(subject.submited_days_of_month(month)).to eq("16 30")
84
+ end
85
+ end
86
+ end
87
+
88
+ context "when month < current_month" do
89
+ let(:dates) { %w(2015-06-30 2016-06-15) }
90
+ it "starts from today" do
91
+ Timecop.freeze(Date.new(2015, month, 16)) do
92
+ expect(subject.submited_days_of_month(month - 1)).to eq("15")
93
+ end
94
+ end
95
+ end
96
+ end
63
97
  end
@@ -0,0 +1,41 @@
1
+ require 'spec_helper'
2
+
3
+ RSpec.describe TelegramMeetupBot::CommandsHandler do
4
+ let(:messenger) { instance_double('message') }
5
+ let(:from) { instance_double('from', id: 1, username: 'Ikari01', first_name: 'Shinji') }
6
+ let(:message) { instance_double('message', text: command, from: from) }
7
+
8
+ subject { described_class.new(message: message, messenger: messenger) }
9
+
10
+ describe '#process' do
11
+ context "when command isn't in whitelist" do
12
+ let(:command) { '/unknow_command' }
13
+
14
+ it "calls help command" do
15
+ allow_any_instance_of(TelegramMeetupBot::HandlerHelper).to receive(:handle_default_command)
16
+ expect(subject).to receive(:help).with(no_args)
17
+ subject.process
18
+ end
19
+ end
20
+
21
+ context "when command without args" do
22
+ let(:command) { '/today_list' }
23
+
24
+ it "works" do
25
+ allow_any_instance_of(TelegramMeetupBot::HandlerHelper).to receive(:handle_date_list)
26
+ expect(subject).to receive(:today_list).with(no_args)
27
+ subject.process
28
+ end
29
+ end
30
+
31
+ context "when command with args" do
32
+ let(:command) { '/date 08.11.07' }
33
+
34
+ it "works" do
35
+ allow_any_instance_of(TelegramMeetupBot::HandlerHelper).to receive(:handle_date)
36
+ expect(subject).to receive(:date).with(['08.11.07'])
37
+ subject.process
38
+ end
39
+ end
40
+ end
41
+ end
@@ -66,4 +66,26 @@ RSpec.describe TelegramMeetupBot::ParamsParser do
66
66
  end
67
67
  end
68
68
  end
69
+
70
+ describe '#parse_month' do
71
+ context 'correct' do
72
+ let(:months) { %w(01 1) }
73
+
74
+ it 'works' do
75
+ months.each do |date|
76
+ expect(described_class.new(date).parse_month).to eq(1)
77
+ end
78
+ end
79
+ end
80
+
81
+ context 'wrong_format' do
82
+ let(:months) { %w(abc 13 0) }
83
+
84
+ it 'works' do
85
+ months.each do |date|
86
+ expect(described_class.new(date).parse_month).to eq(nil)
87
+ end
88
+ end
89
+ end
90
+ end
69
91
  end
@@ -9,7 +9,7 @@ Gem::Specification.new do |spec|
9
9
  spec.authors = ["Timur Yanberdin"]
10
10
  spec.email = ["yanberdint@gmail.com"]
11
11
  spec.summary = "Telegram bot for meetups organisation"
12
- spec.homepage = ""
12
+ spec.homepage = "https://github.com/mendab1e/telegram_meetup_bot"
13
13
  spec.license = "MIT"
14
14
 
15
15
  spec.files = `git ls-files -z`.split("\x0")
@@ -21,7 +21,8 @@ Gem::Specification.new do |spec|
21
21
  spec.add_development_dependency "rake", "~> 10.0"
22
22
  spec.add_development_dependency "rspec"
23
23
  spec.add_development_dependency "pry"
24
+ spec.add_development_dependency "timecop"
24
25
 
25
26
  spec.add_dependency 'redis'
26
- spec.add_dependency 'telegram-bot-ruby'
27
+ spec.add_dependency 'telegram-bot-ruby', ">= 0.3.5"
27
28
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: telegram_meetup_bot
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Timur Yanberdin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-09-15 00:00:00.000000000 Z
11
+ date: 2015-09-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -66,6 +66,20 @@ dependencies:
66
66
  - - ">="
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: timecop
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
69
83
  - !ruby/object:Gem::Dependency
70
84
  name: redis
71
85
  requirement: !ruby/object:Gem::Requirement
@@ -86,14 +100,14 @@ dependencies:
86
100
  requirements:
87
101
  - - ">="
88
102
  - !ruby/object:Gem::Version
89
- version: '0'
103
+ version: 0.3.5
90
104
  type: :runtime
91
105
  prerelease: false
92
106
  version_requirements: !ruby/object:Gem::Requirement
93
107
  requirements:
94
108
  - - ">="
95
109
  - !ruby/object:Gem::Version
96
- version: '0'
110
+ version: 0.3.5
97
111
  description:
98
112
  email:
99
113
  - yanberdint@gmail.com
@@ -115,6 +129,7 @@ files:
115
129
  - lib/telegram_meetup_bot/calendar.rb
116
130
  - lib/telegram_meetup_bot/client.rb
117
131
  - lib/telegram_meetup_bot/commands_handler.rb
132
+ - lib/telegram_meetup_bot/handler_helper.rb
118
133
  - lib/telegram_meetup_bot/initializers.rb
119
134
  - lib/telegram_meetup_bot/initializers/base.rb
120
135
  - lib/telegram_meetup_bot/initializers/config_loader.rb
@@ -126,10 +141,11 @@ files:
126
141
  - lib/telegram_meetup_bot/version.rb
127
142
  - spec/spec_helper.rb
128
143
  - spec/telegram_meetup_bot/calendar_spec.rb
144
+ - spec/telegram_meetup_bot/commands_handler_spec.rb
129
145
  - spec/telegram_meetup_bot/message_parser_spec.rb
130
146
  - spec/telegram_meetup_bot/params_parser_spec.rb
131
147
  - telegram_meetup_bot.gemspec
132
- homepage: ''
148
+ homepage: https://github.com/mendab1e/telegram_meetup_bot
133
149
  licenses:
134
150
  - MIT
135
151
  metadata: {}
@@ -156,5 +172,6 @@ summary: Telegram bot for meetups organisation
156
172
  test_files:
157
173
  - spec/spec_helper.rb
158
174
  - spec/telegram_meetup_bot/calendar_spec.rb
175
+ - spec/telegram_meetup_bot/commands_handler_spec.rb
159
176
  - spec/telegram_meetup_bot/message_parser_spec.rb
160
177
  - spec/telegram_meetup_bot/params_parser_spec.rb