telepost 0.3.0 → 0.3.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 +7 -4
  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: 7b59c23801fdb053c13e6d11b1f6907c94506c8a5645fd1b2c831bbf225e1a48
4
- data.tar.gz: 89551089d80554c71b35eb5800036fe22f82ac4c464e9372343475ecd2d57e93
3
+ metadata.gz: bbc37984476cf3d64a3039dbd68ad44889fa627c09d924d46abcb65da238f8cf
4
+ data.tar.gz: c28bc273e8f02f0792f05009075f3c3b40846a5ac32aad73f1acd6b7e40be219
5
5
  SHA512:
6
- metadata.gz: f988bad8491d6d40b32d84925c5ff228d21d08493f81581aa8058c9c4dbe75d36fce9b429add3eeb65b324e55381c26fba6927e81d41a3a2f60a2cdb61862a7e
7
- data.tar.gz: 1e8715194941f919fdde6ff85934e916013aef8ad468e272fda41fad02eb1e665813df833e1ee8515c094faaa57d831136f06160af2017bd8097b2a67d1cfe57
6
+ metadata.gz: a21791cb28c2bd45ce02aff4c29b8105e66127259a5a797a2da2305b0759a587ad0b46fb3d6e129fc63c4cb5783b83c7e25d7b08656a55c28ca4856b9099c059
7
+ data.tar.gz: 934514efb52ddbe4ad11fbf27eacddf54cd3f60d20bf79131baeeab900010ec4a9fca9cab937ef7a71068850f2490beb31cc1bc2ab4184009175f84048609a62
@@ -81,10 +81,13 @@ class Telepost
81
81
  if block_given?
82
82
  yield(chat, message)
83
83
  elsif !chat.nil?
84
- post(
85
- "This is your chat ID: `#{message.chat.id}`.",
86
- chat: message.chat.id
87
- )
84
+ id = message.chat.id
85
+ if id.positive?
86
+ post(
87
+ "This is your chat ID: `#{message.chat.id}`.",
88
+ chat: message.chat.id
89
+ )
90
+ end
88
91
  end
89
92
  end
90
93
  rescue Net::OpenTimeout
@@ -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.3.0'
34
+ s.version = '0.3.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.3.0
4
+ version: 0.3.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: 2019-03-22 00:00:00.000000000 Z
11
+ date: 2019-04-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: telebot