Sha256: 7dd9a2fa970b32dd924606555f6750552ae66fb121eebc847885340fc777878e

Contents?: true

Size: 672 Bytes

Versions: 3

Compression:

Stored size: 672 Bytes

Contents

class KuberKit::Core::ContextHelper::BaseHelper
  CONTRACT = RespondTo[:get_binding]

  attr_reader :shell, :artifact_store, :image_store

  def initialize(image_store:, artifact_store:, shell:)
    @image_store    = image_store
    @artifact_store = artifact_store
    @shell          = shell
  end

  def image_url(image_name)
    image = @image_store.get_image(image_name)

    image.remote_registry_url
  end

  def artifact_path(name, file_name = nil)
    artifact = @artifact_store.get(name)
    [artifact.cloned_path, file_name].compact.join("/")
  end

  def configuration_name
    KuberKit.current_configuration.name
  end

  def get_binding
    binding
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
kuber_kit-0.1.5 lib/kuber_kit/core/context_helper/base_helper.rb
kuber_kit-0.1.4 lib/kuber_kit/core/context_helper/base_helper.rb
kuber_kit-0.1.3 lib/kuber_kit/core/context_helper/base_helper.rb