ruboty-evaluate 0.0.1 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ruboty/evaluate/version.rb +1 -1
- data/lib/ruboty/handlers/evaluate.rb +7 -2
- data/ruboty-evaluate.gemspec +0 -2
- metadata +2 -30
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 202e2b59659a061e8622b11601f1bfb54279f166
|
4
|
+
data.tar.gz: 7a7224317c01d3504768ebb6315e0f7072de1629
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c6a383ee35b53c7c0b2efffd6dd836838b3632e1dcf2512dd6e09e877fd112bd81dabbdf166f88e7e696f719f1bf64edf5c397cce69cbcccae5718d7e37ada0c
|
7
|
+
data.tar.gz: 4fb3f613d3efc9c6d213a5afbf3b8ed4ee2b1f2e9df0a1cb5398d3c121b71f8087da1a04db430733c7a135f4d3f0f4ada8d459aca16c18b81de210736ea801ad
|
@@ -5,8 +5,13 @@ module Ruboty
|
|
5
5
|
|
6
6
|
def evaluate(message)
|
7
7
|
thread = Thread.start do
|
8
|
-
|
9
|
-
message.reply(
|
8
|
+
stdout, stderr, status = Open3.capture3(message[:command])
|
9
|
+
message.reply(stdout.chomp) if stdout
|
10
|
+
message.reply(stderr.chomp) if stderr
|
11
|
+
|
12
|
+
unless status.success?
|
13
|
+
message.reply("Command Failed:\n#{message[:command]}", code: true)
|
14
|
+
end
|
10
15
|
end
|
11
16
|
Thread.start do
|
12
17
|
sleep 10
|
data/ruboty-evaluate.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruboty-evaluate
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- kaihar4
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-02-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ruboty
|
@@ -52,34 +52,6 @@ dependencies:
|
|
52
52
|
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
|
-
- !ruby/object:Gem::Dependency
|
56
|
-
name: pry
|
57
|
-
requirement: !ruby/object:Gem::Requirement
|
58
|
-
requirements:
|
59
|
-
- - ">="
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
version: '0'
|
62
|
-
type: :development
|
63
|
-
prerelease: false
|
64
|
-
version_requirements: !ruby/object:Gem::Requirement
|
65
|
-
requirements:
|
66
|
-
- - ">="
|
67
|
-
- !ruby/object:Gem::Version
|
68
|
-
version: '0'
|
69
|
-
- !ruby/object:Gem::Dependency
|
70
|
-
name: awesome_print
|
71
|
-
requirement: !ruby/object:Gem::Requirement
|
72
|
-
requirements:
|
73
|
-
- - ">="
|
74
|
-
- !ruby/object:Gem::Version
|
75
|
-
version: '0'
|
76
|
-
type: :development
|
77
|
-
prerelease: false
|
78
|
-
version_requirements: !ruby/object:Gem::Requirement
|
79
|
-
requirements:
|
80
|
-
- - ">="
|
81
|
-
- !ruby/object:Gem::Version
|
82
|
-
version: '0'
|
83
55
|
description: Ruboty handler to evaluate a command.
|
84
56
|
email:
|
85
57
|
- kaihar4@gmail.com
|