Sha256: de7e26d82d4e8cf54bbb7b7313212f1aefe4f9929c6335d172fbd263a816dfe6

Contents?: true

Size: 391 Bytes

Versions: 20

Compression:

Stored size: 391 Bytes

Contents

module BigBrother
  class ShellExecutor
    def invoke(command)
      BigBrother.logger.info("Running command: #{command.inspect}")
      _system(command)
    end

    def _system(command)
      current_fiber = Fiber.current

      EventMachine.system(command) do |output, status|
        current_fiber.resume(output, status.exitstatus)
      end

      return Fiber.yield
    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
big_brother-0.8.8.1 lib/big_brother/shell_executor.rb
big_brother-0.8.8 lib/big_brother/shell_executor.rb
big_brother-0.8.7 lib/big_brother/shell_executor.rb
big_brother-0.6.8 lib/big_brother/shell_executor.rb
big_brother-0.6.7 lib/big_brother/shell_executor.rb
big_brother-0.6.6 lib/big_brother/shell_executor.rb
big_brother-0.6.5 lib/big_brother/shell_executor.rb
big_brother-0.6.4 lib/big_brother/shell_executor.rb
big_brother-0.6.3 lib/big_brother/shell_executor.rb
big_brother-0.6.2 lib/big_brother/shell_executor.rb
big_brother-0.6.1 lib/big_brother/shell_executor.rb
big_brother-0.6.0 lib/big_brother/shell_executor.rb
big_brother-0.5.0 lib/big_brother/shell_executor.rb
big_brother-0.4.1 lib/big_brother/shell_executor.rb
big_brother-0.4.0 lib/big_brother/shell_executor.rb
big_brother-0.3.1 lib/big_brother/shell_executor.rb
big_brother-0.3.0 lib/big_brother/shell_executor.rb
big_brother-0.2.1 lib/big_brother/shell_executor.rb
big_brother-0.2.0 lib/big_brother/shell_executor.rb
big_brother-0.1.0 lib/big_brother/shell_executor.rb