class Bosh::Director::Core::Templates::CompressedRenderedJobTemplates
Public Class Methods
new(path)
click to toggle source
# File lib/bosh/director/core/templates/compressed_rendered_job_templates.rb, line 9 def initialize(path) @path = path end
Public Instance Methods
contents()
click to toggle source
# File lib/bosh/director/core/templates/compressed_rendered_job_templates.rb, line 23 def contents File.open(@path, 'r') end
sha1()
click to toggle source
# File lib/bosh/director/core/templates/compressed_rendered_job_templates.rb, line 27 def sha1 Digest::SHA1.file(@path).hexdigest end
write(rendered_templates)
click to toggle source
# File lib/bosh/director/core/templates/compressed_rendered_job_templates.rb, line 13 def write(rendered_templates) Dir.mktmpdir do |dir| writer = RenderedTemplatesWriter.new writer.write(rendered_templates, dir) tar_gzipper = Bosh::Director::Core::TarGzipper.new tar_gzipper.compress(dir, %w(.), @path) end end