Sha256: 6f2440c4855c6e7d356377cbb9e6bb1e1298b58cba73b8d2d0fc0fa679af2f9f

Contents?: true

Size: 497 Bytes

Versions: 1

Compression:

Stored size: 497 Bytes

Contents

require 'specinfra'

module Populus
  class RemoteRunner
    def initialize(backend, &run_it)
      @backend = backend
      instance_exec(&run_it)
    end

    def execute(*command)
      Populus.logger.info("Running command: %s" % command.inspect)

      res = @backend.run_command(command.join(" "))
      Populus.logger.debug("stdout:\n%s" % res.stdout)
      Populus.logger.debug("stderr:\n%s" % res.stderr)
      Populus.logger.info("Command exited: %d" % res.exit_status)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
populus-0.0.3 lib/populus/remote_runner.rb