inspec/docs
Clinton Wolfe fefa6c2ecd
Plugin Type: DSLs (#3557)
This PR adds 5 closely related plugin types, which allow a plugin to implement new DSL methods / keywords. The mechanism to activate the plugins are all very similar - basically, in a particular location in the code, `method_missing` is implemented, and is used to activate the particular type of DSL being requested.

4 of the DSL plugin types relate to code that could appear in a profile control file.

* outer_profile_dsl plugins allow you to extend the code in profile Ruby files that appear outside `control` or `describe` blocks.
* control_dsl plugins allow you to extend the code within `control` blocks.
* describe_dsl plugins allow you to extend the code within `describe` blocks.
* test_dsl plugins allow you to extend the code within `it`/`its` blocks.

Finally, the `resource_dsl` plugin allows you to extend the code used within custom resources.

Basic unit tests are provided to prove that the plugin types are properly defined.

A simple plugin fixture defining DSL hooks (based on favorite foods) is included, and is exercised through a set of functional tests.

The plugin developer docs are updated to describe the 5 DSLs.

*Note*: Implementing a plugin using any of the DSL plugin types is experimental.  The contexts that are exposed to the DSL methods are private and poorly documented. The InSpec project does not claim the APIs used by these plugin types are covered by SemVer.  Plugin authors are encouraged to pin tightly to the `inspec` gem in their gemspecs.

Motivation for this plugin comes from the desire to allow passionate community members to implement things like "2 out of 3" tests, example groups, improved serverspec compatibility, "they/their" and other "fluency" changes, as well as make it possible for future work by the InSpec team to be implemented as a core plugin, rather than a direct change to the main codebase.
2018-11-29 14:14:06 -05:00
..
dev Plugin Type: DSLs (#3557) 2018-11-29 14:14:06 -05:00
resources Add SQLcl to Oracledb_session Doc (#3632) 2018-11-27 16:56:49 -05:00
shared fix ident in cmp matcher docs 2017-03-02 12:28:50 +01:00
.gitignore ignore auto-generated docs 2016-09-22 16:47:54 +02:00
dsl_inspec.md Inspec 3.0 (#3512) 2018-10-15 18:25:27 -04:00
dsl_resource.md docs: Update example resource (#2904) 2018-04-05 08:50:49 -04:00
glossary.md Markdown and code fence fixes (#3230) 2018-07-19 14:31:38 -04:00
habitat.md documents inspec habitat profile setup command (#3559) 2018-11-01 13:47:23 -04:00
inspec_and_friends.md Markdown and code fence fixes (#3230) 2018-07-19 14:31:38 -04:00
matchers.md Correct/Enhance cmp matcher examples (#3537) 2018-10-23 16:02:40 -04:00
migration.md Fix typo in some docs (#2841) 2018-03-20 08:43:30 -04:00
platforms.md Inspec 3.0 (#3512) 2018-10-15 18:25:27 -04:00
plugin_kitchen_inspec.md Markdown and code fence fixes (#3230) 2018-07-19 14:31:38 -04:00
plugins.md Plugin Type: DSLs (#3557) 2018-11-29 14:14:06 -05:00
profiles.md Fix rendering of profiles webpage. (#3393) 2018-09-17 17:41:42 -04:00
README.md Bup the release to test new gem builds (#3071) 2018-05-17 20:05:04 -04:00
reporters.md Update UUID documentation (#3612) 2018-11-15 13:19:37 -05:00
shell.md Add additional links to Learn Chef Rally content (#2477) 2018-03-14 11:01:12 -04:00
style.md Fix rendering and other issues in the Style Guide (#3539) 2018-11-01 13:07:02 -04:00

InSpec documentation

This is the home of the InSpec documentation. This documentation provides an introduction to this mechanism and shows how to write custom tests.

The goal of this folder is for any community member to clone these docs, make the changes, check if they are valid, and contribute to the project.

How to build docs

We build docs by:

  1. Auto-generating docs from code
  2. Transforming markdown+snippets in this folder into pure markdown in www/source/docs
  3. Rendering them to the website via instructions in www/

For development, you only need step 1!

1 Generate docs

To generate all docs run:

bundle exec rake docs

You can run tasks individually. For a list of tasks run:

bundle exec rake --tasks docs

Stability Index

Every available InSpec resource will indicate its stability. As InSpec matures, certain parts are more reliable than others. Brand new features are likely to be redesigned and marked as such.

The stability indices are as follows:

  • Stability: Deprecated - This features will be removed in future versions, because its known for being problematic. Do not rely on it.
  • Stability: Experimental - New features may change or are removed in future versions
  • Stability: Stable - API is well established and proofed. Maintaining compatibility is a high priority
  • Stability: Locked - Only security and performance fixes are allowed