te_bot 0.1.0 → 0.4.0

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
  SHA256:
3
- metadata.gz: 7d234f02d1972e727baf9fbc6576e7d9f2ef437c10ccdeb3cc208c3f2f3dd092
4
- data.tar.gz: b5f032d95cab54dec2387cd9e1ad662d05f846f73247c8c64aa233e837e92678
3
+ metadata.gz: 6fa39962791458ebf9b8cd56bc4de36445e2fc5bbcdef2f360e12963cf970fc0
4
+ data.tar.gz: d774066a9e4d7a2608371de89444a16e8a9b7cd52842fa7e38bb9406b5f1a9f4
5
5
  SHA512:
6
- metadata.gz: e810fb8f9052cd7c8ee2727acfbed634422a503f918b2d0e02a3a382228696c7d6d8cc493861958a95188644b127f31d8739fcaceaa6e2e2cd41bbf5fe3bec70
7
- data.tar.gz: 9fb92b63eda3eda8b522e6455ee989fec4267809f6cf60819dfc082fbf02745e60a1e9378abe0f0ee8501dc083aeca65fe1e0ce06b8ea62216dbc1bf1a178519
6
+ metadata.gz: 5d9afb6cb164d7811dd2459313f703e0c84b639b5194f521ae7938d2a0474af011fcd7ae1cc5054b009d67717a7cec0da0da4053f591fc9599c43120246933ee
7
+ data.tar.gz: 7006934fa7a9652e3acc61a37bd80de279a2662d36aee1f0638a433e7a64a2fa3140e93850ed58b1a3a59f2d413589409cef2b4512d0ce18acf693b4f2735752
data/.standard.yml CHANGED
@@ -1,3 +1,3 @@
1
1
  # For available configuration options, see:
2
2
  # https://github.com/testdouble/standard
3
- ruby_version: 2.6
3
+ ruby_version: 2.7
data/CHANGELOG.md CHANGED
@@ -1,5 +1,26 @@
1
- ## [Unreleased]
1
+ ## [Released]
2
2
 
3
3
  ## [0.1.0] - 2022-06-25
4
4
 
5
5
  - Initial release
6
+
7
+
8
+ ## [Released]
9
+
10
+ ## [0.2.0] - 2022-07-02
11
+
12
+ - Change the implementation message replier from `reply(conn, message_string)` to `conn.reply text: message_string`.
13
+ - Add support for other message types such as audio, video, animation, markdown, and document
14
+
15
+ ## [Released]
16
+
17
+ ## [0.3.0] - 2022-07-02
18
+
19
+ - Support for the handler to return response direcly by returning rack array or hash.
20
+
21
+
22
+ ## [Unreleased]
23
+
24
+ ## [0.3.1] - 2022-07-03
25
+
26
+ - Support for helpers with `helpers` macro
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- te_bot (0.1.0)
4
+ te_bot (0.4.0)
5
5
  faraday (~> 2.3)
6
6
  rack (~> 2.2)
7
7
 
@@ -14,10 +14,10 @@ GEM
14
14
  byebug (11.1.3)
15
15
  crack (0.4.5)
16
16
  rexml
17
- faraday (2.3.0)
18
- faraday-net_http (~> 2.0)
17
+ faraday (2.5.2)
18
+ faraday-net_http (>= 2.0, < 3.1)
19
19
  ruby2_keywords (>= 0.0.4)
20
- faraday-net_http (2.0.3)
20
+ faraday-net_http (3.0.0)
21
21
  hashdiff (1.0.1)
22
22
  minitest (5.16.1)
23
23
  parallel (1.22.1)
@@ -57,6 +57,7 @@ GEM
57
57
  hashdiff (>= 0.4.0, < 2.0.0)
58
58
 
59
59
  PLATFORMS
60
+ x86_64-darwin-21
60
61
  x86_64-linux
61
62
 
62
63
  DEPENDENCIES
data/README.md CHANGED
@@ -1,21 +1,24 @@
1
1
  # ::TeBot
