Sha256: e02c31330576fd7de2235d3fee22e6bca0d8d8d54542ce1bb403ec978c70862c
Contents?: true
Size: 886 Bytes
Versions: 97
Compression:
Stored size: 886 Bytes
Contents
module Gitlab module QA module Docker class Command attr_reader :args def initialize(cmd = nil) @args = Array(cmd) end def <<(*args) tap { @args.concat(args) } end def volume(from, to, opt = :z) tap { @args.push("--volume #{from}:#{to}:#{opt}") } end def name(identity) tap { @args.push("--name #{identity}") } end def env(name, value) tap { @args.push(%(--env #{name}="#{value}")) } end def to_s "docker #{@args.join(' ')}" end def ==(other) to_s == other.to_s end def execute!(&block) Docker::Shellout.new(self).execute!(&block) end def self.execute(cmd, &block) new(cmd).execute!(&block) end end end end end
Version data entries
97 entries across 97 versions & 1 rubygems