Commit graph

4 commits

Author SHA1 Message Date
Dominik Richter
37a2e45cd1 bugfix: unindent description misbehaviors
Unindent has been misbehaving for control `desc`riptions by completely removing newlines. This is now fixed and the unindentation mechanism improved to behave as expected.

Removing empty lines at the beginning and end of string remains unchanged.
Tabs are not treated as multi-space indentations; supporting them as 8-space chars would require additional effort (please comment if this is important to you)

Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2017-04-25 13:21:38 +02:00
Steven Danna
9bb65bd60c Use per-profile execution contexts for library loading
Previously, libraries were loaded by instance_eval'ing them against
the same execution context used for control files.  All resources were
registered against a single global registry when the `name` dsl method
was invoked.  To obtain seperation of resources, we would mutate the
instance variable holding the globale registry and then change it back
at the end.

Now, we instance_eval library files inside an anonymous class.  This
class has its own version of `Inspec.resource` that returns another
class with the resource DSL method and the profile-specific resource
registry.
2016-09-04 20:55:20 +02:00
Steven Danna
5fdf659df1 Load all dependent libraries, even if include_context isn't called
The goal of these changes is to ensure that the libraries from
dependencies are loaded even if their controls are never included.  To
facilitate this, we break up the loading into seperate steps, and move
the loading code into the Profile which has acceess to the dependency
information.

Signed-off-by: Steven Danna <steve@chef.io>
2016-09-04 20:55:20 +02:00
Christoph Hartmann
1d8f8bb3e3 restructure unit tests 2016-08-18 13:47:43 +02:00
Renamed from test/unit/control_test.rb (Browse further)