Sha256: 007af1557cd93390dc2bcd64f620e206b20bb7edd2d95690c6cc81df7089f6ca
Contents?: true
Size: 468 Bytes
Versions: 21
Compression:
Stored size: 468 Bytes
Contents
require 'erb' class Indocker::Images::TemplateCompiler def compile(path, context) Indocker.logger.debug("compiling template file #{path}".grey) template = File.read(path) content = ERB.new(template).result(context.helper.get_binding) File.write(path, content) rescue Errno::EACCES => e # do nothing for read only files rescue => e Indocker.logger.error("compilation failed for template file #{path}. #{e.inspect}") raise e end end
Version data entries
21 entries across 21 versions & 1 rubygems