Class: Kontena::Cli::Stacks::YAML::UriLoader
Instance Attribute Summary
#parent, #source
Class Method Summary
collapse
Instance Method Summary
collapse
#content, #dependencies, #flat_dependencies, for, inherited, #initialize, #inspect, loaders, #reader, #stack_name, #to_h, #yaml
Class Method Details
.match?(source, parent = nil) ⇒ Boolean
4
5
6
|
# File 'lib/kontena/cli/stacks/yaml/stack_file_loader/uri_loader.rb', line 4
def self.match?(source, parent = nil)
source.include?('://') && !FileLoader.match?(source, parent)
end
|
Instance Method Details
#origin ⇒ Object
14
15
16
|
# File 'lib/kontena/cli/stacks/yaml/stack_file_loader/uri_loader.rb', line 14
def origin
"uri"
end
|
#read_content ⇒ Object
8
9
10
11
12
|
# File 'lib/kontena/cli/stacks/yaml/stack_file_loader/uri_loader.rb', line 8
def read_content
require 'open-uri'
stream = open(source)
stream.read
end
|
#registry ⇒ Object
18
19
20
|
# File 'lib/kontena/cli/stacks/yaml/stack_file_loader/uri_loader.rb', line 18
def registry
"file://"
end
|