shellter 0.9.0 → 0.9.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/shellter/command.rb +8 -3
- data/lib/shellter/version.rb +1 -1
- metadata +1 -1
data/lib/shellter/command.rb
CHANGED
@@ -13,7 +13,10 @@ module Shellter
|
|
13
13
|
@expected_outcodes ||= [0]
|
14
14
|
|
15
15
|
@command = command
|
16
|
-
@arguments = arguments
|
16
|
+
@arguments = arguments
|
17
|
+
|
18
|
+
@stdout = StringIO.new
|
19
|
+
@stderr = StringIO.new
|
17
20
|
end
|
18
21
|
|
19
22
|
def run(options = {})
|
@@ -22,10 +25,12 @@ module Shellter
|
|
22
25
|
with_interpolated_command(options) do |command|
|
23
26
|
@status = runner.run(command) do |stdout, stderr, stdin, pid|
|
24
27
|
stdin.close
|
25
|
-
@stdout
|
26
|
-
@stderr
|
28
|
+
@stdout.write(stdout.read)
|
29
|
+
@stderr.write(stderr.read)
|
27
30
|
@pid = pid
|
28
31
|
end
|
32
|
+
@stderr.rewind
|
33
|
+
@stdout.rewind
|
29
34
|
end
|
30
35
|
end
|
31
36
|
end
|
data/lib/shellter/version.rb
CHANGED