Sha256: 9045a1d040c861387d50f040a964cba5c7f952383997e460bdc20d498ff4e908

Contents?: true

Size: 693 Bytes

Versions: 23

Compression:

Stored size: 693 Bytes

Contents

# typed: strict

module Kuby
  module Docker
    class CopyPhase < Layer
      extend T::Sig

      DEFAULT_PATHS = T.let(['./'].freeze, T::Array[String])

      sig { returns(T::Array[String]) }
      attr_reader :paths

      sig { params(environment: Environment).void }
      def initialize(environment)
        super
        @paths = T.let([], T::Array[String])
      end

      sig { params(path: String).void }
      def <<(path)
        paths << path
      end

      sig { params(dockerfile: Dockerfile).void }
      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

23 entries across 23 versions & 1 rubygems

Version Path
kuby-core-0.17.0 lib/kuby/docker/copy_phase.rb
kuby-core-0.16.1 lib/kuby/docker/copy_phase.rb
kuby-core-0.16.0 lib/kuby/docker/copy_phase.rb
kuby-core-0.15.0 lib/kuby/docker/copy_phase.rb
kuby-core-0.14.0 lib/kuby/docker/copy_phase.rb
kuby-core-0.13.0 lib/kuby/docker/copy_phase.rb
kuby-core-0.12.0 lib/kuby/docker/copy_phase.rb
kuby-core-0.11.16 lib/kuby/docker/copy_phase.rb
kuby-core-0.11.15 lib/kuby/docker/copy_phase.rb
kuby-core-0.11.14 lib/kuby/docker/copy_phase.rb
kuby-core-0.11.13 lib/kuby/docker/copy_phase.rb
kuby-core-0.11.12 lib/kuby/docker/copy_phase.rb
kuby-core-0.11.11 lib/kuby/docker/copy_phase.rb
kuby-core-0.11.10 lib/kuby/docker/copy_phase.rb
kuby-core-0.11.9 lib/kuby/docker/copy_phase.rb
kuby-core-0.11.8 lib/kuby/docker/copy_phase.rb
kuby-core-0.11.7 lib/kuby/docker/copy_phase.rb
kuby-core-0.11.6 lib/kuby/docker/copy_phase.rb
kuby-core-0.11.4 lib/kuby/docker/copy_phase.rb
kuby-core-0.11.3 lib/kuby/docker/copy_phase.rb