Sha256: 4a9ccf8206a8f35bc22be453eaf2cfbb411f0f6fb6492851baa53c9b971d89e9

Contents?: true

Size: 655 Bytes

Versions: 4

Compression:

Stored size: 655 Bytes

Contents

require 'vx/lib/shell'
require 'stringio'

module Vx
  module Lib
    module Container

      class Local
        Spawner = Struct.new(:work_dir) do
          include Lib::Shell
          include Lib::Container::Upload

          def exec(script, options = {}, &logger)
            Dir.chdir work_dir do
              sh.exec upload(script, "~/build.sh", mode: '0755'), options.merge(home: work_dir)
              sh.exec("~/build.sh", options.merge(home: work_dir), &logger)
            end
          end

          def id
            work_dir
          end

          def properties
            {}
          end

        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
vx-lib-container-0.6.3 lib/vx/lib/container/local/spawner.rb
vx-lib-container-0.6.2 lib/vx/lib/container/local/spawner.rb
vx-lib-container-0.6.1 lib/vx/lib/container/local/spawner.rb
vx-lib-container-0.6.0 lib/vx/lib/container/local/spawner.rb