Moved 2 space examples 2 more spaces in. Don't be shy, show the world your code the way it was meant to be seen.
Underscores in markdown must be escaped otherwise the world goes crooked.
Signed-off-by: Franklin Webber <franklin@chef.io>
* New styles
* Fundamental styles for home page
* Legal pages
* Community page, downloads page, tutorials page
* Docs page
* Content toggle and github badge
* Add code - highlighter
* Copy button
* Sliding content animation
* fix particle animatino on downloads page
* Scroll-to-top button
* docs sidebar links
* innocent comments on resources
* Fancy code animation
* Small update to diamond
* whatever slider
* Slider styles
* initial selection if no sliders are there
* add netifly config
Signed-off-by: Christoph Hartmann <chris@lollyrock.com>
* inspec for provisioners
* fix incorrect text on aws ssm
* fix layout javascript
post-rebase
* resource grouping in docs
* introduce groups in docs/resources
* fix minor spelling issues and move download button in new features section
Signed-off-by: Christoph Hartmann <chris@lollyrock.com>
* pass linting
Signed-off-by: Christoph Hartmann <chris@lollyrock.com>
* Removed additional ending brackets } in a few cases
* Removed the belong_to_group
* Cleans white space and addressed a little formatting
Signed-off-by: Franklin Webber <franklin@chef.io>
* Docs for apache resource
Signed-off-by: kgarmoe <kgarmoe@chef.io>
* Add deprecation warning to apache docs and resource, and clean up examples.
Signed-off-by: Adam Leff <adam@leff.co>
* Update apache_conf resource to remove dependency on apache resource
Signed-off-by: Adam Leff <adam@leff.co>
* Make conf_dir method public
Signed-off-by: Adam Leff <adam@leff.co>
* Removes unnecessary aide_conf commit, pulled in from e25f0a45
Signed-off-by: Adam Leff <adam@leff.co>
* Switch to Pathname to calculate conf_dir
Needed to avoid Windows adding `C:\` in unit tests when calling
File.expand_path.
Signed-off-by: Adam Leff <adam@leff.co>
* Fixes the apache_conf Listen property returns an array
The result is an array and not a string even when there is one value.
Signed-off-by: Franklin Webber <franklin@chef.io>
* Updates the apache_conf timeout, allowoverride, and maxclients to include
It seems that all of these values are placed in an array of values so
the matcher needs to be `include`.
Signed-off-by: Franklin Webber <franklin@chef.io>
* Updates docs for apache_conf
* Uses the suggested `cmp` instead of `include`
* Adds the way to properly compare a list of multiple ports
Signed-off-by: Franklin Webber <franklin@chef.io>
This adds support for `architectures` to the `packages` resource.
Example:
```
describe packages(/compat-libstdc++-33/) do
its('architectures') { should include 'x86_64' }
its('architectures') { should include 'i686' }
end
```
This also adds documentation for the `packages` resource
Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>
* adding df resource
Signed-off-by: Vern Burton <me@vernburton.com>
* adding unit tests and required mocks for them, created integration test
Signed-off-by: Vern Burton <me@vernburton.com>
* cleaning up skip test to include only the filename and not full path
Signed-off-by: Vern Burton <me@vernburton.com>
* adding docs
Signed-off-by: Vern Burton <me@vernburton.com>
* size makes more sense than space
Signed-off-by: Vern Burton <me@vernburton.com>
* removing unneeded author lines
Signed-off-by: Vern Burton <me@vernburton.com>
* as the command changed, changing mock to the new sha
Signed-off-by: Vern Burton <me@vernburton.com>
* updating to address comments from #2441
* removing author lines
* using attr_reader functions
* using ruby string functions rather than pipe to sed
* adding os family detection
* using ResourceFailed as the pattern already existed for OS family detection
* using if for future case support for unix and unix-like (FreeBSD)
Signed-off-by: Vern Burton <me@vernburton.com>
* adding supports to resource metadata, and adding tests that show that resource says that it is not supported on windows/unix.
Signed-off-by: Vern Burton <me@vernburton.com>
* focusing on linux os family and removing logic for assumed future cases
Signed-off-by: Vern Burton <me@vernburton.com>
* changing df to filesystem
Signed-off-by: Vern Burton <me@vernburton.com>
This change adds the `docker_service` resource for Docker swarm mode services. This
branches off some of the common elements (id, exists) into a `DockerObject` module along
with a utility function for parsing the image/repo string. That function was implemented
separately by `docker_image` and `docker_container`, now with a third resource, it made
sense to consolidate that into an included module. I used the most comprehensive
implementation. Existing classes had to be slightly modified for the genericization.
Signed-off-by: Matt Kulka <mkulka@parchment.com>
* SMTP example for the ini resource was incorrect and did not work
Obvious fix.
* Fixed documentation and removed semicolons as the ini parser includes those semicolons
Obvious fix.
* adding database.xml with attributes to files and mocking it in the helper.rb
Signed-off-by: Vern Burton <me@vernburton.com>
* adding logic to test class returned by XPATH and using functions from respective classes to fill a array for return, and unit and integration tests to ensure functionality
Signed-off-by: Vern Burton <me@vernburton.com>
* updating docs to show how attributes are used
Signed-off-by: Vern Burton <me@vernburton.com>
* 'and' instead of 'or' makes more sense
Signed-off-by: Vern Burton <me@vernburton.com>
* adding default else for capturing unknown classes from REXML
Signed-off-by: Vern Burton <me@vernburton.com>
* removing extra newline
Signed-off-by: Vern Burton <me@vernburton.com>
* adding fail case with enough information to debug in future case
Signed-off-by: Vern Burton <me@vernburton.com>
* adding control statement to add rule in front of string as long as it doesn't already contain rule.
Correcting resource name in firewalld from etc_hosts_deny
adding tests for both branches of the statement created in firewalld
Signed-off-by: Vern Burton <me@vernburton.com>
* moving to unless with a start_with
Signed-off-by: Vern Burton <me@vernburton.com>
* adding documentation that states that it is not needed to add `rule` string
Signed-off-by: Vern Burton <me@vernburton.com>
When a header includes two `_`s, they must be escaped, otherwise, the
text between the two `_`s is rendered with emphasis. E.g.,
`<h1 id="etchostsallow">etc<em>hosts</em>allow</h1>`
Escaping the `_`s fixes this and the header is rendered properly.
This is a fix for:
* etc_hosts_allow
* etc_hosts_deny
* postgres_hba_conf
* postgres_ident_conf
This change also adds the `h1` title to the windows_hotfix resource
page.
Signed-off-by: Nathen Harvey <nharvey@chef.io>
* Add mode method to test the value of Bonding Mode
Signed-off-by: Eammon Hanlon <eammon.hanlon@microsoft.com>
* Add test for bonding mode in bond unit test
Signed-off-by: Eammon Hanlon <eammon.hanlon@microsoft.com>
* Add documentation on mode matcher for bond resource
Signed-off-by: Eammon Hanlon <eammon.hanlon@microsoft.com>
* Update example for 'Test parameters for bond0'
Signed-off-by: Eammon Hanlon <eammon.hanlon@microsoft.com>
* Fixes usage of 'output' to 'stdout'
* Adds examples for 'exit_status' and 'stderr'
* Modifies the matchers section to point to the command resource
Signed-off-by: Franklin Webber <franklin@chef.io>
* Rewrite of Inspec Azure Resource pack to allow the testing of _any_ value Azure reosurce.
Closes#36Closes#37
This fixes#56 so that it works with the latest version of the SDK. In fact it will only work to version >= 0.15
Signed-off-by: Russell Seymour <russell.seymour@turtlesystems.co.uk>
* Fixes#2343 (Windows file permissions regression)
Signed-off-by: David Alexander <opensource@thelonelyghost.com>
* Updates docs with missing info on `be_allowed()` matcher
Signed-off-by: David Alexander <opensource@thelonelyghost.com>
* remove second end in first describe example, because of wrong syntax
Signed-off-by: Patrick Münch <patrick.muench1111@gmail.com>
* correct style of the examples
Signed-off-by: Patrick Münch <patrick.muench1111@gmail.com>
* Full docs, first draft; integration tests; started on unit tests
* Integration tests pass
* Docs update
* More consistent syntax in examples
* Alter fetch phase to perform fetch, handle results, and unpack into instance vars, more like other resources
* Docs first draft, integration tests, and constructor unit tests for SNS topic
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
* Skeleton of SNS topic
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
* Constructor arg validation works
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
* Passing unit tests for recall
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
* Subscription Count property, works
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
* Subscription, not subscriber
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
* Integration tests pass; also wildard ARNs are not allowed
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
* Rubocop changes
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
* Doc updates per kagarmoe
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
* Add non-halting exception support to resources
This adds two `Inspec::Exceptions` that can be used within resources to
either skip or fail a test without halting execution.
Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>
* Update docs in source to use matcher-style calls, not properties-as-predicates
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
* Main doc file for aws_iam_user
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
* Add documentation for existing resources
This adds documentation for the following resources, including custom matchers:
- aws_ec2_instance
- aws_iam_access_key
- aws_iam_password_policy
- aws_iam_root_user
- aws_iam_users
Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>
* Fix `aws_iam_users` example (Console + No MFA) (#104)
Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>
* Correct copypasta
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
* Remove misleading singular matcher information from the plural docs for aws_iam_users
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
* Correct `aws-iam-userss` typo (#105)
Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>
* Add EC2 instance state info
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
* test commit
Signed-off-by: kgarmoe <kgarmoe@chef.io>
* copy edits
Signed-off-by: kgarmoe <kgarmoe@chef.io>
* Yikes, forgot to save after correcting a merge conflict
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
* Fix the docs for the shadow resource
Inspired by the work in PR #2246
Signed-off-by: Adam Leff <adam@leff.co>
* Fix typo
Signed-off-by: Adam Leff <adam@leff.co>
* Added CRAN resource to check R modules
control 'cran-1' do
impact 1.0
desc '
Ensure R module DBI is installed.
'
describe cpan('DBI') do
it { should be_installed }
its('version') { should cmp >= '3.0' }
end
end
Signed-off-by: Markus Grobelin <grobi@koppzu.de>
* cran resource: made lint happy, added negative unit test, removed unused arg perl_lib_path
Signed-off-by: Markus Grobelin <grobi@koppzu.de>
* Added CPAN resource to check Perl modules
control 'cpan-1' do
impact 1.0
desc '
Ensure Perl modules DBI and DBD::Pg are installed.
'
describe cpan('DBI') do
it { should be_installed }
end
describe cpan('DBD::Pg') do
it { should be_installed }
its('version') { should cmp >= '3.0' }
end
end
Signed-off-by: Markus Grobelin <grobi@koppzu.de>
* cpan resource: fixed unit test for non-installed module
Signed-off-by: Markus Grobelin <grobi@koppzu.de>
* new resource: elasticsearch resource, test cluster/node state
This is a new resource for testing an Elasticsearch cluster. It operates
by fetching the `_nodes` endpoint from a given Elasticsearch node and
collects data about each node in a cluster, even if there's only a
single node.
This work is based on inspiration from an initial PR #1956 submitted by
@rx294.
Signed-off-by: Rony Xavier <rx294@nyu.edu>
Signed-off-by: Aaron Lippold <lippold@gmail.com>
Signed-off-by: Adam Leff <adam@leff.co>
* Reduce mock data on non-default tests
Signed-off-by: Adam Leff <adam@leff.co>