Sha256: 6780bde6b6cfb8809ac557c94eb7d84a4bd51906dc9391df89f2a44e4873bd7e
Contents?: true
Size: 630 Bytes
Versions: 59
Compression:
Stored size: 630 Bytes
Contents
# -*- coding: utf-8 -*- module Specinfra::Backend class Dockerfile < Specinfra::Backend::Base def initialize @lines = [] ObjectSpace.define_finalizer(self) { if Specinfra.configuration.dockerfile_finalizer.nil? puts @lines else Specinfra.configuration.dockerfile_finalizer.call(@lines) end } end def run_command(cmd, opts={}) @lines << "RUN #{cmd}" CommandResult.new end def send_file(from, to) @lines << "ADD #{from} #{to}" CommandResult.new end def from(base) @lines << "FROM #{base}" end end end
Version data entries
59 entries across 59 versions & 1 rubygems