Sha256: 0bc9ee2d291b819a10e1458f695875e1125bd340704ad31016560a33784a1363
Contents?: true
Size: 583 Bytes
Versions: 5
Compression:
Stored size: 583 Bytes
Contents
require 'aruba' require 'aruba/processes/spawn_process' require 'aruba/processes/in_process' require 'shellwords' require 'stringio' class CustomMain def initialize(argv, stdin, stdout, stderr, kernel) @argv = argv @stdin = stdin @stdout = stdout @stderr = stderr @kernel = kernel end def execute! @stdout.puts(@argv.map(&:reverse).join(' ')) end end Before('@in-process') do Aruba.process = Aruba::Processes::InProcess Aruba.process.main_class = CustomMain end After('~@in-process') do Aruba.process = Aruba::Processes::SpawnProcess end
Version data entries
5 entries across 5 versions & 1 rubygems