Sha256: 9afeb6537f93ad737a6bd7503d8800f5f180220244ab575810ee8992a8841bd3

Contents?: true

Size: 595 Bytes

Versions: 29

Compression:

Stored size: 595 Bytes

Contents

module Kontena::Cli::Stacks
  module YAML
    class RegistryLoader < StackFileLoader
      def self.match?(source, parent = nil)
        source =~ /\A[a-zA-Z0-9\_\.\-]+\/[a-zA-Z0-9\_\.\-]+(?::.*)?\z/ && !FileLoader.match?(source, parent)
      end

      def read_content
        Kontena::StacksCache.pull(Kontena::Cli::Stacks::StackName.new(source))
      end

      def origin
        "registry"
      end

      def registry
        account = Kontena::Cli::Config.current_account
        raise "Current account not set" if account.nil?
        account.stacks_url
      end
    end
  end
end

Version data entries

29 entries across 29 versions & 2 rubygems

Version Path
krates-1.7.11 lib/kontena/cli/stacks/yaml/stack_file_loader/registry_loader.rb
krates-1.7.10 lib/kontena/cli/stacks/yaml/stack_file_loader/registry_loader.rb
krates-1.7.9 lib/kontena/cli/stacks/yaml/stack_file_loader/registry_loader.rb
krates-1.7.8 lib/kontena/cli/stacks/yaml/stack_file_loader/registry_loader.rb
krates-1.7.7 lib/kontena/cli/stacks/yaml/stack_file_loader/registry_loader.rb
krates-1.7.6 lib/kontena/cli/stacks/yaml/stack_file_loader/registry_loader.rb
krates-1.7.5 lib/kontena/cli/stacks/yaml/stack_file_loader/registry_loader.rb
krates-1.7.4 lib/kontena/cli/stacks/yaml/stack_file_loader/registry_loader.rb
krates-1.7.3 lib/kontena/cli/stacks/yaml/stack_file_loader/registry_loader.rb
krates-1.7.2 lib/kontena/cli/stacks/yaml/stack_file_loader/registry_loader.rb
krates-1.7.1 lib/kontena/cli/stacks/yaml/stack_file_loader/registry_loader.rb
krates-1.7.0 lib/kontena/cli/stacks/yaml/stack_file_loader/registry_loader.rb
krates-1.6.9 lib/kontena/cli/stacks/yaml/stack_file_loader/registry_loader.rb
krates-1.6.8 lib/kontena/cli/stacks/yaml/stack_file_loader/registry_loader.rb
krates-1.6.7 lib/kontena/cli/stacks/yaml/stack_file_loader/registry_loader.rb
krates-1.6.6 lib/kontena/cli/stacks/yaml/stack_file_loader/registry_loader.rb
krates-1.6.5 lib/kontena/cli/stacks/yaml/stack_file_loader/registry_loader.rb
krates-1.6.4 lib/kontena/cli/stacks/yaml/stack_file_loader/registry_loader.rb
krates-1.6.3 lib/kontena/cli/stacks/yaml/stack_file_loader/registry_loader.rb
krates-1.6.2 lib/kontena/cli/stacks/yaml/stack_file_loader/registry_loader.rb