Commit graph

4204 commits

Author SHA1 Message Date
Chef Expeditor
cd978deb38 Bump version to 1.49.3 by Expeditor 2018-01-05 20:17:05 +00:00
Jerry Aldrich
8a037b6196 Fix package manager detection on Arch Linux (#2436)
Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>
2018-01-05 21:16:54 +01:00
Chef Expeditor
00b1fda484 Update CHANGELOG.md to reflect the promotion of 1.49.2 to stable 2018-01-04 19:55:26 +00:00
Chef Expeditor
5e0f7fd599 Bump version to 1.49.2 by Expeditor 2018-01-04 19:39:16 +00:00
Dominik Richter
be9ece65b9 load local dependencies in inspec shell (#2438)
* add --depends to inspec shell

for loading dependencies from local folders. mainly used for development.

Signed-off-by: Dominik Richter <dominik.richter@gmail.com>

* lint

Signed-off-by: Dominik Richter <dominik.richter@gmail.com>

* depends is not defined...

Signed-off-by: Dominik Richter <dominik.richter@gmail.com>

* much nicer description for --depends

kudos @adamleff

Signed-off-by: Dominik Richter <dominik.richter@gmail.com>

* add documentation for inspec shell --depends

Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2018-01-04 14:39:01 -05:00
Chef Expeditor
81d763ec0e Bump version to 1.49.1 by Expeditor 2018-01-04 19:15:12 +00:00
Jared Quick
839ab3eef4 Deprecate and warn when comparing against OS name with capitals/spaces (#2397)
* Testing train downcase platform names.
* Added NameCleaned tests and fixed some formatting.
* Clean up tests with helper method.
* Update to new gemfile and platform resource.

Signed-off-by: Jared Quick <jquick@chef.io>
2018-01-04 14:15:02 -05:00
Chef Expeditor
330d522577 Bump version to 1.49.0 by Expeditor 2018-01-04 18:24:00 +00:00
Adam Leff
ec2a4c74cc
Bump minor version and cleanup changelog for release (#2440)
Signed-off-by: Adam Leff <adam@leff.co>
2018-01-04 13:23:47 -05:00
Chef Expeditor
76b581ad24 Bump version to 1.48.14 by Expeditor 2018-01-03 17:10:49 +00:00
Jerry Aldrich
972f3a6486 Modify inspec json to use check_mode (#2435)
This modifies `inspec json` to make it not evaluate code inside of
`only_if` blocks.

Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>
2018-01-03 09:10:35 -08:00
Chef Expeditor
c4d678a1df Bump version to 1.48.13 by Expeditor 2018-01-02 20:41:17 +00:00
Dominik Richter
f1f2900866
bugfix: dependency chaining in libraries (#2428)
* WIP require chaining

* add a tiny comment

* reapply fix doh

* add a deprecation warning

Signed-off-by: Dominik Richter <dominik.richter@gmail.com>

* lint

Signed-off-by: Dominik Richter <dominik.richter@gmail.com>

* remove deprecation warning for require in control files

as discussed with Adam Leff

Signed-off-by: Dominik Richter <dominik.richter@gmail.com>

* add tests for regular ruby gem require in libs

Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2018-01-02 12:41:01 -08:00
Chef Expeditor
b71517ee4b Bump version to 1.48.12 by Expeditor 2018-01-02 19:04:28 +00:00
Jared Quick
10dc5621fb Add platform resource and platform supports (#2393)
* Add platform resource and platform supports.

Signed-off-by: Jared Quick <jquick@chef.io>

* Cache platform and inspec checks and implement inspec_version.

Signed-off-by: Jared Quick <jquick@chef.io>

* Deprecate current inspec support in favor of inspec_version.

Signed-off-by: Jared Quick <jquick@chef.io>

* Update resource/profile skip messages.

Signed-off-by: Jared Quick <jquick@chef.io>

* Update load_resource to use platform instead of os.

Signed-off-by: Jared Quick <jquick@chef.io>

* Update platform example.

Signed-off-by: Jared Quick <jquick@chef.io>
2018-01-02 11:04:13 -08:00
Chef Expeditor
2a187530e5 Bump version to 1.48.11 by Expeditor 2018-01-02 18:12:44 +00:00
Adam Leff
68d78fe535
Fix Docker build in the Expeditor pipeline (#2432)
The new ruby:alpine image already has a /share directory, so our
attempt to create one is breaking the Docker builds. This change
updates the Dockerfile to try to make the /share directory but silently
fail if it's already there.

Signed-off-by: Adam Leff <adam@leff.co>
2018-01-02 13:12:33 -05:00
Chef Expeditor
db9b593998 Bump version to 1.48.10 by Expeditor 2018-01-02 17:27:45 +00:00
Jerry Aldrich
491a1b9968 Fix x509_certificate integration tests (#2431)
An update to the openssl cookbook modified the defaults for `state` and
`city` in the `openssl_x509` resource. That change modified the output
of `issuer_dn` and `subject_dn` in InSpec's `x509_certificate` resource.

This modifies the expected output of the integration tests to match
these new defaults.

Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>
2018-01-02 12:27:30 -05:00
Chef Expeditor
c68043d041 Bump version to 1.48.9 by Expeditor 2017-12-22 16:07:58 +00:00
Miah Johnson
685ba1bc1e Update apache_conf regular expression to exclude whitespace. (#2416)
* Update apache_conf test to check for ServerAlias values.

Signed-off-by: Miah Johnson <miah@chia-pet.org>

* Add ServerAlias key and values to mock apache conf which includes
trailing whitespace.

Signed-off-by: Miah Johnson <miah@chia-pet.org>

* Updated test to reflect all ServerAlias values being put into a single
array item. This is expected as we do not override the key_values
default setting of '1' when passing the raw configuration to
SimpleConfig.

Signed-off-by: Miah Johnson <miah@chia-pet.org>

* Update the regular expression to include a conditional with positive
lookahead that checks if the line ends with one or more spaces. If the
lookahead succeeds we non-greedily capture, and when it fails we
greedily capture.

Signed-off-by: Miah Johnson <miah@chia-pet.org>
2017-12-22 17:07:46 +01:00
Chef Expeditor
d86ebee7bd Bump version to 1.48.8 by Expeditor 2017-12-22 14:03:35 +00:00
Eammon Hanlon
f6c7bffe78 Add bonding mode matcher to bond resource (#2414)
* 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>
2017-12-22 15:02:40 +01:00
Chef Expeditor
b5b2e38b28 Bump version to 1.48.7 by Expeditor 2017-12-22 14:01:30 +00:00
Jerry Aldrich
a3c993fe18 Fix OWCA detection for compliance login (#2401)
* Add handling for OWCA login via `compliance login`

OpsWorks Chef Automate currently returns a 200 for the
`/compliance/version` endpoint and redirects to the Chef Manage page.

This adds support to `inspec compliance login` to accept this as valid
behavior and continue with the login.

Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>

* Add test case for 200 response but no Chef Manage

Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>

* Add debug info and split `determine_server_type`

Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>

* Appease RuboCop

Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>

* Remove forced returns from `determine_server_type`

Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>

* Add `false` code path for non-200/non-401 response

Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>

* Reword debug messages

Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>
2017-12-22 15:01:18 +01:00
Chef Expeditor
1d0eebcadd Bump version to 1.48.6 by Expeditor 2017-12-22 13:58:31 +00:00
David Alexander
3fd310a505 Adds Synchronize permission to windows ACL stuff (#2399)
Obvious fix

Signed-off-by: David Alexander <opensource@thelonelyghost.com>
2017-12-22 14:58:19 +01:00
Adam Leff
777c90e43a docs: fix XML resource example to use alternate syntax (#2395)
Signed-off-by: Adam Leff <adam@leff.co>
2017-12-22 14:56:18 +01:00
Jerry Aldrich
0178602d02 Correct .where usage in passwd documentation (#2419)
Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>
2017-12-21 22:59:20 -05:00
Adam Leff
ff5dbb79cb
Fixing Travis tests due to rvm/bundle issues (#2421)
Signed-off-by: Adam Leff <adam@leff.co>
2017-12-21 22:36:22 -05:00
Franklin Webber
1cd7e1a120 Updates the docs for mysql_session (#2392)
* 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>
2017-12-21 17:06:39 -05:00
Chef Expeditor
9b3c54d493 Bump version to 1.48.5 by Expeditor 2017-12-21 13:21:10 +00:00
Dominik Richter
2f506b3c70 bugfix: default attributes for nil and false (#2410)
Traditionally those would translated DEFAULT_ATTRIBUTE. but that was wrong, it should have been nil or false or whatever the user supplied.

Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2017-12-21 14:20:59 +01:00
Chef Expeditor
6c82d3c56f Bump version to 1.48.4 by Expeditor 2017-12-20 15:57:58 +00:00
Jerry Aldrich
c2a65942d9 Add support for Darwin Directory Service groups (#2403)
* Add support for Darwin Directory Service groups

This allows users to verify groups added by Chef on OS X.

The current method that `UnixGroup` uses is to check the contents of
`/etc/group`, but OS X adds groups to Directory Service and not
`/etc/group`. This modifies the `group` resource on Darwin to use
`dscacheutil` to get group info.

Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>

* Clean up `select_group_manager`

Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>

* Clean up DarwinGroup `groups` method

Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>
2017-12-20 16:57:45 +01:00
Chef Expeditor
f434558f93 Bump version to 1.48.3 by Expeditor 2017-12-15 18:52:53 +00:00
Jerry Aldrich
b17be1a73c Enhance package resource error handling (#2388)
* Enhance `package` resource error handling

This does the following:
  - Modifies `info` to return an empty hash instead of `nil`
  - Adds a failure case if package name is not specified
  - Adds a skip case if no package manager can be found
  - Changes `skip_resource` to use the `ResourceSkipped` exception
  - Raises an error if JSON parsing fails for Windows/MacOS/Darwin

Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>

* Make RuboCop happy

Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>

* Change missing argument behavior

Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>

* Remove unnecessary boolean check

Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>
2017-12-15 19:52:41 +01:00
Seth Chisamore
d468753d8e Update CODEOWNERS file (#2398)
Signed-off-by: Seth Chisamore <schisamo@chef.io>
2017-12-15 11:30:28 -05:00
Chef Expeditor
6000c4ba67 Bump version to 1.48.2 by Expeditor 2017-12-12 16:29:14 +00:00
Adam Leff
9ca69787d5 Split unit tests from functional (#2391)
Functional tests can sometimes be picky. Moving them to their own
matrix item so they're smaller and faster to re-run if needed.

Signed-off-by: Adam Leff <adam@leff.co>
2017-12-12 17:28:46 +01:00
Jared Quick
7c7fab9fb0 Replace exec --cache with --vendor-cache (#2390)
* Move cache cli command to vendor-cache.

Signed-off-by: Jared Quick <jquick@chef.io>

* Rename DEPRECATION to DEPRECATED for cache flag.

Signed-off-by: Jared Quick <jquick@chef.io>
2017-12-12 17:28:07 +01:00
Adam Leff
470582a84e xml resource: update docs with alternate syntax for keys with periods (#2389)
Signed-off-by: Adam Leff <adam@leff.co>
2017-12-12 16:31:50 +01:00
Chef Expeditor
68a934b03b Bump version to 1.48.1 by Expeditor 2017-12-11 20:08:10 +00:00
Andy Boutte
ac5ca9b5bc Added missing quote and removed extra bracket (#2386)
Signed-off-by: Andy Boutte <andy.boutte@reancloud.com>
2017-12-11 15:07:54 -05:00
Adam Leff
a18441f86e Rubocop: disable GuardClause and ClassLength (#2382)
Neither of these cops is helping us write good code, and GuardClause
specifically is actually contributing to us writing sometimes-unclear
code. Disabling both of these cops and removing all unnecessary disable
decorators in the codebase.

Signed-off-by: Adam Leff <adam@leff.co>
2017-12-07 20:22:55 +01:00
Chef Expeditor
10cad48c65 Update CHANGELOG.md to reflect the promotion of 1.48.0 to stable 2017-12-07 18:49:37 +00:00
Chef Expeditor
952b5c152d Bump version to 1.48.0 by Expeditor 2017-12-07 18:21:21 +00:00
Adam Leff
cd51c0c631
Fix changelog categories, bump minor version for release (#2381)
Signed-off-by: Adam Leff <adam@leff.co>
2017-12-07 13:21:09 -05:00
Chef Expeditor
8750589b8f Bump version to 1.47.8 by Expeditor 2017-12-07 15:45:37 +00:00
Chef Expeditor
6560fb1bde Bump version to 1.47.7 by Expeditor 2017-12-07 15:45:04 +00:00