Sha256: 373605e125bacb95fcbc1baa16c62d2ababad7dd826c0c210025a891b9de40c8

Contents?: true

Size: 599 Bytes

Versions: 3

Compression:

Stored size: 599 Bytes

Contents

class KuberKit::ServiceDeployer::ServiceReader
  include KuberKit::Import[
    "core.template_store",
    "core.context_helper_factory",
    "template_reader.reader",
    "preprocessing.text_preprocessor"
  ]

  Contract KuberKit::Shell::AbstractShell, KuberKit::Core::Service => Any
  def read(shell, service)
    template = template_store.get(service.template_name)

    context_helper = context_helper_factory.build_service_context(shell, service)

    template = reader.read(shell, template)

    result = text_preprocessor.compile(template, context_helper: context_helper)

    result
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
kuber_kit-0.1.5 lib/kuber_kit/service_deployer/service_reader.rb
kuber_kit-0.1.4 lib/kuber_kit/service_deployer/service_reader.rb
kuber_kit-0.1.3 lib/kuber_kit/service_deployer/service_reader.rb