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