2
2
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/te_bot`. To experiment with that code, run `bin/console` for an interactive prompt.
3
+ [![Gem Version](https://badge.fury.io/rb/te_bot.svg)](https://badge.fury.io/rb/te_bot) ![Main Workflows](https://github.com/aaripurna/te_bot/actions/workflows/main.yml/badge.svg)
4
4
 
5
- This gem is used to handle telegram webhook and sending message with telegram bot
5
+ Welcome to yet another telegram bot webhook handler.
6
+
7
+ This gem is used to handle telegram webhook and sending message with telegram bot.
6
8
 
7
9
  ## Installation
8
10
 
9
11
  Install the gem and add to the application's Gemfile
10
12
 
11
- gem "te_bot", github: "aaripurna/te_bot"
13
+ gem 'te_bot'
14
+
12
15
  Then run
13
16
 
14
- $ bundle install
17
+ bundle install
15
18
 
16
19
  If bundler is not being used to manage dependencies, install the gem by executing:
17
20
 
18
- $ gem install te_bot -l https://github.com/aaripurna/te_bot.git
21
+ gem install te_bot
19
22
 
20
23
  ## Usage
21
24
 
@@ -25,23 +28,25 @@ This gem can be used as a standalone app since it implement rack interface. To u
25
28
  # app.rb
26
29
 
27
30
  require "te_bot"
31
+ require "te_bot/sender_options"
28
32
 
29
33
  class MyWebhookApp < TeBot::Court
30
- access_token ENV["YOUR_BOT_ACCESS_TOKEN"]
34
+ access_token ENV["YOUR_BOT_ACCESS_TOKEN"]
31
35
 
32
- command("/start") do |conn, params|
33
- reply(conn, "Welcome aboard my friend!")
34
- end
36
+ command("/start") do
37
+ reply text: "Welcome aboard my friend!"
38
+ end
35
39
 
36
- command("/today") do |conn, params|
37
- reply(conn, Time.now.to_s)
38
- end
40
+ command("/today") do
41
+ reply text: Time.now.to_s
42
+ end
39
43
  end
40
44
  ```
41
45
 
42
46
  To run this as a standalone app, you need to install `rack` and a webserver such as `puma`
43
47
 
44
- $ bundle add rack puma
48
+ bundle add rack puma
49
+
45
50
  create a file named `config.ru` as the rack entrypoint.
46
51
 
47
52
  ```rb
@@ -53,12 +58,12 @@ run MyWebhookApp.new
53
58
  ```
54
59
  To run the app we can use rackup
55
60
 
56
- $ bundle exec rackup
61
+ bundle exec rackup
57
62
 
