telegram_bot_ruby 0.1.1 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 03764fdebe0159e5f6de4e5c1bd4601f9dd2b32f
4
- data.tar.gz: de4943a43fae55a0b6e9086caf2074d7f02e2e16
3
+ metadata.gz: 7bb9b0f59bc8bfb6f12dad74e1ac411b9c8779b4
4
+ data.tar.gz: 5983a8a1acbb103e17f7ceb2f4e17c7157efdf9e
5
5
  SHA512:
6
- metadata.gz: acaee895123fccc68d3f34d837183a93f3ccc8b929c3c67abc79d7b8085b46e6fe5eb766a3eb9b15b413339bcfe6dcaa661ed239236de132c480de4e2ff188ce
7
- data.tar.gz: 1cb669182a42939e07f0aacf94dcfe7d4357bf94f8ef7952e4b999c3cf085dbe4e6cbdee3997b67decfd2adacace57566e72ffd8737035b5d19da0a0236c3a0f
6
+ metadata.gz: 2baa92312177181aa1b91d5056fe60c730ac486aa24ec63581e4863460b39545b4fedb2aeab4c1415510c35912d9a7b9d9126421fa70f350aefb43817b0e887d
7
+ data.tar.gz: 3b93fb3997d370af5ce6c7d33b9aef530cb54f607713a49a63f2b2a69a3b33c54ce8dcc0beec0a16141a0b54bfd7b9d4103969c85f8ffea0448a26ab87b22103
data/.gitignore CHANGED
@@ -7,3 +7,4 @@
7
7
  /pkg/
8
8
  /spec/reports/
9
9
  /tmp/
10
+ *.gem
data/README.md CHANGED
@@ -1,10 +1,6 @@
1
1
  # TelegramBotRuby
2
2
 
3
- **This project is not finished yet**
4
-
5
-
6
- utilizing telegram bots api in ruby
7
- ([telegram api doc](https://core.telegram.org/bots/api))
3
+ [telegram api doc](https://core.telegram.org/bots/api)
8
4
 
9
5
 
10
6
  ## Installation
@@ -32,12 +28,13 @@ $ gem install telegram_bot_ruby
32
28
  ### Set up client
33
29
 
34
30
  ```ruby
35
- require 'telegram_bot_ruby'
31
+ require 'telegram_bot'
36
32
 
37
33
  bot = TelegramBot.new(token: <token>)
38
- bot.listen(method: :webhook, url: '/meow/meow')
34
+
35
+ bot.listen(method: :webhook, url: '/meow/meow') # not implemented yet
39
36
  # or
40
- bot.listen(method: :poll, interval: 5)
37
+ bot.listen(method: :poll, interval: 1)
41
38
  ```
42
39
 
43
40
  ### Set up update listeners
@@ -56,12 +53,9 @@ bot.on_text 'ping' do # plain 'ping'
56
53
  end
57
54
 
58
55
  # with block: false, message will keep passing through other listeners
59
- bot.on_text /(\d+)\+(\d+)\=\?/, block: false do
56
+ bot.on_text /(\d+)\+(\d+)\=\?/, block: false do |n1, n2|
60
57
  send_chat_action :typing
61
- send_message ($1.to_i + $2.to_i).to_s
62
- forward_message 2333
63
- send_chat_action :upload_photo
64
- send_photo <IO obj implements read>
58
+ send_message (n1.to_i + n2.to_i).to_s
65
59
  end
66
60
 
67
61
  # a simple history logger
@@ -1,3 +1,3 @@
1
1
  class TelegramBot
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.3"
3
3
  end
@@ -13,7 +13,7 @@ Gem::Specification.new do |spec|
13
13
  spec.homepage = "https://github.com/shouya/telegram-bot"
14
14
  spec.license = "MIT"
15
15
 
16
- spec.required_ruby_version = '2.0.0'
16
+ spec.required_ruby_version = '> 2.0.0'
17
17
  # Prevent pushing this gem to RubyGems.org by setting 'allowed_push_host', or
18
18
  # delete this section to allow pushing this gem to any host.
19
19
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: telegram_bot_ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shou Ya
@@ -117,7 +117,7 @@ require_paths:
117
117
  - lib
118
118
  required_ruby_version: !ruby/object:Gem::Requirement
119
119
  requirements:
120
- - - '='
120
+ - - ">"
121
121
  - !ruby/object:Gem::Version
122
122
  version: 2.0.0
123
123
  required_rubygems_version: !ruby/object:Gem::Requirement