mirror of
https://github.com/inspec/inspec
synced 2024-11-15 01:17:08 +00:00
Enable overwrite mode
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
This commit is contained in:
parent
d54c52a932
commit
6a39ed74a1
1 changed files with 3 additions and 1 deletions
|
@ -9,6 +9,7 @@ module InspecPlugins
|
||||||
desc "resource RESOURCE_NAME [options]", "Generates an InSpec resource, which can extend the scope of InSpec resources support"
|
desc "resource RESOURCE_NAME [options]", "Generates an InSpec resource, which can extend the scope of InSpec resources support"
|
||||||
# General options
|
# General options
|
||||||
option :prompt, type: :boolean, default: true, desc: "Interactively prompt for information to put in your generated resource."
|
option :prompt, type: :boolean, default: true, desc: "Interactively prompt for information to put in your generated resource."
|
||||||
|
option :overwrite, type: :boolean, default: false, desc: "Overwrite existing files"
|
||||||
|
|
||||||
# Templating vars
|
# Templating vars
|
||||||
option :supports_platform, type: :string, default: "linux", desc: "the platform supported by this resource"
|
option :supports_platform, type: :string, default: "linux", desc: "the platform supported by this resource"
|
||||||
|
@ -18,7 +19,7 @@ module InspecPlugins
|
||||||
|
|
||||||
# Wishlist:
|
# Wishlist:
|
||||||
# Make make_rename_map dynamic:
|
# Make make_rename_map dynamic:
|
||||||
# - Add a --path option which defaults to ., which will create the tree under that path
|
# + Add a --path option which defaults to ., which will create the tree under that path
|
||||||
# - Add a --core option which changes all the tree to act as placing the files in core inspec (lib/inspec/resources, docs-chef-io/)
|
# - Add a --core option which changes all the tree to act as placing the files in core inspec (lib/inspec/resources, docs-chef-io/)
|
||||||
# - Add a --plural option which changes the templates to use a set of Filtertable based templates
|
# - Add a --plural option which changes the templates to use a set of Filtertable based templates
|
||||||
# - Add a --inherit option which provides a template for inheriting from the core resources
|
# - Add a --inherit option which provides a template for inheriting from the core resources
|
||||||
|
@ -30,6 +31,7 @@ module InspecPlugins
|
||||||
# Generate functional tests for above proerties and matchers:
|
# Generate functional tests for above proerties and matchers:
|
||||||
# Generate unit tests for above properties and matchers
|
# Generate unit tests for above properties and matchers
|
||||||
# + Generate docs for properties and matchers
|
# + Generate docs for properties and matchers
|
||||||
|
# + Add --overwrite option
|
||||||
|
|
||||||
def resource(resource_name)
|
def resource(resource_name)
|
||||||
resource_vars_from_opts
|
resource_vars_from_opts
|
||||||
|
|
Loading…
Reference in a new issue