telepost 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/telepost.rb +3 -1
- data/telepost.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 05c7f5ad3d7c02a345d51f5aac1e18215533afc37fafbeadb979791f415681d2
|
4
|
+
data.tar.gz: d4d78741d5e7be0e3469a252b03395ed992e4a6177a5328ca065e105bdef8d75
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4f4f4867bf91b0d1089ced152ff8f56373c23c438e5eecbb053877e9f4d20557bc4c529a7e9abed340f6c45472cc3e46cb4fb8ba6156bbea40b73abd457b8676
|
7
|
+
data.tar.gz: 7e231e1add641240cacddc737ebab3260a5c3671cfa65d7eb042038a00ca992614d3674f165198bf841dffe71acebc98db263a6d76382f7041f56ee669d1ffc7
|
data/lib/telepost.rb
CHANGED
@@ -66,11 +66,13 @@ class Telepost
|
|
66
66
|
@chats = chats
|
67
67
|
end
|
68
68
|
|
69
|
+
# You can run a chat bot to listen to the messages coming to it, in
|
70
|
+
# a separate thread.
|
69
71
|
def run
|
70
72
|
Telebot::Bot.new(@token).run do |chat, message|
|
71
73
|
if block_given?
|
72
74
|
yield(chat, message)
|
73
|
-
|
75
|
+
elsif !chat.nil?
|
74
76
|
post(
|
75
77
|
"This is your chat ID: `#{message.chat.id}`.",
|
76
78
|
chat: message.chat.id
|
data/telepost.gemspec
CHANGED
@@ -31,7 +31,7 @@ Gem::Specification.new do |s|
|
|
31
31
|
s.rubygems_version = '2.5.1'
|
32
32
|
s.required_ruby_version = '>=2.5'
|
33
33
|
s.name = 'telepost'
|
34
|
-
s.version = '0.2.
|
34
|
+
s.version = '0.2.1'
|
35
35
|
s.license = 'MIT'
|
36
36
|
s.summary = 'Simple Telegram posting Ruby gem'
|
37
37
|
s.description = 'Simple Telegram posting Ruby gem'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: telepost
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yegor Bugayenko
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-12-
|
11
|
+
date: 2018-12-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: telebot
|