inspec/lib/bundles/inspec-init.rb
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

12 lines
255 B
Ruby

# encoding: utf-8
# author: Christoph Hartmann
# author: Dominik Richter
libdir = File.dirname(__FILE__)
$LOAD_PATH.unshift(libdir) unless $LOAD_PATH.include?(libdir)
module Init
autoload :Profile, 'inspec-init/profile'
end
require 'inspec-init/cli'