58
63
  For more detailed information about rack please visit [Rack Repository](https://github.com/rack/rack).
59
64
 
60
65
  Now, our `MyWebhookApp` class is ready to handle some commands from telegram bot which are `/start` and `/today`.
61
- The command aslo support argument that will be passed to the `#command` block as `params`. To pass arguments, we can simply type `/today city:Jakarta limit:10`. The argument will be parsed as a Hash with string key => `{"city" => "Jakarta", "limit" => "10"}`. While the parameter `conn` is the message object which contains the full message including the chat_id to repy to.
66
+ The command aslo support argument that will be passed in the instance method `params`. To pass arguments, we can simply type `/today city:Jakarta limit:10`. The argument will be parsed as a Hash with string key => `{"city" => "Jakarta", "limit" => "10"}`.
62
67
 
63
68
  To add a default handler for non existing command we can use the `#default_command` macro.
64
69
 
@@ -66,36 +71,38 @@ To add a default handler for non existing command we can use the `#default_comma
66
71
  # app.rb
67
72
 
68
73
  class MyWebhookApp < TeBot::Court
69
- default_command do |conn, params|
70
- reply(conn, "Sorry, Comand not found. Try another command. or type /help")
71
- end
74
+ default_command do
75
+ reply text: "Sorry, Comand not found. Try another command. or type /help"
76
+ end
72
77
  end
73
78
  ```
74
79
 
75
- Other type of messages are also supported by using this macros `text` for regular text message, `query`, `document`, `audio`, and `voice`. For more detail please check this [Telegram Docs](https://core.telegram.org/bots/webhooks#testing-your-bot-with-updates). These macros is only expecting `conn` as an argument.
80
+ All the messages are passed in the instance method `message`
81
+
82
+ Other type of messages are also supported by using this macros `text` for regular text message, `query`, `document`, `audio`, and `voice`. For more detail please check this [Telegram Docs](https://core.telegram.org/bots/webhooks#testing-your-bot-with-updates).
76
83
 
77
84
  ```rb
78
85
  # app.rb
79
86
 
80
87
  class MyWebhookApp < TeBot::Court
81
- text do |conn|
82
- message = do_some_fancy_stuff_here(conn)
83
- reply(conn, message)
84
- end
88
+ text do
89
+ reply_message = do_some_fancy_stuff_here(message)
90
+ reply text: reply_message
91
+ end
85
92
  end
86
93
  ```
87
- And also we can define a macro for defaul action `#default_action` if the request does not match with this [Documentation](https://core.telegram.org/bots/webhooks#testing-your-bot-with-updates), Or we have not create the handler for that specific message type. Just becarefull, the `conn.data` might returns nil if the message format doesnot match the documentation.
94
+ And also we can define a macro for default action `#default_action` if the request does not match with this [Documentation](https://core.telegram.org/bots/webhooks#testing-your-bot-with-updates), Or we have not created the handler for that specific message type.
88
95
 
89
96
  ```rb
90
97
  # app.rb
91
98
 
92
99
  class MyWebhookApp < TeBot::Court
93
- default_action do |conn|
94
- reply(conn, "No, I can't talk like people. use command instead") if conn.data&.chat_id
95
- end
100
+ default_action do
101
+ reply text: "No, I can't talk like people. use command instead"
102
+ end
96
103
  end
97
104
  ```
98
- Since this app implements rack interface, and railr is also a rack based application. We can mount this app direcly inside rails app.
105
+ Since this app implements rack interface, and rails is also a rack based application. We can mount this app direcly inside rails app.
99
106
 
100
107
  ```rb
101
108
  # config/routes.rb
@@ -103,19 +110,101 @@ Since this app implements rack interface, and railr is also a rack based applica
103
110
  require "lib/to/your_webhook"
104
111
 
105
112
  Rails.application.routes.draw do
106
- mount MyAwessomWebhook.new => "telegram_webhook"
113
+ mount MyAwessomWebhook.new => "telegram_webhook"
107
114
  end
108
115
  ```
109
116
 
110
117
  ### Sending Message to Telegram
111
118
  To send message direcly to telegram, we can use this module `TeBot::Wire`
119
+ and need to require `"te_bot/sender_options"` to add default handler for different type of messages.
120
+ Available message types are `:text`, `:markdown`, `:photo`, `:audio`, `:document`, `:video`, `:animation` amd `:voice`
112
121
 
122
+ Some supported message by default:
113
123
  ```rb
114
124
  # app.rb
115
125
  sender = TeBot::Wire.new(ENV['YOUR_ACCESS_TOKEN_HERE'])
116
- sender.send_message(chat_id, message_string)
126
+ sender.send_message(chat_id, text: message_string)
127
+ sender.send_message(chat_id, markdown: markdown_string)
128
+
129
+ sender.send_message(chat_id, photo: { photo: url, caption: caption })
130
+ sender.send_message(chat_id, video: { video: url, caption: caption})
131
+ sender.send_message(chat_id, document: { document: url, caption: caption})
132
+ sender.send_message(chat_id, audio: { audio: url, caption: caption})
133
+ sender.send_message(chat_id, animation: { animation: url, caption: caption})
134
+
135
+ ```
136
+
137
+ For markdown telegram supports MarkdownV2 [refer to this](https://core.telegram.org/bots/api#markdownv2-style)
138
+ Please check the [documentation](https://core.telegram.org/bots/api#sendmessage) for more details.
139
+
140
+ ### Custom Handler
141
+
142
+ Of course you can add more handler by extending the `TeBot::Wire` class
143
+
144
+ ```ruby
145
+ # in/your/custom_handler.rb
146
+
147
+ TeBot::Wire.class_eval do
148
+ sender :json do |chat_id, message|
149
+ make_request("sendMessage", body: { chat_id: chat_id, json: message }.to_json)
150
+ end
151
+ end
152
+ ```
153
+
154
+ ### Helpers
155
+
156
+ Using module
157
+ ```ruby
158
+ # request_helpers.rb
159
+
160
+ module RequestHelpers
161
+ def get_nearest_hospitals
162
+ # do some fancy stuff
163
+ end
164
+
165
+ def get_the_nearest_routes(hospitals)
166
+ # do some even fancier stuff
167
+ end
168
+
169
+ def render_markdown(routes)
170
+ # do something else
171
+ end
172
+ end
173
+
174
+ class MyWebhookApp < TeBot::Court
175
+ include RequestHelpers
176
+
177
+ #... the rest of the code
178
+ end
179
+
180
+ ```
181
+
182
+ Using instance methods
183
+ ```ruby
184
+
185
+ # app.rb
186
+
187
+ class MyWebhookApp < TeBot::Court
188
+ command("/findhospital") do
189
+ hospitals = get_nearest_hospitals(params)
190
+ routes = get_the_nearest_routes(hospitals)
191
+
192
+ reply markdown: render_markdown(routes)
193
+ end
194
+
195
+ def get_nearest_hospitals(data)
196
+ # do some fancy stuff
197
+ end
198
+
199
+ def get_the_nearest_routes(hospitals)
200
+ # do some even fancier stuff
201
+ end
202
+
203
+ def render_markdown(routes)
204
+ # do something else
205
+ end
206
+ end
117
207
  ```
118
- This gem only support [sendMessage](https://core.telegram.org/bots/api#sendmessage) API for this moment.
119
208
 
120
209
  ## Development
121
210
 
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ module TeBot
4
+ module Cable
5
+ def chat_id
6
+ message.data&.chat_id
7
+ end
8
+
9
+ def reply(**payload)
10
+ return if chat_id.nil?
11
+
12
+ wire.send_message chat_id, **payload
13
+ end
14
+ end
15
+ end
data/lib/te_bot/court.rb CHANGED
@@ -5,6 +5,8 @@ require "json"
5
5
 
6
6
  module TeBot
7
7
  class Court
8
+ include TeBot::Cable
9
+
8
10
  class << self
9
11
  attr_reader :wire, :commands
10
12
 
@@ -20,14 +22,6 @@ module TeBot
20
22
  @default_action ||= block
21
23
  end
22
24
 
23
- def reply(conn, message)
24
- send_message(conn.data&.chat_id, message)
25
- end
26
-
27
- def send_message(chat_id, message)
28
- wire.send_message(chat_id, message)
29
- end
30
-
31
25
  def command(text, &block)
32
26
  @commands ||= {}
33
27
  @commands[text] = block
@@ -35,19 +29,40 @@ module TeBot
35
29
 
36
30
  ::TeBot::Message::GENERAL_MESSAGE_TYPES.each do |m|
37
31
  define_method(m) do |&block|
38
- instance_variable_get("@#{m}") || instance_variable_set("@#{m}", block)
39
- instance_variable_get("@#{m}")
32
+ @message_handlers ||= {}
33
+
34
+ if block.respond_to?(:call)
35
+ @message_handlers[m] = block
36
+ else
37
+ @message_handlers[m]
38
+ end
40
39
  end
41
40
  end
41
+
42
+ def message_handlers(handler)
43
+ @message_handlers ||= {}
44
+ @message_handlers[handler]
45
+ end
46
+ end
47
+
48
+ attr_reader :params, :message, :wire
49
+
50
+ def initialize
51
+ @params = {}
52
+ @message = nil
53
+ @command = nil
54
+ @wire = self.class.wire
42
55
  end
43
56
 
44
57
  def call(env)
45
58
  json_only(env) do |body|
46
59
  response = handle_request(body)
47
60
 
48
- if response.is_a?(Array)
49
- status, headers, body = response
50
- [status, headers, body]
61
+ case response
62
+ in [Integer, Hash, Array] => rack_response
63
+ rack_response
64
+ in Hash => json_body
65
+ [200, {"Content-Type" => "application/json"}, [JSON.generate(json_body)]]
51
66
  else
52
67
  [200, {"Content-Type" => "application/json"}, [JSON.generate({"message" => "success"})]]
53
68
  end
@@ -72,32 +87,34 @@ module TeBot
72
87
  end
73
88
 
74
89
  def handle_request(body)
75
- message = ::TeBot::Message.new(body)
90
+ @message = ::TeBot::Message.new(body)
91
+
92
+ @command, @params = @message.data&.content&.parse
76
93
 
77
- message.command do
78
- command, params = message.data.content.parse
79
- handler = self.class.commands[command]
94
+ @params = params
80
95
 
96
+ @message.command do
97
+ handler = self.class.commands[@command]
81
98
  if handler.respond_to?(:call)
82
- handler.call(message, params)
99
+ instance_eval(&handler)
83
100
  elsif self.class.default_command.respond_to?(:call)
84
- self.class.default_command.call(message, params)
101
+ instance_eval(&self.class.default_command)
85
102
  end
86
103
  end
87
104
 
88
- ::TeBot::Message::GENERAL_MESSAGE_TYPES.each do |f|
89
- message.public_send(f) do
90
- handler = self.class.public_send(f)
105
+ ::TeBot::Message::GENERAL_MESSAGE_TYPES.each do |message_type|
106
+ @message.public_send(message_type) do
107
+ handler = self.class.message_handlers(message_type)
91
108
 
92
109
  next unless handler.respond_to?(:call)
93
- handler.call(message)
110
+ instance_eval(&handler)
94
111
  end
95
112
  end
96
113
 
97
- if message.handler.respond_to?(:call)
98
- message.call
114
+ if @message.handler.respond_to?(:call)
115
+ instance_eval(&@message.handler)
99
116
  elsif self.class.default_action.respond_to?(:call)
100
- self.class.default_action.call(message)
117
+ instance_eval(&self.class.default_action)
101
118
  end
102
119
  end
103
120
  end
@@ -17,17 +17,17 @@ module TeBot
17
17
  @message
18
18
  end
19
19
 
20
- MESSAGE_TYPES.each do |format|
21
- define_method(format) do |&block|
22
- instance_variable_set("@#{format}", block)
20
+ MESSAGE_TYPES.each do |f|
21
+ define_method(f) do |&block|
22
+ @formats ||= {}
23
+ @formats[f.to_s] = block
23
24
  end
24
25
  end
25
26
 
26
27
  def handler
27
28
  return unless data || data.content
28
29
  content_class = data.content.class.name.split("::").last.downcase
29
-
30
- instance_variable_get("@#{content_class}")
30
+ @formats[content_class]
31
31
  end
32
32
 
33
33
  def call
@@ -0,0 +1,37 @@
1
+ require_relative "./wire"
2
+ require "json"
3
+
4
+ TeBot::Wire.class_eval do
5
+ sender :text do |chat_id, message|
6
+ make_request("sendMessage", body: {chat_id: chat_id, text: message}.to_json)
7
+ end
8
+
9
+ # this is using MarkdownV2 https://core.telegram.org/bots/api#markdownv2-style
10
+ sender :markdown do |chat_id, message|
11
+ make_request("sendMessage", body: {chat_id: chat_id, text: message, parse_mode: "MarkdownV2"}.to_json)
12
+ end
13
+
14
+ sender :photo do |chat_id, message|
15
+ make_request("sendPhoto", body: message.merge({chat_id: chat_id}).to_json)
16
+ end
17
+
18
+ sender :audio do |chat_id, message|
19
+ make_request("sendAudio", body: message.merge({chat_id: chat_id}).to_json)
20
+ end
21
+
22
+ sender :document do |chat_id, message|
23
+ make_request("sendDocument", body: message.merge({chat_id: chat_id}).to_json)
24
+ end
25
+
26
+ sender :video do |chat_id, message|
27
+ make_request("sendVideo", body: message.merge({chat_id: chat_id}).to_json)
28
+ end
29
+
30
+ sender :animation do |chat_id, message|
31
+ make_request("sendAnimation", body: message.merge({chat_id: chat_id}).to_json)
32
+ end
33
+
34
+ sender :voice do |chat_id, message|
35
+ make_request("sendVoice", body: message.merge({chat_id: chat_id}).to_json)
36
+ end
37
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module TeBot
4
- VERSION = "0.1.0"
4
+ VERSION = "0.4.0"
5
5
  end
data/lib/te_bot/wire.rb CHANGED
@@ -5,24 +5,47 @@ require "faraday/net_http"
5
5
 
6
6
  module TeBot
7
7
  class Wire
8
+ class << self
9
+ def sender(message_format, handler = nil, &block)
10
+ @senders ||= {}
11
+ @senders[message_format] = (block || handler)
12
+ end
13
+
14
+ def senders
15
+ @senders || {}
16
+ end
17
+ end
18
+
8
19
  CONN = Faraday.new(
9
20
  url: "https://api.telegram.org/",
10
21
  headers: {"Content-Type" => "application/json"}
11
22
  )
12
23
 
13
- def url(path)
14
- "/bot#{@access_token}/#{path}"
15
- end
16
-
17
24
  def initialize(access_token)
18
25
  @access_token = access_token
19
26
  end
20
27
 
21
- def send_message(chat_id, message)
22
- CONN.post(url("sendMessage")) do |req|
23
- req.params["chat_id"] = chat_id
24
- req.params["text"] = message
28
+ def make_request(path, params: nil, headers: nil, body: nil)
29
+ CONN.post(url(path)) do |req|
30
+ req.params.merge!(params) if params
31
+ req.headers.merge!(headers) if headers
32
+ req.body = body if body
25
33
  end
26
34
  end
35
+
36
+ def url(path)
37
+ "/bot#{@access_token}/#{path}"
38
+ end
39
+
40
+ def send_message(chat_id, **payload)
41
+ message_format, message = payload.first
42
+ handler = self.class.senders[message_format]
43
+
44
+ raise ArgumentError, "Message type invalid. sender :#{message_format} not defined" if handler.nil?
45
+
46
+ return instance_exec(chat_id, message, &handler) if handler.respond_to?(:call)
47
+
48
+ public_send(handler, chat_id, message)
49
+ end
27
50
  end
28
51
  end
data/lib/te_bot.rb CHANGED
@@ -6,6 +6,7 @@ module TeBot
6
6
  autoload :Court, "te_bot/court.rb"
7
7
  autoload :Wire, "te_bot/wire.rb"
8
8
  autoload :Message, "te_bot/message.rb"
9
+ autoload :Cable, "te_bot/cable.rb"
9
10
 
10
11
  class Error < StandardError; end
11
12
  # Your code goes here...
data/te_bot.gemspec CHANGED
@@ -11,11 +11,11 @@ Gem::Specification.new do |spec|
11
11
  spec.summary = "Self-contaned telegram bot handler."
12
12
  spec.description = "All at one telegram bot."
13
13
  spec.homepage = "https://github.com/aaripurna/te_bot"
14
- spec.required_ruby_version = ">= 2.6.0"
14
+ spec.required_ruby_version = ">= 2.7.0"
15
15
 
16
16
  spec.metadata["homepage_uri"] = spec.homepage
17
17
  spec.metadata["source_code_uri"] = "https://github.com/aaripurna/te_bot"
18
- spec.metadata["changelog_uri"] = "https://github.com/aaripurna/te_bot/blob/main/CHANGELOG.md)"
18
+ spec.metadata["changelog_uri"] = "https://github.com/aaripurna/te_bot/blob/main/CHANGELOG.md"
19
19
 
20
20
  # Specify which files should be added to the gem when it is released.
21
21
  # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
@@ -28,12 +28,6 @@ Gem::Specification.new do |spec|
28
28
  spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
29
29
  spec.require_paths = ["lib"]
30
30
 
31
- # Uncomment to register a new dependency of your gem
32
- # spec.add_dependency "example-gem", "~> 1.0"
33
-
34
31
  spec.add_dependency "rack", "~> 2.2"
35
32
  spec.add_dependency "faraday", "~> 2.3"
36
-
37
- # For more information and examples about making a new gem, check out our
38
- # guide at: https://bundler.io/guides/creating_gem.html
39
33
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: te_bot
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nawa Aripurna
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-06-26 00:00:00.000000000 Z
11
+ date: 2022-08-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rack
@@ -53,8 +53,10 @@ files:
53
53
  - README.md
54
54
  - Rakefile
55
55
  - lib/te_bot.rb
56
+ - lib/te_bot/cable.rb
56
57
  - lib/te_bot/court.rb
57
58
  - lib/te_bot/message.rb
59
+ - lib/te_bot/sender_options.rb
58
60
  - lib/te_bot/version.rb
59
61
  - lib/te_bot/wire.rb
60
62
  - sig/te_bot.rbs
@@ -64,7 +66,7 @@ licenses: []
64
66
  metadata:
65
67
  homepage_uri: https://github.com/aaripurna/te_bot
66
68
  source_code_uri: https://github.com/aaripurna/te_bot
67
- changelog_uri: https://github.com/aaripurna/te_bot/blob/main/CHANGELOG.md)
69
+ changelog_uri: https://github.com/aaripurna/te_bot/blob/main/CHANGELOG.md
68
70
  post_install_message:
69
71
  rdoc_options: []
70
72
  require_paths:
@@ -73,7 +75,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
73
75
  requirements:
74
76
  - - ">="
75
77
  - !ruby/object:Gem::Version
76
- version: 2.6.0
78
+ version: 2.7.0
77
79
  required_rubygems_version: !ruby/object:Gem::Requirement
78
80
  requirements:
79
81
  - - ">="