Commit graph

5066 commits

Author SHA1 Message Date
Chef Expeditor
c647ac9469 Bump version to 2.2.44 by Chef Expeditor 2018-07-25 19:57:27 +00:00
James Stocks
fb0a8989db Add extra fault checking to git fetcher (#3239)
Raise with the stderr from `git ls-remote` if stderr is not empty.
This is useful when inspec runs in CI and you do not have direct control/troublshooting options.

Signed-off-by: James Stocks <jstocks@chef.io>
2018-07-25 15:57:03 -04:00
Christian Nunciato
331d4545ce Add link to cookie policy (#3240)
This change adds a link to the Chef cookie policy, and updates a Chef URL to use https.

Signed-off-by: Christian Nunciato <chris@nunciato.org>
2018-07-25 15:56:01 -04:00
Chef Expeditor
3c0abf7774 Bump version to 2.2.43 by Chef Expeditor 2018-07-25 17:08:23 +00:00
Jared Quick
faf3d1588e
Fix the unit tests by pining to a older openssl cookbook. (#3251)
Signed-off-by: Jared Quick <jquick@chef.io>
2018-07-25 13:08:12 -04:00
Chef Expeditor
b8928aca74 Bump version to 2.2.42 by Chef Expeditor 2018-07-23 08:45:31 +00:00
Masayoshi Takahashi
5dffe9273e update README.md to fix travis and appveyor's badges. (#3244)
Obvious fix.
2018-07-23 10:45:22 +02:00
Jared Quick
b8b9a379a3
Update hab plan for hab 0.56+ (#3241)
Signed-off-by: Jared Quick <jquick@chef.io>
2018-07-20 12:59:15 -04:00
Chef Expeditor
fa385c0b33 Update CHANGELOG.md to reflect the promotion of 2.2.41 2018-07-20 00:34:39 +00:00
Chef Expeditor
9d36e1b61a Bump version to 2.2.41 by Chef Expeditor 2018-07-19 19:07:50 +00:00
Dan Webb
a0fffa5286 Add Alpine package provider (#3215)
- Add Alpine tests
- Stub apk grep command for alpine
- Resolve (disable for now) rubocop ABC/CyclomaticComplexity/PerceivedComplexity

Signed-off-by: Dan Webb <dan.webb@damacus.io>
2018-07-19 15:07:36 -04:00
James Stocks
3b56223a52 Update docs for registry keys with period characters (#3216)
Signed-off-by: James Stocks <jstocks@chef.io>
2018-07-19 15:00:39 -04:00
James Stocks
ca833afacf Generate describe code for an array of strings (#3227)
Context:
When testing a Windows registry key with a period character in it e.g. `explorer.exe` it is not possible to use `its("explorer.exe")` because the period would be interpreted as method chaining.
In this case, you must instead use `its(["explorer", "exe"])`
See https://github.com/inspec/inspec/issues/1281

This commit fixes `to_ruby`in `Inspec::Describe` so that it produces an array in the generated Inspec code instead of a string.

Signed-off-by: James Stocks <jstocks@chef.io>
2018-07-19 15:00:21 -04:00
Kimberly Garmoe
eb87fd384d Markdown and code fence fixes (#3230)
Signed-off-by: kgarmoe <kgarmoe@chef.io>
2018-07-19 14:31:38 -04:00
Chef Expeditor
9581176633 Bump version to 2.2.40 by Chef Expeditor 2018-07-19 12:17:08 +00:00
Miah Johnson
bfd569fe99 Ensure resources fail that target something that isn't supported (#3231)
* Use fail_resource rather than skip_resource when the platform is not
supported by the resource.

* Update tests to handle failing on unsupported platforms.
Update functional tests.

Signed-off-by: Miah Johnson <miah@chia-pet.org>
2018-07-19 08:16:54 -04:00
Chef Expeditor
60177faa24 Bump version to 2.2.39 by Chef Expeditor 2018-07-18 20:55:41 +00:00
Jared Quick
c01ec12947
Update hab to use psql client. (#3234)
Signed-off-by: Jared Quick <jquick@chef.io>
2018-07-18 16:55:19 -04:00
Jerry Aldrich
67405bca66 docs: Fix first xinetd_conf example (#3229)
Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>
2018-07-18 11:29:39 -04:00
Chef Expeditor
d95ccadac7 Bump version to 2.2.38 by Chef Expeditor 2018-07-17 15:42:47 +00:00
Clinton Wolfe
02cb93ec23 Refactor 'inspec init profile' into a reusable component. (#3214)
* Refactor 'inspec init profile' into a reusable component.

base_cli.rb had several methods used internally, these are exposed so
lib/bundles/inspec-init/profile.rb can act as a library for anything
that needs to create new Inspec profiles programatically

* Move output methods to be public instance methods; and make Init::Profile into a working renderer.  Functional tests pass but could use some refactoring to be easier to use.
* Refactor, renaming vars to be clearer
* Move puts and exit calls into basecli
* Add comment about simplified ERB rendering in ruby 2.5.0+

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2018-07-17 11:42:36 -04:00
Jerry Aldrich
82f2340fb0 Add a CODE_OF_CONDUCT.md (#3212)
* Add a CODE_OF_CONDUCT.md
* Add links to the CODE_OF_CONDUCT.md
Also, remove some newlines/line endings.
* Replace broken waffle.io link
* Add Christoph/Dominik to Deciders role
* Add Jared Quick to Advocates
Adding his keybase since he doesn't have Twitter.

Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>
2018-07-17 10:11:58 -04:00
David Schmitt
8f096ec667 Fix shell quoting in docker example (#3225)
This changes the use of `$@` to have double quotes, which avoids double
shell expansion of arguments to the function.

Example:
```
$ function tx { ls $@; }
$ tx a b
ls: cannot access 'a': No such file or directory
ls: cannot access 'b': No such file or directory
$ tx 'a b'
ls: cannot access 'a': No such file or directory
ls: cannot access 'b': No such file or directory
$ function tx { ls "$@"; }
$ tx a b
ls: cannot access 'a': No such file or directory
ls: cannot access 'b': No such file or directory
$ tx 'a b'
ls: cannot access 'a b': No such file or directory
$
```

Observe how in the corrected version the `'a b'` test case (a single
argument with a space inside) is handled correctly, while with the
original version the space is exposed to the shell, and the string
is broken up.

Signed-off-by: David Schmitt <david.schmitt@puppet.com>
2018-07-17 10:10:40 -04:00
Chef Expeditor
fee139bafb Bump version to 2.2.37 by Chef Expeditor 2018-07-16 12:21:12 +00:00
Jerry Aldrich
706493f2f3 command resource: Allow redacting #to_s (#3207)
* command resource: Allow redacting `#to_s`
* Respond to feedback

Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>
2018-07-16 08:20:57 -04:00
Chef Expeditor
409a71b28e Bump version to 2.2.36 by Chef Expeditor 2018-07-13 19:54:25 +00:00
Jerry Aldrich
3ea6780407 docs: Fix formatting/style on InSpec DSL page (#3201)
Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>
2018-07-13 15:54:13 -04:00
Chef Expeditor
186a8cefac Update CHANGELOG.md to reflect the promotion of 2.2.35 2018-07-12 20:50:17 +00:00
Chef Expeditor
54a9b7a97e Bump version to 2.2.35 by Chef Expeditor 2018-07-09 17:57:56 +00:00
Stanislav Voroniy
a16877f427 A number of bug fixes and new features for oracledb_session resource (#3170)
Signed-off-by: Stanislav Voroniy <stas@voroniy.com>
2018-07-09 13:57:45 -04:00
Chef Expeditor
5cb3caf4dc Update CHANGELOG.md to reflect the promotion of 2.2.34 2018-07-05 21:27:22 +00:00
Chef Expeditor
1eb31e1c31 Bump version to 2.2.34 by Chef Expeditor 2018-07-05 20:39:09 +00:00
Stanislav Voroniy
4112085ff7 fix for apache_conf to handle quoted Includes (#3193)
Signed-off-by: Stanislav Voroniy <stas@voroniy.com>
2018-07-05 16:38:58 -04:00
Clinton Wolfe
d0e2608ec3 Overhaul shadow docs (#3156)
* Overhaul shadow docs
* Feedback from stocksy
* Edits to shadow resource
* PR feedback correction
* Attempt to clarify grammar for expiry_date criterion

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2018-07-05 16:15:03 -04:00
Chef Expeditor
eb40d23fb0 Bump version to 2.2.33 by Chef Expeditor 2018-07-05 19:44:41 +00:00
Clinton Wolfe
92e96ebedb Accept regexes for --controls option to inspec exec (#3179)
* Functional tests for regex control selection
* Implementation for regex-based control filtering

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2018-07-05 15:44:30 -04:00
Chef Expeditor
dc0c8b7cc0 Bump version to 2.2.32 by Chef Expeditor 2018-07-05 19:37:28 +00:00
Miah Johnson
a084187b21 When a profile is created with init, the last item after a / is the (#3175)
profile name. eg "with/slash" would result in a profile created in the
"with" directory named "slash"

Add test for inspec init, and updated other for new output.

Clean up profiles created during testing and place them in temporary
directories.

Describe our test a bit better.
Check that the profile was created in the right location.
Check that the profile is named correctly.

Signed-off-by: Miah Johnson <miah@chia-pet.org>
2018-07-05 15:37:18 -04:00
Noel Georgi
6fe13ce1eb Updating inspec with bastion options (#3180)
* Updating inspec with bastion options as per https://github.com/inspec/train/pull/310
* Updating train pin
* Adding --password to pass the test
* Revert "Updating train pin"
* PR changes

Signed-off-by: Noel Georgi <18496730+frezbo@users.noreply.github.com>
2018-07-05 15:37:04 -04:00
Chef Expeditor
b94eec74fe Bump version to 2.2.31 by Chef Expeditor 2018-07-05 18:54:11 +00:00
Jerry Aldrich
b4c5475f26 cli: Add --insecure option for exec and shell (#3195)
* cli: Add `--insecure` option to `exec` and `shell`
* Move `--insecure` to target options

Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>
2018-07-05 14:53:58 -04:00
Chef Expeditor
3fb1108c4d Bump version to 2.2.30 by Chef Expeditor 2018-07-05 18:20:25 +00:00
Jerry Aldrich
a56539bc62 Fix some issues with the vendor functional tests (#3196)
* Sort `Dir.entries` in functional test

Ruby's `Dir.entries` differs between OS's. This ensures the same order
is used when comparing two arrays.

* Remove unused variable `exec_out`

Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>
2018-07-05 14:19:41 -04:00
Chef Expeditor
30acc75ea5 Bump version to 2.2.29 by Chef Expeditor 2018-07-05 17:55:05 +00:00
Miah Johnson
ef6cb0d85b This functional test was validating that a randomly named directory (#3198)
Fix vendor functional test to not validate a repo hash that can change.
2018-07-05 13:54:53 -04:00
Chef Expeditor
58bc7b78a5 Bump version to 2.2.28 by Chef Expeditor 2018-07-05 13:12:30 +00:00
Jared Quick
b31427673c
Update the node platform info to warn if we cannot find something. (#3186)
Signed-off-by: Jared Quick <jquick@chef.io>
2018-07-05 09:12:18 -04:00
Chef Expeditor
f7d63bc46c Update CHANGELOG.md to reflect the promotion of 2.2.27 2018-06-29 13:26:59 +00:00
Chef Expeditor
311b906227 Bump version to 2.2.27 by Chef Expeditor 2018-06-29 12:43:45 +00:00
Clinton Wolfe
2ac5581d32 Document exit codes for 'inspec exec' and add --no-distinct-exit option (#3178)
* Add long description to inspec exec command, mentioning exit codes
* Modify website doc builder code to use long description if available
* Functional test for --distinct-exit flag
* Implement --distinct-exit option
* Inspec shell also needs the option

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2018-06-29 08:43:34 -04:00