mirror of
https://github.com/inspec/inspec
synced 2024-11-23 05:03:07 +00:00
02cb93ec23
* Refactor 'inspec init profile' into a reusable component. base_cli.rb had several methods used internally, these are exposed so lib/bundles/inspec-init/profile.rb can act as a library for anything that needs to create new Inspec profiles programatically * Move output methods to be public instance methods; and make Init::Profile into a working renderer. Functional tests pass but could use some refactoring to be easier to use. * Refactor, renaming vars to be clearer * Move puts and exit calls into basecli * Add comment about simplified ERB rendering in ruby 2.5.0+ Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com> |
||
---|---|---|
.. | ||
templates/profile | ||
cli.rb | ||
README.md | ||
renderer.rb |
InSpec Extension to create new profiles
This extensions helps you to easily create a new profile
Usage
$ inspec init profile examples/new-profile
Create new profile at /Users/chartmann/Development/compliance/inspec/examples/new-profile
* Create directory controls
* Create file controls/example.rb
* Create file inspec.yml
* Create directory libraries
* Create file README.md
* Create file libraries/.gitkeep
$ inspec check examples/new-profile
Summary
-------
Location: examples/new-profile
Profile: examples/new-profile
Controls: 2
Timestamp: 2016-05-06T14:39:47+02:00
Valid: true
Errors
------
Warnings
--------