Commit graph

4262 commits

Author SHA1 Message Date
Kimberly Garmoe
73f2eebea5 Refactors docker_image resource (#2518)
Signed-off-by: kagarmoe <kgarmoe@chef.io>
2018-02-02 08:13:04 -05:00
Kimberly Garmoe
288e9f2607 Refactors docker_container resource (#2517)
* Refactors docker_container resource

Signed-off-by: kagarmoe <kgarmoe@chef.io>

* Edits matchers to properties

Signed-off-by: kagarmoe <kgarmoe@chef.io>
2018-02-02 08:10:47 -05:00
Kimberly Garmoe
3e7e806eba Updates cran resource doc (#2512)
Signed-off-by: kagarmoe <kgarmoe@chef.io>
2018-02-02 07:36:36 -05:00
Kimberly Garmoe
d3a2957766 Kg/cpan (#2511)
* Refactors cpan resource doc

Signed-off-by: kagarmoe <kgarmoe@chef.io>

* Copy edit

Signed-off-by: kagarmoe <kgarmoe@chef.io>
2018-02-02 07:35:50 -05:00
Kimberly Garmoe
16325b8a9b Refactors the bridge property (#2505)
Signed-off-by: kagarmoe <kgarmoe@chef.io>
2018-02-01 17:45:33 -05:00
Kimberly Garmoe
c9a226c4ab Refactors 'bash' resource docs page (#2500)
* Refactors 'bash' resource docs page

Signed-off-by: kagarmoe <kgarmoe@chef.io>

* Changes 'exist' description

Signed-off-by: kagarmoe <kgarmoe@chef.io>
2018-02-01 17:44:10 -05:00
Kimberly Garmoe
6ed7616ac9 Refactors bsd_service resource doc (#2507)
Signed-off-by: kagarmoe <kgarmoe@chef.io>
2018-02-01 17:43:16 -05:00
Kimberly Garmoe
66e25fab8d Refactors command resource (#2508)
Signed-off-by: kagarmoe <kgarmoe@chef.io>
2018-02-01 17:42:27 -05:00
Kimberly Garmoe
010ca42b2d Changes 'matcher' to 'property' in examples (#2499)
Signed-off-by: kagarmoe <kgarmoe@chef.io>
2018-02-01 11:51:12 +01:00
Kimberly Garmoe
7dc72c7491 Edits to audit_policy resource language (#2498)
Signed-off-by: kagarmoe <kgarmoe@chef.io>
2018-01-31 07:24:57 -05:00
Kimberly Garmoe
b45b77cd13 Simplifies 'matchers' language in docs (#2496)
Signed-off-by: kagarmoe <kgarmoe@chef.io>
2018-01-31 07:24:16 -05:00
Adam Leff
2ff96d8c9a Web text update for tutorials by Annie Hedgpeth (#2502)
Quick clarification update to the text to ensure it's clear which
tutorials were provided by Annie.

Signed-off-by: Adam Leff <adam@leff.co>
2018-01-31 13:19:02 +01:00
Chef Expeditor
898dc78b48 Bump version to 1.51.4 by Expeditor 2018-01-31 12:02:06 +00:00
Thomas Petchel
1295d27f2f Improve links to Learn Chef Rally (#2476)
* Style div elements beneath list items

Signed-off-by: Thomas Petchel <tpetchel@gmail.com>

* Improve links to Learn Chef Rally

Signed-off-by: tpetchel <tpetchel@gmail.com>
2018-01-31 07:01:55 -05:00
Chef Expeditor
1b6979d362 Bump version to 1.51.3 by Expeditor 2018-01-31 10:16:30 +00:00
Adam Leff
689fe34cc9 apache resource: document and deprecate (#2494)
* 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>
2018-01-31 11:16:15 +01:00
Chef Expeditor
19782770db Bump version to 1.51.2 by Expeditor 2018-01-30 15:33:11 +00:00
Dominik Richter
42ffd874de add Inspec::Describe for abstract describe state (#2010)
Unlike `Inspec::Test` this supports having multiple tests within one block that describes a resource. This has now been seen as an optimization problem where a resource may be computed once and tested multiple times with `it` and `its` within the body.

If successful, it requires a follow-up to deprecated Inspec::Test and remove it for 2.0 completely with a recommendation to use Inspec::Describe.

Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2018-01-30 16:32:56 +01:00
Sebastian Gumprich
3fb671e969 fix typo in readme (#2484)
Obvious fix.
2018-01-29 13:28:28 -05:00
Franklin Webber
2cc446a686 Doc fixes the apache_conf properties returns an array (#2479)
* 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>
2018-01-29 13:03:36 -05:00
Chef Expeditor
f57e2050ca Bump version to 1.51.1 by Expeditor 2018-01-26 07:57:45 +00:00
Jerry Aldrich
d96a6affa7 packages resource: Add architectures support (#2469)
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>
2018-01-25 23:57:34 -08:00
Chef Expeditor
e514b56324 Update CHANGELOG.md to reflect the promotion of 1.51.0 to stable 2018-01-25 20:05:05 +00:00
Chef Expeditor
1d2ecdb884 Bump version to 1.51.0 by Expeditor 2018-01-25 14:29:44 +00:00
Vern Burton
55abdebdc9 filesystem resource: inspect linux filesystems (#2441)
* 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>
2018-01-25 09:29:31 -05:00
Chef Expeditor
3993975797 Bump version to 1.50.6 by Expeditor 2018-01-23 20:35:01 +00:00
Jerry Aldrich
98546984ae service resource: attempt a SysV fallback if SystemD unit file is not found (#2473)
* service resource: Fix no `.service` + systemd bug

This modifies the `enabled?` check to fallback to `sysv_service` in the
event that a `.service` file cannot be found.

For example: On Debian 8.7 the stock apache2 package does not deploy a
`.service` file but deploys a SysV style service. This causes
`systemctl is-enabled` to fail when the service is in fact enabled.

* Remove `cmd_stderr` and clean up `cmd_exit_1`
* Clean up `stderr` assignment using ternary
2018-01-23 12:34:47 -08:00
Chef Expeditor
acf9ce379d Bump version to 1.50.5 by Expeditor 2018-01-23 20:32:33 +00:00
ViolentOr
3c7bace964 Update security_policy resource to return Names, not SIDs (#2462)
* Added possibility to translate SID to human-readable name (using 'translate_sid: true' switch)

Signed-off-by: ViolentOr <github@violentor.me>

* fixed errors

Signed-off-by: ViolentOr <github@violentor.me>

* changed pars to opts

* renameg temp variable

Signed-off-by: ViolentOr <github@violentor.me>

* Required tests added

Signed-off-by: ViolentOr <github@violentor.me>

* fixed mistype

Signed-off-by: ViolentOr <github@violentor.me>

* should not copy-paste.

Signed-off-by: ViolentOr <github@violentor.me>

* replaced empty call with empty file

Signed-off-by: ViolentOr <github@violentor.me>

* tests fixed.

Signed-off-by: ViolentOr <github@violentor.me>

* grouped command mocks related to the security_policy resource

Signed-off-by: ViolentOr <github@violentor.me>

* bacgitend -> backend

Signed-off-by: ViolentOr <github@violentor.me>
2018-01-23 12:31:57 -08:00
Chef Expeditor
6fba1c1997 Bump version to 1.50.4 by Expeditor 2018-01-23 20:30:26 +00:00
Matt Kulka
c067798fc5 Docker Swarm service resource (#2456)
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>
2018-01-23 12:30:14 -08:00
Chef Expeditor
c8dc5a615a Bump version to 1.50.3 by Expeditor 2018-01-22 21:17:50 +00:00
Clinton Wolfe
0d5f6e0a7e Sort library files before loading them so load order is predictable (#2475)
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2018-01-22 14:17:39 -07:00
Markus Grobelin
dee94b6416 pip resource docs: mention custom path to pip as introduced by GH-2097 (#2459)
Signed-off-by: Markus Grobelin <grobi@koppzu.de>
2018-01-19 17:03:00 -05:00
Chef Expeditor
1ec706721d Bump version to 1.50.2 by Expeditor 2018-01-18 21:21:47 +00:00
Jerry Aldrich
944dfdc987 grub_conf resource: fix menuentry detection (#2408)
* Fix `grub_conf` menuentry detection

This does the following:
  - Corrects Grub2 bug where last entry was always selected
  - Adds support for specifying a Grub2 menu entry by name
  - Adds support for using `GRUB_DEFAULT=saved` with Grub2
  - Adds more Unit tests

* Add error if menuentry name cannot be extracted
* Add handling for missing/unreadable grubenv
* Add defensive code for failed menuentry extraction
2018-01-18 13:20:48 -08:00
djenniex-bene
2cfc0acaae SMTP example for the ini resource was incorrect and did not work (#2461)
* 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.
2018-01-17 11:41:33 -08:00
Chef Expeditor
a36d65bdee Update CHANGELOG.md to reflect the promotion of 1.50.1 to stable 2018-01-17 19:03:34 +00:00
Chef Expeditor
22436061d4 Bump version to 1.50.1 by Expeditor 2018-01-17 18:29:22 +00:00
Adam Leff
7fc3339503
Bump version manually to trigger Habitat build (#2466)
Signed-off-by: Adam Leff <adam@leff.co>
2018-01-17 10:29:09 -08:00
Chef Expeditor
d53450ed1d Bump version to 1.50.0 by Expeditor 2018-01-17 18:12:10 +00:00
Adam Leff
869c93b251
Bump minor version (#2465)
Existing changes since last stable release include improvements that
warrant a minor version bump.

Signed-off-by: Adam Leff <adam@leff.co>
2018-01-17 10:11:58 -08:00
Chef Expeditor
ae97fbee86 Bump version to 1.49.10 by Expeditor 2018-01-16 22:31:30 +00:00
Adam Leff
6be9f32448 http resource: make header keys case insensitive (#2457)
* http resource: make header keys case insensitive

HTTP header keys are currently case-sensitive, and the local and remote
workers currently store the keys in different formats due to the
different tools generating them.

This change ensures the ability to fetch headers by key is
case-insensitive and adds a deprecation to inform the user that future
fetches should use all lowercase.

Signed-off-by: Adam Leff <adam@leff.co>

* Remove deprecation treatment

HTTP header keys are case insensitive anyways. There's no reason to make
things harder for our users.

Signed-off-by: Adam Leff <adam@leff.co>
2018-01-16 14:30:35 -08:00
Chef Expeditor
1c7ea3357f Bump version to 1.49.9 by Expeditor 2018-01-16 22:30:00 +00:00
Chef Expeditor
943b810c85 Bump version to 1.49.8 by Expeditor 2018-01-16 22:28:28 +00:00
Adam Leff
c1f57d9875 Bump Omnibus Ruby (and Travis Rubies) to 2.4.3 (#2452)
Addresses CVE-2017-17405.

Signed-off-by: Adam Leff <adam@leff.co>
2018-01-16 14:28:19 -08:00
Jerry Aldrich
7bbe99bbbd package resource: fix NilClass errors on arch linux (#2437)
* Fix `nil:NilClass` error for `package` resource

This modifies `.info` to return `{}` in cases where the package manager
cannot be determined. This matches the behavior of `@pkgman.info`.

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

* Change `must_be_empty` to `must_equal({})`

Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>
2018-01-16 14:27:31 -08:00
Chef Expeditor
61a012bd8d Bump version to 1.49.7 by Expeditor 2018-01-16 22:26:53 +00:00
Vern Burton
175c3e1189 xml resource: support fetching attributes (#2423)
* 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>
2018-01-16 14:26:39 -08:00