inspec/lib/bundles/inspec-init
Clinton Wolfe 02cb93ec23 Refactor 'inspec init profile' into a reusable component. (#3214)
* 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>
2018-07-17 11:42:36 -04:00
..
templates/profile Updates the year to 2018 (#2686) 2018-02-18 09:16:15 -05:00
cli.rb Refactor 'inspec init profile' into a reusable component. (#3214) 2018-07-17 11:42:36 -04:00
README.md update readme for bundles 2016-06-29 08:14:36 +02:00
renderer.rb Refactor 'inspec init profile' into a reusable component. (#3214) 2018-07-17 11:42:36 -04:00

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
--------