class Kontena::Cli::Stacks::YAML::RegistryLoader

Public Class Methods

match?(source, parent = nil) click to toggle source
# File lib/kontena/cli/stacks/yaml/stack_file_loader/registry_loader.rb, line 4
def self.match?(source, parent = nil)
  source =~ /\A[a-zA-Z0-9\_\.\-]+\/[a-zA-Z0-9\_\.\-]+(?::.*)?\z/ && !FileLoader.match?(source, parent)
end

Public Instance Methods

origin() click to toggle source
# File lib/kontena/cli/stacks/yaml/stack_file_loader/registry_loader.rb, line 12
def origin
  "registry"
end
read_content() click to toggle source
# File lib/kontena/cli/stacks/yaml/stack_file_loader/registry_loader.rb, line 8
def read_content
  Kontena::StacksCache.pull(Kontena::Cli::Stacks::StackName.new(source))
end
registry() click to toggle source
# File lib/kontena/cli/stacks/yaml/stack_file_loader/registry_loader.rb, line 16
def registry
  account = Kontena::Cli::Config.current_account
  raise "Current account not set" if account.nil?
  account.stacks_url
end