Class: Sevgi::Test::Shell::Runner
- Inherits:
-
Object
- Object
- Sevgi::Test::Shell::Runner
- Defined in:
- lib/sevgi/showcase/minitest/shell.rb
Overview
Adapted to popen3 from github.com/mina-deploy/mina
Instance Method Summary collapse
-
#initialize ⇒ Runner
constructor
A new instance of Runner.
- #run(*args, &block) ⇒ Object
Constructor Details
#initialize ⇒ Runner
Returns a new instance of Runner.
22 23 24 |
# File 'lib/sevgi/showcase/minitest/shell.rb', line 22 def initialize @coathooks = 0 end |
Instance Method Details
#run(*args, &block) ⇒ Object
26 27 28 29 30 31 32 33 |
# File 'lib/sevgi/showcase/minitest/shell.rb', line 26 def run(*args, &block) out, err, status = Open3.popen3(*args) do |stdin, stdout, stderr, thread| inputs(stdin, thread, &block) if block outputs(stdout, stderr, thread) end Result[args, out, err, status.exitstatus] end |