inspec/docs
Miah Johnson 75f39e74f2 Refine deprecated methods to be consisten with supported fields in (#2801)
shadow file.

After much thought the deprecations from #2642 were for the wrong methods.

Plural method names feel much more natural when working with this
resource because you can have more than a single result.

Consider a match like `shadow.user(/^www/)`, this could return multiple
users, so `shadow.users` feels more natural here.

The problem is that the fields we're matching in the shadow file itself
are singular. Each entry is for a user, which has a password, and some
other fields. A user never has `passwords` in the shadow file, only a
`password`.

This is made more obvious when you use the `filter` method.

When we use this filter: `shadow.filter(min_days: 20, max_days: 30)` we
are matching fields in the shadow file and not using our matcher
methods. This means that if there is a discrepancy between our matcher
methods, and the shadow fields the user could end up confused. Like I did =)

This PR changes:

Changed matchers to match shadow fields.
Updated documentation to reflect changes.
Updated tests to reflect changes.
Re-add `filter` method, and add a test for it.
Renamed variable for FilterTable to be less confusing.
Renamed query argument for methods to be consistent.
Cleanup docs based on comments from @jerryaldrichiii
Make Rubocop happy <3

Signed-off-by: Miah Johnson <miah@chia-pet.org>
2018-03-08 17:26:08 -05:00
..
resources Refine deprecated methods to be consisten with supported fields in (#2801) 2018-03-08 17:26:08 -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 Corrects capitalization (#2764) 2018-03-05 09:07:06 -05:00
dsl_resource.md fix #1226 2016-11-03 00:32:31 +01:00
glossary.md Adds glossary.md file (#2450) 2018-02-08 10:00:51 +01:00
habitat.md Add docs for habitat CLI commands 2017-03-28 13:59:38 -04:00
inspec_and_friends.md add podcast link to docs on serverspec-inspec 2017-04-25 15:49:56 +02:00
matchers.md Corrects capitalization (#2764) 2018-03-05 09:07:06 -05:00
migration.md Minor grammar fix. 2017-05-07 08:50:58 -04:00
platforms.md edits to platforms doc (#2695) 2018-02-19 23:29:19 +01:00
plugin_kitchen_inspec.md Clean-up kitchen-inspec reference doc (#2208) 2017-10-03 17:25:27 -04:00
profiles.md Corrected name to be service_name (#2262) 2017-10-24 17:51:30 -04:00
README.md generate docs for cli 2016-09-22 13:43:57 +02:00
reporters.md Add reporters reference page (#2617) 2018-02-13 21:27:42 +01:00
ruby_usage.md Corrects capitalization (#2764) 2018-03-05 09:07:06 -05:00
shell.md Updates language for Resource Packs (#2449) 2018-03-01 11:32:55 -05: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