Sha256: ca693d151e092bd8069edaa88337ff7dcda7f81eb51d1f984dc4122788a89a99
Contents?: true
Size: 554 Bytes
Versions: 32
Compression:
Stored size: 554 Bytes
Contents
require 'ostruct' require 'base64' require 'shellwords' require 'json' require 'stacco/template' class Stacco::Template::Old class RenderContext < OpenStruct def j(o) o.to_json end end def initialize end def to_json(opts = {}) stack = opts.delete(:stack) vars = stack.config.dup vars['stack'] = stack vars['layers'] = stack.enabled_layers var_binding = RenderContext.new(vars).instance_eval{ binding } JSON.pretty_generate(JSON.parse(Stacco::Resources::StackTemplate.result(var_binding))) end end
Version data entries
32 entries across 32 versions & 1 rubygems