ruboty-response 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ruboty/handlers/response.rb +1 -5
- data/lib/ruboty/response/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9c27e98ec594cb17f7897b1b6bc8441a5a795709
|
4
|
+
data.tar.gz: ab2e345343e71740b81406ada3d96b2f8f2aab0b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 75b390f49208f2cb3cf6b2f21138ee6becddfcefa5c27244863db16e8bb9e40d3b65eace212bbfa9ac276c9732f9213cd938e57b9d4836c7b51fe72efa871314
|
7
|
+
data.tar.gz: 9d489bae34a38cc5bdd994a7195aa2665ed016bc85d04f541af0067df1fdef0d4bd002e7b2b461b2f892ca645dbbcf8737bca2aa35639a476ff3a87b67c5d064
|
@@ -18,13 +18,9 @@ module Ruboty
|
|
18
18
|
# If the response is a code
|
19
19
|
if match_data = hash[:response].match(/\A`(?<code>.+)`\z/)
|
20
20
|
thread = Thread.start do
|
21
|
-
stdout, stderr,
|
21
|
+
stdout, stderr, _status = Open3.capture3(match_data[:code])
|
22
22
|
message.reply(stdout.chomp) if stdout
|
23
23
|
message.reply(stderr.chomp) if stderr
|
24
|
-
|
25
|
-
unless status.success?
|
26
|
-
message.reply("Command Failed:\n#{match_data[:code]}", code: true)
|
27
|
-
end
|
28
24
|
end
|
29
25
|
Thread.start do
|
30
26
|
sleep 10
|