Sha256: 91579501c5c36f9caacf319b96463a075e25f575903b77b90c58ac55958b2954

Contents?: true

Size: 618 Bytes

Versions: 30

Compression:

Stored size: 618 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")

provider_dir = File.join(cookbook_dir, "providers")
provider_path = File.join(provider_dir, "#{context.new_file_basename}.rb")

directory resource_dir

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

directory provider_dir

template provider_path do
  source "provider.rb.erb"
  helpers(ChefDK::Generator::TemplateHelper)
end

Version data entries

30 entries across 28 versions & 2 rubygems

Version Path
chef-dk-1.2.22 lib/chef-dk/skeletons/code_generator/recipes/lwrp.rb
chef-dk-1.2.20 lib/chef-dk/skeletons/code_generator/recipes/lwrp.rb
chef-dk-1.1.16 lib/chef-dk/skeletons/code_generator/recipes/lwrp.rb
chef-dk-1.0.3 lib/chef-dk/skeletons/code_generator/recipes/lwrp.rb
chef-dk-0.19.6 lib/chef-dk/skeletons/code_generator/recipes/lwrp.rb
chef-dk-0.18.30 lib/chef-dk/skeletons/code_generator/recipes/lwrp.rb
chef-dk-0.18.26 lib/chef-dk/skeletons/code_generator/recipes/lwrp.rb
chef-dk-0.17.17 lib/chef-dk/skeletons/code_generator/recipes/lwrp.rb
chef-dk-0.16.28 lib/chef-dk/skeletons/code_generator/recipes/lwrp.rb
chef-dk-0.14.25 lib/chef-dk/skeletons/code_generator/recipes/lwrp.rb
chef-dk-0.11.2 lib/chef-dk/skeletons/code_generator/recipes/lwrp.rb
chef-dk-0.11.0 lib/chef-dk/skeletons/code_generator/recipes/lwrp.rb
cookbook_creator-0.0.3 lib/cookbook_creator/skeletons/code_generator/recipes/lwrp.rb
cookbook_creator-0.0.3 lib/skeletons/code_generator/recipes/lwrp.rb
cookbook_creator-0.0.2 lib/cookbook_creator/skeletons/code_generator/recipes/lwrp.rb
cookbook_creator-0.0.2 lib/skeletons/code_generator/recipes/lwrp.rb
chef-dk-0.10.0 lib/chef-dk/skeletons/code_generator/recipes/lwrp.rb
chef-dk-0.8.0 lib/chef-dk/skeletons/code_generator/recipes/lwrp.rb
chef-dk-0.7.0 lib/chef-dk/skeletons/code_generator/recipes/lwrp.rb
chef-dk-0.6.2 lib/chef-dk/skeletons/code_generator/recipes/lwrp.rb