class Chef::Knife::HelperInit
Public Instance Methods
run()
click to toggle source
# File lib/chef/knife/helper_init.rb, line 50 def run create_helper_yml create_knife_rb create_berks if config[:use_berks] create_librarian if config[:use_librarian] end
Private Instance Methods
create_berks()
click to toggle source
# File lib/chef/knife/helper_init.rb, line 74 def create_berks ::Knife::Helper::Template.new("Berksfile.erb", "Berksfile").flush end
create_helper_yml()
click to toggle source
# File lib/chef/knife/helper_init.rb, line 59 def create_helper_yml command_base = config[:use_bundle] ? "bundle exec knife" : $0 ::Knife::Helper::Template.new("helper.yml.erb", ".knife.helper.yml", :command_base => command_base ).flush end
create_knife_rb()
click to toggle source
# File lib/chef/knife/helper_init.rb, line 66 def create_knife_rb ::Knife::Helper::Template.new("knife.rb.erb", ".chef/knife.rb", :local_mode => config[:use_local_mode].to_s, :cookbook_path => config[:cookbook_path].split(',').to_s, :repo_path => "\"#{config[:repo_path]}\"" ).flush end
create_librarian()
click to toggle source
# File lib/chef/knife/helper_init.rb, line 78 def create_librarian ::Knife::Helper::Template.new("Cheffile.erb", "Cheffile").flush end