Sha256: 6db807881509fe1b5a32977042eac693a59c95f47988e3e0bd8c64c5d27f7b20
Contents?: true
Size: 593 Bytes
Versions: 13
Compression:
Stored size: 593 Bytes
Contents
# frozen_string_literal: true context = ChefDK::Generator.context cookbook_dir = File.join(context.cookbook_root, context.cookbook_name) files_dir = File.join(cookbook_dir, 'files', 'default') cookbook_file_path = File.join(cookbook_dir, 'files', 'default', context.new_file_basename) directory files_dir do recursive true end if context.content_source file cookbook_file_path do content(IO.read(context.context_source)) end else template cookbook_file_path do source 'cookbook_file.erb' helpers(ChefDK::Generator::TemplateHelper) end end
Version data entries
13 entries across 13 versions & 1 rubygems