Sha256: 9461c4bff8a9d1f24c380156af03765ca02f25c1d8b968a1e52da154b785f2fd

Contents?: true

Size: 939 Bytes

Versions: 162

Compression:

Stored size: 939 Bytes

Contents

# frozen_string_literal: true

require 'eac_docker/debug'
require 'eac_docker/executables'
require 'eac_docker/images/base'
require 'eac_ruby_utils/core_ext'

module EacDocker
  module Images
    class Coded < ::EacDocker::Images::Base
      enable_simple_cache
      enable_immutable
      immutable_accessor :tag
      common_constructor :path do
        self.path = path.to_pathname
      end

      def immutable_constructor_args
        [path]
      end

      def provide
        id
        self
      end

      private

      def id_uncached
        if ::EacDocker::Debug.enabled?
          ::EacDocker::Executables.docker.command(*build_args.excluding('--quiet')).system!
        end
        ::EacDocker::Executables.docker.command(*build_args).execute!.strip
      end

      def build_args
        args = %w[build --quiet]
        args += ['--tag', tag] if tag.present?
        args + [path.to_path]
      end
    end
  end
end

Version data entries

162 entries across 162 versions & 4 rubygems

Version Path
eac_tools-0.76.1 sub/eac_docker/lib/eac_docker/images/coded.rb
eac_tools-0.76.0 sub/eac_docker/lib/eac_docker/images/coded.rb
eac_tools-0.75.2 sub/eac_docker/lib/eac_docker/images/coded.rb
eac_tools-0.75.1 sub/eac_docker/lib/eac_docker/images/coded.rb
eac_tools-0.75.0 sub/eac_docker/lib/eac_docker/images/coded.rb
eac_tools-0.74.1 sub/eac_docker/lib/eac_docker/images/coded.rb
eac_tools-0.74.0 sub/eac_docker/lib/eac_docker/images/coded.rb
eac_tools-0.73.0 sub/eac_docker/lib/eac_docker/images/coded.rb
eac_tools-0.72.0 sub/eac_docker/lib/eac_docker/images/coded.rb
eac_tools-0.70.1 sub/eac_docker/lib/eac_docker/images/coded.rb
eac_tools-0.70.0 sub/eac_docker/lib/eac_docker/images/coded.rb
eac_tools-0.69.1 sub/eac_docker/lib/eac_docker/images/coded.rb
eac_tools-0.69.0 sub/eac_docker/lib/eac_docker/images/coded.rb
eac_tools-0.68.0 sub/eac_docker/lib/eac_docker/images/coded.rb
eac_tools-0.67.1 sub/eac_docker/lib/eac_docker/images/coded.rb
eac_tools-0.67.0 sub/eac_docker/lib/eac_docker/images/coded.rb
eac_tools-0.66.0 sub/eac_docker/lib/eac_docker/images/coded.rb
eac_tools-0.65.1 sub/eac_docker/lib/eac_docker/images/coded.rb
eac_tools-0.65.0 sub/eac_docker/lib/eac_docker/images/coded.rb
eac_tools-0.64.0 sub/eac_docker/lib/eac_docker/images/coded.rb