Sha256: fcb296ff28246423e8cc1a2153759a9042a5b8018df01a469ffb4331907fd176

Contents?: true

Size: 362 Bytes

Versions: 16

Compression:

Stored size: 362 Bytes

Contents

context = ChefDK::Generator.context
cookbook_dir = File.join(context.cookbook_root, context.cookbook_name)

resource_dir = File.join(cookbook_dir, 'resources')
resource_path = File.join(resource_dir, "#{context.new_file_basename}.rb")

directory resource_dir

template resource_path do
  source 'resource.rb.erb'
  helpers(ChefDK::Generator::TemplateHelper)
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
chef-dk-4.13.3 lib/chef-dk/skeletons/code_generator/recipes/resource.rb
chef-dk-4.12.0 lib/chef-dk/skeletons/code_generator/recipes/resource.rb
chef-dk-4.11.0 lib/chef-dk/skeletons/code_generator/recipes/resource.rb
chef-dk-4.10.0 lib/chef-dk/skeletons/code_generator/recipes/resource.rb
chef-dk-4.9.7 lib/chef-dk/skeletons/code_generator/recipes/resource.rb
chef-dk-4.7.73 lib/chef-dk/skeletons/code_generator/recipes/resource.rb
chef-dk-3.13.1 lib/chef-dk/skeletons/code_generator/recipes/resource.rb
chef-dk-4.6.35 lib/chef-dk/skeletons/code_generator/recipes/resource.rb
chef-dk-3.12.10 lib/chef-dk/skeletons/code_generator/recipes/resource.rb
chef-dk-3.12.0 lib/chef-dk/skeletons/code_generator/recipes/resource.rb
chef-dk-4.5.0 lib/chef-dk/skeletons/code_generator/recipes/resource.rb
chef-dk-4.4.27 lib/chef-dk/skeletons/code_generator/recipes/resource.rb
chef-dk-4.3.13 lib/chef-dk/skeletons/code_generator/recipes/resource.rb
chef-dk-4.2.0 lib/chef-dk/skeletons/code_generator/recipes/resource.rb
chef-dk-4.1.7 lib/chef-dk/skeletons/code_generator/recipes/resource.rb
chef-dk-4.0.60 lib/chef-dk/skeletons/code_generator/recipes/resource.rb