Sha256: bed99e3f1838f688a8a37763651827e82c7bae257d07f99fa95404f738f9ac03

Contents?: true

Size: 634 Bytes

Versions: 3

Compression:

Stored size: 634 Bytes

Contents

class KuberKit::Core::ContextHelper::BaseHelper
  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.2 lib/kuber_kit/core/context_helper/base_helper.rb
kuber_kit-0.1.1 lib/kuber_kit/core/context_helper/base_helper.rb
kuber_kit-0.1.0 lib/kuber_kit/core/context_helper/base_helper.rb