telepost 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/telepost.rb +3 -1
  3. data/telepost.gemspec +1 -1
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4f0360cb45f6d5abf53b648426caf61f8c4b05189a732b69285b80fa72a9a391
4
- data.tar.gz: b58854a54ed8641963808b22922abd1228013eca6b676efe3a8e722877083746
3
+ metadata.gz: 05c7f5ad3d7c02a345d51f5aac1e18215533afc37fafbeadb979791f415681d2
4
+ data.tar.gz: d4d78741d5e7be0e3469a252b03395ed992e4a6177a5328ca065e105bdef8d75
5
5
  SHA512:
6
- metadata.gz: 4952e2ff2de28cd7d6d45a095d8b3de38de1e8eac6456237064a1ad5acb5b03304586dd8392ea16361274a0f442ddcba4a66e446bf06c5ea773bbc085f8fc57b
7
- data.tar.gz: bb10d98baf1c103a71b773332b78023468ecc04238831d8965e29bca3d2583469d586d6ca396585eecb9410b10d791ee7b5754e17ce8deaa3e81279327f1a73d
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
- else
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.0'
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.0
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-10 00:00:00.000000000 Z
11
+ date: 2018-12-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: telebot