kybus-bot 0.4.4 → 0.4.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/kybus/bot/adapters/debug.rb +2 -1
- data/lib/kybus/bot/test.rb +32 -0
- data/lib/kybus/bot/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d09b1584001474f51cbe4085e6755ebc11b60aa24b1eef8bf9c8a9b574761148
|
4
|
+
data.tar.gz: 004db2811733eb668e6206f1d010be444c91eea4f3e5ccd7af439236fa1e167a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 375b62ad3c9beedce1f47cef05ab80acf6ff22365ecf82c685a5f61de50d68bff5c08e0acac12d9f387e18d9c3a0fdef1ca27e294a106e7b78cc186294eb84a4
|
7
|
+
data.tar.gz: 88bed84b3baba6dfadefe2536678b3308e9f1db923bba4baa8795ce52fe5050fa2540711209d0abc10fe33160db863dfd0704e36c773735e9f6f09ab4c7e4e7e
|
@@ -8,9 +8,10 @@ module Kybus
|
|
8
8
|
# Wraps a debugging message inside a class.
|
9
9
|
class DebugMessage < Kybus::Bot::Message
|
10
10
|
# It receives a string with the raw text and the id of the channel
|
11
|
-
def initialize(text, channel)
|
11
|
+
def initialize(text, channel, attachments = {})
|
12
12
|
@text = text
|
13
13
|
@channel = channel
|
14
|
+
@attachments = attachments
|
14
15
|
end
|
15
16
|
|
16
17
|
# Returns the channel id
|
@@ -0,0 +1,32 @@
|
|
1
|
+
require_relative 'base'
|
2
|
+
require_relative 'adapters/debug'
|
3
|
+
|
4
|
+
module Kybus
|
5
|
+
module Bot
|
6
|
+
class Base
|
7
|
+
CONFIG = {
|
8
|
+
'name' => 'test',
|
9
|
+
'state_repository' => {
|
10
|
+
'name' => 'json',
|
11
|
+
'storage' => 'storage'
|
12
|
+
},
|
13
|
+
'pool_size' => 1,
|
14
|
+
'provider' => {
|
15
|
+
'name' => 'debug',
|
16
|
+
'echo' => true,
|
17
|
+
'channels' => { 'testing' => [] }
|
18
|
+
}
|
19
|
+
}.freeze
|
20
|
+
|
21
|
+
def self.make_test_bot
|
22
|
+
new(CONFIG)
|
23
|
+
end
|
24
|
+
|
25
|
+
def receives(msg, attachments = {})
|
26
|
+
msg = ::Kybus::Bot::Adapter::DebugMessage.new(msg, 'testing', attachments)
|
27
|
+
@last_message = msg
|
28
|
+
process_message(msg)
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
data/lib/kybus/bot/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kybus-bot
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gilberto Vargas
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-01-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: kybus-core
|
@@ -222,6 +222,7 @@ files:
|
|
222
222
|
- lib/kybus/bot/command_definition.rb
|
223
223
|
- lib/kybus/bot/message.rb
|
224
224
|
- lib/kybus/bot/migrator.rb
|
225
|
+
- lib/kybus/bot/test.rb
|
225
226
|
- lib/kybus/bot/testing.rb
|
226
227
|
- lib/kybus/bot/version.rb
|
227
228
|
homepage: https://github.com/tachomex/kybus
|