telegram_bot 0.0.5 → 0.0.6

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: 1205a818fad06f88ea0d6b45c3456a44e414ff1d
4
- data.tar.gz: 30e9dcccd40322684e21d95f31b4bd4db78c0874
3
+ metadata.gz: 03c9fdf2dd790ac15831cf52dbf9731c5b25f90c
4
+ data.tar.gz: 37f347c7aa708b631ef28d2a4d0ac71901fbf71e
5
5
  SHA512:
6
- metadata.gz: 382595c7ac6914f56af0fac5b1b957b03a81e220ddc80fd639e5135fb921867099d39cb59df4dc9ce84a45359fb4c2a617518c4652fbaa876fbf772e4661ea3f
7
- data.tar.gz: f186585044bf4a3f2e27abe22626985f341ecdc76aadad35be6c88cdfaa4b6588e6a60ed309eb8e18fc940981da19d0c83fdc05f81187d0b149cc9e21962d54b
6
+ metadata.gz: e42072bac136985ae7fc2136767f6f09bd1fc107ff894c8cb007826467187e7b9eb9f635740054c5399174c26e5b4146eb3d9b71c79392da1017acd475d019c1
7
+ data.tar.gz: fac54923bad631123829da3cfed92f2de772bc97c4adb39a93f5b8032ee55d40448a134977d9398b3f4a2fa9a7a5f60848bc217ef7a87a41a73cf2dfa71479c5
@@ -12,7 +12,8 @@ module TelegramBot
12
12
  @timeout = opts[:timeout] || 50
13
13
  @offset = opts[:offset] || 0
14
14
  @logger = opts[:logger] || NullLogger.new
15
- @connection = Excon.new(ENDPOINT, persistent: true)
15
+ @proxy = opts[:proxy] || nil
16
+ @connection = Excon.new(ENDPOINT, persistent: true, proxy: @proxy)
16
17
  end
17
18
 
18
19
  def get_me
@@ -30,7 +31,8 @@ module TelegramBot
30
31
  logger.info "starting get_updates loop"
31
32
  loop do
32
33
  messages = get_last_messages(opts)
33
- messages.each do |message|
34
+ messages.compact.each do |message|
35
+ next unless message
34
36
  logger.info "message from @#{message.chat.friendly_name}: #{message.text.inspect}"
35
37
  yield message
36
38
  end
@@ -1,3 +1,3 @@
1
1
  module TelegramBot
2
- VERSION = "0.0.5"
2
+ VERSION = "0.0.6"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: telegram_bot
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - José Tomás Albornoz
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-01-10 00:00:00.000000000 Z
11
+ date: 2016-06-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: excon