Sha256: 6fad829a5d4a073970ea4d77ae2967d90215adf576af8ccbd485bdedadae2ac4

Contents?: true

Size: 417 Bytes

Versions: 5

Compression:

Stored size: 417 Bytes

Contents

module Kuby
  module Docker
    class CopyPhase < Phase
      DEFAULT_PATHS = ['./'].freeze

      attr_reader :paths

      def initialize(*args)
        super
        @paths = []
      end

      def <<(path)
        paths << path
      end

      def apply_to(dockerfile)
        to_copy = paths.empty? ? DEFAULT_PATHS : paths
        to_copy.each { |path| dockerfile.copy(path, '.') }
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
kuby-core-0.5.0 lib/kuby/docker/copy_phase.rb
kuby-core-0.4.0 lib/kuby/docker/copy_phase.rb
kuby-core-0.3.0 lib/kuby/docker/copy_phase.rb
kuby-core-0.2.0 lib/kuby/docker/copy_phase.rb
kuby-core-0.1.0 lib/kuby/docker/copy_phase.rb