Commit graph

2598 commits

Author SHA1 Message Date
Steven Danna
30a23b1b85
Minor code-review change to ControlEvalContext
- Add comment describing describe
- Fixup to_s output to be more accurate

Signed-off-by: Steven Danna <steve@chef.io>
2016-09-05 09:28:50 +01: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
Steven Danna
384ccb610c Initial attempt at isolating resources between dependencies
Previously, all resources were loaded into a single resource registry.
Now, each profile context has a resource registry, when a profile's
library is loaded into the profile context, we update the
profile-context-specific resource registry.  This local registry is
then used to populate the execution context that the rules are
evaluated in.

Signed-off-by: Steven Danna <steve@chef.io>
2016-09-04 20:55:20 +02:00
Christoph Hartmann
a116406b4e Merge pull request #1014 from jeremymv2/fix_apache_conf
Fix apache conf
2016-09-04 20:18:16 +02:00
Jeremy J. Miller
898fe125f2 keep os logic in apache resource 2016-09-04 13:27:14 -04:00
Christoph Hartmann
5bfc234500 Merge pull request #1008 from chef/vj/fix-cli-inherited-profiles
fix cli inherited profiles
2016-09-04 18:51:15 +02:00
Victoria Jeffrey
0667c334e9 fix inherited profile cli report for realz this time 2016-09-04 18:28:01 +02:00
Victoria Jeffrey
99ce09c4ac fix inherited profile cli report 2016-09-04 18:28:01 +02:00
Christoph Hartmann
f418e873df Merge pull request #1012 from chef/ap/mysql-os-fix
Fix os exception in mysql resource
2016-09-04 16:51:19 +02:00
Jeremy J. Miller
d5b2e4bf53 removed testing artifact 2016-09-02 22:04:06 -04:00
Jeremy J. Miller
03cb244e84 removed superflous Listen 80 2016-09-02 22:02:47 -04:00
Jeremy J. Miller
c0d105671e better description for tests 2016-09-02 22:00:12 -04:00
Jeremy J. Miller
1b92d15d8f added unit tests 2016-09-02 21:55:28 -04:00
Jeremy J. Miller
5774dacfea use inspec.os.debian? 2016-09-02 13:57:35 -04:00
Jeremy J. Miller
3919d33ccb fixing apache_conf.conf_dir 2016-09-02 13:44:16 -04:00
Alex Pop
f1b1794ee5 fix os exception 2016-09-02 15:24:50 +01:00
Christoph Hartmann
0ca497e333 Merge pull request #1004 from chef/vj/fix-cli-report
vj/fix cli report
2016-09-02 07:45:32 +01:00
Victoria Jeffrey
5d5aa6354d fix and add test 2016-09-01 20:39:52 -04:00
Victoria Jeffrey
a779d1813d print exception msg for tests in anonymous describe block 2016-09-01 20:39:52 -04:00
Victoria Jeffrey
662de80d1d include status icon in printed tests even when only one 2016-09-01 20:39:52 -04:00
Victoria Jeffrey
1d15e8bc4b only print no tests executed when no tests have been executed 2016-09-01 20:39:52 -04:00
Christoph Hartmann
8616abfe1a Merge pull request #989 from chef/vj/inspec-demo
inspec demo
2016-09-01 23:52:05 +01:00
Christoph Hartmann
9340bc97a7 add generated files for tutorial in gitignore 2016-09-01 22:33:41 +01:00
Victoria Jeffrey
24c30e0603 handle next and prev commands 2016-09-01 22:33:41 +01:00
Victoria Jeffrey
58cf016410 add ability to up-arrow thru commands, a couple css fixes 2016-09-01 22:33:41 +01:00
Victoria Jeffrey
679ae64be2 integrate xterm for shell emulation 2016-09-01 22:33:41 +01:00
Victoria Jeffrey
1ea965080a initial commit 2016-09-01 22:33:41 +01:00
Michał Sochoń
52b5b59b87 Extend Inspec DSL docs (#1006)
Update dsl_inspec.rst
2016-09-01 23:11:10 +02:00
Christoph Hartmann
fea0595890 Merge pull request #1002 from chef/chris-rock/fix-cli-link
fix cli link to docs
2016-09-01 11:25:56 +02:00
Christoph Hartmann
58a1ca595b Merge pull request #1003 from martinheg/support_windows_servicename_with_spaces
Allow service resource to accept Windows service name with spaces
2016-08-31 18:23:49 +02:00
Martin Hegarty
ffee9bd2fc Fix failing unit test 2016-08-31 16:56:23 +01:00
Martin Hegarty
e6eb6d8d36 Allow for windows service name with spaces 2016-08-31 15:01:07 +01:00
Christoph Hartmann
f15c0fefd4 fix cli link to docs 2016-08-31 15:54:28 +02:00
Christoph Hartmann
c3d5772536 Merge pull request #999 from chef/ap/mode-cmp
Promote cmp usage as it provides results with octal mode
2016-08-31 09:57:53 +02:00
Alex Pop
fd676ceb5c promote cmp usage as it provides results with octal mode 2016-08-30 18:23:47 +01:00
Christoph Hartmann
4673dfd90f Merge pull request #991 from jeremymv2/cmp_treat_0_as_integer
cmp not treating 0 as integer only as string
2016-08-30 11:41:25 +02:00
Jeremy J. Miller
3822b8ea3a one more test for good measure 2016-08-29 19:50:03 -04:00
Jeremy J. Miller
0d817017bb changed regex for integer to allow 0 2016-08-29 19:39:39 -04:00
Jeremy J. Miller
53dbaa9c3e add test 2016-08-29 15:57:46 -04:00
Christoph Hartmann
efec6310c8 Merge pull request #987 from chef/ssd/comments
Minor refactor and explanatory comments
2016-08-29 11:35:51 +02:00
Steven Danna
4941ec69fd
Minor refactor and explanatory comments
This is a minor refactor that I did while studying our loading code in
preparation for some deeper changes to how content loading works. The
overall goal of the refactor is to remove a few places where we were
passing a generic options hash and then only accessing a single item.

The comment hopefully clarifies to new developers in the code base how
content loading works at a high level.

Signed-off-by: Steven Danna <steve@chef.io>
2016-08-29 10:23:15 +01:00
Christoph Hartmann
ac40017b55 Merge pull request #988 from chef/ssd/osx-functional
Allow functional tests to pass on OSX
2016-08-26 15:34:59 +02:00
Steven Danna
3a6e610de9 Allow functional tests to pass on OSX
A few minor issues were causing 3 functional test failures on OS X.
These were not program errors but where rather the result of the
profiles under test assuming a linux environment.

Since many of the developers who will work on this project in the future
will be running OS X, let's ensure they can run the functional tests
easily.

Signed-off-by: Steven Danna <steve@chef.io>
2016-08-26 15:25:59 +02:00
Christoph Hartmann
202d4e0f97 0.32.0 2016-08-26 11:45:00 +02:00
Christoph Hartmann
e6aa993472 Merge pull request #986 from chef/ssd/service-doc-reformat
Reformat service resource docs for discoverability
2016-08-26 11:39:14 +02:00
Steven Danna
f9952d922a Reformat service resource docs for discoverability
This makes the service-manager-specific resources stand out a bit more
in the documentation.

Signed-off-by: Steven Danna <steve@chef.io>
2016-08-26 11:23:59 +02:00
Christoph Hartmann
dad99cb91a Merge pull request #983 from chef/chris-rock/ruby-2.2.1
suport for ruby 2.2.2
2016-08-26 11:23:01 +02:00
Christoph Hartmann
49603256ed suport for ruby 2.2.2 2016-08-26 10:57:03 +02:00
Christoph Hartmann
e5c9a7ab1b Merge pull request #985 from chef/ssd/vendor
Generate documentation for the `vendor` command
2016-08-26 10:56:18 +02:00