telegram-ruby 0.1.1 → 0.1.2

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
  SHA256:
3
- metadata.gz: 7be63af9915e9024d3fdcd839d48b38e0e104373492e33532dba662fb0f595b9
4
- data.tar.gz: 57614b3e7908aa14a4a3394d99c4554e4e616b22f275ee60a4249e3dc7c55bb2
3
+ metadata.gz: 64c29ef807dfe60f64179da1a8af31083d4ee04d33412bafcf64cabcf5000652
4
+ data.tar.gz: 072aca1b8761dd97b26a89cfb7f517d0314e79cb2f9a7a551363107bd2bc390d
5
5
  SHA512:
6
- metadata.gz: 1abf6011c4aa7a4cf7c4308f93f759af9e99c878d32ad55239fd65f6b9439afdc140a3d491e6627617ca89dc8428d730c24b2d6de8bef7780f8ba6b1dd99ff59
7
- data.tar.gz: 6d2013e1ce782d5aa14fdc427e03e8230c2ddecc364e6245bbef3014264dc2ad1316b5cd2ea37c39317aef40877d5258b589286b2ea4ac8ca2e7e457cd4974d2
6
+ metadata.gz: 15a192029f36ac1868d1292973248b29876fab7a0cac60011bf654880f0e72f42302548abdf2eba6daf8a7f4aed463da98c202c04c9bed2324d11f48d91eb588
7
+ data.tar.gz: c355d26e41d79c5df2bccbeec2e7f515a46d72ee7f25cc9b1a4a1785209b023873968a413e1fff250a7c5a3f2adb3e3ec5e7d3177bc7ad883ee3e4d76397b2ae
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.2
4
+ - Add 'name' to configuration
5
+ - Update README.md
6
+
3
7
  ## 0.1.1
4
8
  - Fix photo setter in Telegram::Bot::Types::Message
5
9
  - Update README.md
data/README.md CHANGED
@@ -35,6 +35,7 @@ require 'telegram/bot'
35
35
  Telegram::Bot.configure do |conf|
36
36
  conf.token = 'Here your token'
37
37
  conf.raise_exceptions = false #By default true
38
+ conf.name = '@MyBot
38
39
  end
39
40
  ```
40
41
 
@@ -48,6 +48,7 @@ module Telegram::Bot
48
48
  end
49
49
 
50
50
  def pull_command(text)
51
+ text = text.gsub(Telegram::Bot.configuration.name, '') if Telegram::Bot.configuration.name
51
52
  !text.nil? && text.index('/') == 0 ? text.downcase.split(' ').first.gsub('/', '') : nil
52
53
  end
53
54
  end
@@ -1,7 +1,7 @@
1
1
  module Telegram
2
2
  module Bot
3
3
  class Configuration
4
- attr_accessor :token, :raise_exceptions
4
+ attr_accessor :token, :raise_exceptions, :name
5
5
 
6
6
  def initialize
7
7
  @raise_exceptions = true
@@ -1,3 +1,3 @@
1
1
  module Telegram
2
- VERSION = '0.1.1'
2
+ VERSION = '0.1.2'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: telegram-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alex Belenky