Sha256: 1e934983c44dadd128d9cb645be366654eb56b483febfee7d058d3038650066c
Contents?: true
Size: 927 Bytes
Versions: 2
Compression:
Stored size: 927 Bytes
Contents
require 'bora/stack' class Bora class Template def initialize(template_name, template_config) @template_name = template_name @template_config = template_config @stacks = {} template_config['stacks'].each do |stack_name, stack_config| stack_name = "#{template_name}-#{stack_name}" stack_config = resolve_stack_config(template_config, stack_config) @stacks[stack_name] = Stack.new(stack_name, template_config['template_file'], stack_config) end end def stack(name) @stacks[name] end def rake_tasks @stacks.each { |_, s| s.rake_tasks } end private def resolve_stack_config(template_config, stack_config) extract_cfn_options(template_config).merge(stack_config) end def extract_cfn_options(config) valid_options = ["capabilities"] config.select { |k| valid_options.include?(k) } end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
bora-1.0.0.beta2 | lib/bora/template.rb |
bora-1.0.0.beta1 | lib/bora/template.rb |