class InspecPlugins::ResourcePack::GenerateCLI
Public Instance Methods
resource_pack(new_resource_pack_name)
click to toggle source
# File lib/inspec-resource-pack/cli_command.rb, line 27 def resource_pack(new_resource_pack_name) base_templates_path = File.absolute_path(File.join(__FILE__,'..','..','templates')) resource_pack_template = 'resource_pack' render_opts = { templates_path: base_templates_path, overwrite: options[:overwrite] } renderer = InspecPlugins::Init::Renderer.new(ui, render_opts) vars = { name: new_resource_pack_name } renderer.render_with_values(resource_pack_template, 'resource pack', vars) # ui.exit(:success) # or :usage_error ui.exit end