Commit graph

4102 commits

Author SHA1 Message Date
Adam Leff
4b9acb4800 Bump Rubocop to 0.49.1 (#2323)
* Bump Rubocop to 0.49.1

This change bumps Rubocop to 0.49.1. There have been a lot of changes
since 0.39.0 and this PR is hopefully a nice compromise of turning off
certain cops and updating our codebase to take advantage of new Ruby
2.3 methods and operators.

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

* Set end-of-line format to line-feed only, avoid Windows-related CRLF issues

Signed-off-by: Adam Leff <adam@leff.co>
2017-11-21 08:49:41 +01:00
Chef Expeditor
b9b502a48d Bump version to 1.45.11 by Expeditor 2017-11-20 18:11:52 +00:00
Adam Leff
935c56394f Remove bundler install during Appveyor tests (#2322)
It appears that the Appveyor images changed recently and the Ruby
installs for all version (2.2, 2.3, and 2.4) already include Bundler
installed. Attempting to install it will hang the tests at an
interactive prompt asking if you want to override the install, and
--force'ing the install causes path issues and Rubygems won't be able
to activate the gem.

Removing the bundler install appears to solve the problem nicely.

Signed-off-by: Adam Leff <adam@leff.co>
2017-11-20 19:11:43 +01:00
Adam Leff
0e8eccfa9b Add clarification to INI resource re: settings in sections (#2320)
Signed-off-by: Adam Leff <adam@leff.co>
2017-11-20 13:08:51 +01:00
dragon788
a1672dac28 Fix minor typo (#2319)
Amazingly doesn't appear anywhere else in the codebase from a brief search.

Obvious fix.
2017-11-17 16:47:45 -05:00
Chef Expeditor
03099d51dc Bump version to 1.45.10 by Expeditor 2017-11-17 20:56:44 +00:00
eramoto
a948900f88 Remove meaningless stdout message (#2313)
Stops to output the meaningless message to standard output when testing.
Obvious fix.

Signed-off-by: ERAMOTO Masaya <eramoto.masaya@jp.fujitsu.com>
2017-11-17 15:56:36 -05:00
Chef Expeditor
65df85b24e Update CHANGELOG.md to reflect the promotion of 1.45.9 to stable 2017-11-16 17:25:19 +00:00
Chef Expeditor
77fe944f23 Bump version to 1.45.9 by Expeditor 2017-11-16 17:17:17 +00:00
Seth Chisamore
396752ba26 Add basic param handling to remote HTTP worker (#2286)
http resource: Add basic param handling to remote HTTP worker
2017-11-16 12:16:23 -05:00
Adam Leff
6ccc8aad26
Update expeditor version-update script (#2312)
PR #2311 updated the Rubocop engine to use Ruby 2.3 to evaluate, and
the default behavior is to no longer require `.freeze` to be added
to string literals that are treated like constants. This caused the
pattern match used in the Expeditor version update script to no longer
work.

Also manually fixing the `lib/inspec/version.rb` file to be correct.

Signed-off-by: Adam Leff <adam@leff.co>
2017-11-16 11:59:00 -05:00
Chef Expeditor
e40bf36bad Bump version to 1.45.8 by Expeditor 2017-11-16 16:26:36 +00:00
Adam Leff
dde4a116d6
Update Rubocop to TargetRubyVersion 2.3 (#2311)
Bumps the Rubocop engine to use 2.3 and addresses the big changes
between 2.0 and 2.3.

Signed-off-by: Adam Leff <adam@leff.co>
2017-11-16 11:26:19 -05:00
Chef Expeditor
832c66087a Bump version to 1.45.7 by Expeditor 2017-11-16 15:02:47 +00:00
Adam Leff
f05e22ad33 Require Ruby 2.3 and later (#2293)
* Require Ruby 2.3 and later

Ruby 2.1 is EOL, and Ruby 2.2 is on security fixes only. This moves
InSpec to support the current "normal maintenance" versions of Ruby
like Chef does and also bumps the versions used in Travis tests.

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

* Remove Ruby 2.2 from appveyor

Signed-off-by: Adam Leff <adam@leff.co>
2017-11-16 22:02:35 +07:00
Chef Expeditor
e4ef2dbf11 Bump version to 1.45.6 by Expeditor 2017-11-15 20:56:50 +00:00
eramoto
986c8818d3 xinetd_conf resource: fix false positives with config file or directory doesn't exist (#2302)
xinetd_conf resource: fix false positives when config file or directory doesn't exist
2017-11-15 15:56:39 -05:00
Chef Expeditor
e403dd6e9f Bump version to 1.45.5 by Expeditor 2017-11-15 20:49:24 +00:00
malovdm1
923e4abf21 sqlplus credentials could contain special symbols and need to be escaped (#2308)
Signed-off-by: Dmytro Malovany <dmytro.malovannyy@gmail.com>
2017-11-15 21:49:09 +01:00
Chef Expeditor
c5130621f3 Bump version to 1.45.4 by Expeditor 2017-11-14 04:05:43 +00:00
Adam Leff
c91553c6f8 Allow resource skip exceptions outside initialize methods (#2307)
PR #2235 allowed for resources to raise skip and fail exceptions and
the RSpec formatters would do the right thing. These work inside
initialize methods but not in any other method in the resource.

This change modifies the formatter to honor the ResourceSkipped
exception properly. The ResourceFailed exception needs no additional
handling as RSpec properly handles any exception thrown.

Signed-off-by: Adam Leff <adam@leff.co>
2017-11-14 05:05:31 +01:00
Chef Expeditor
377797023e Bump version to 1.45.3 by Expeditor 2017-11-14 04:04:02 +00:00
eramoto
f9ee7596f5 Fix gid filtering for etc_group resource (#2297)
'etc_group' resource stores 'gid' as integer but the 'where' method
compares 'gid' as string.
By this fix, the 'where' method always converts the stored data to string
when comparing. And it can also look for groups without members.

Signed-off-by: ERAMOTO Masaya <eramoto.masaya@jp.fujitsu.com>
2017-11-14 05:03:50 +01:00
Chef Expeditor
99f1631d9e Bump version to 1.45.2 by Expeditor 2017-11-14 04:02:03 +00:00
Adam Leff
01b65db6c7 Habitat build works for all versions, eliminates rake (#2301)
The Habitat plan has been modified to support building from the repo
rather than relying on a gem being pushed to RubyGems. This allows
us to build current packages at every merge rather than only pushing to
Habitat Builder when we promote to stable.

This change also enables Expeditor to perform builds for us and removes
the dependency on the rake task as it is no longer needed.

Signed-off-by: Adam Leff <adam@leff.co>
2017-11-14 05:01:51 +01:00
Chef Expeditor
4f1e9eced6 Bump version to 1.45.1 by Expeditor 2017-11-14 03:41:49 +00:00
Adam Leff
6875e80bd8
Fix classname in JUnit formatter (#2283)
* Fix classname in JUnit formatter

The JUnit formatter currently incorrectly uses `class` instead of
`classname` as an attribute.

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

* Prefixing classname with profile name, fix functional tests

Signed-off-by: Adam Leff <adam@leff.co>
2017-11-13 22:41:37 -05:00
Chef Expeditor
4840eb087e Bump version to 1.45.0 by Expeditor 2017-11-13 21:02:41 +00:00
Adam Leff
18faaa42de
Bumping train to 0.29.1 (#2306)
* Bumping train to 0.29

Train 0.29 includes some bug fixes and a refactor of the File classes

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

* Correct unit test for undefined platform

Train requires that a hash is supplied when mocking an OS. Because
an OS of "unsupported" rather than "undefined" was chosen in a unit
test, a nil was passed to train and it caused a failure.

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

* Ensure 0.29.1 or later gets picked up, but 0.30 is also acceptable

Signed-off-by: Adam Leff <adam@leff.co>
2017-11-13 16:02:27 -05:00
Chef Expeditor
d8aea65849 Bump version to 1.44.9 by Expeditor 2017-11-13 17:06:14 +00:00
Wei He
f20748c88f fix port resource (parse_ss_line) (#2305)
Signed-off-by: Wing924 <weihe924stephen@gmail.com>
2017-11-13 18:06:01 +01:00
Chef Expeditor
dceb21ed8c Update CHANGELOG.md to reflect the promotion of 1.44.8 to stable 2017-11-09 17:39:12 +00:00
Chef Expeditor
7e6c4128c5 Bump version to 1.44.8 by Expeditor 2017-11-09 11:33:08 +00:00
Clinton Wolfe
656423d7f2 Issue warning during check if profile name contains slash (#2231)
* Add failing unit test for deprecation warning on profiles with slashes in their name

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>

* Issue warning during validation if name contains a slash

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>

* Slug profile names generated from target paths to prevent breaking unit tests

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>

* Rubocop whinges

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>

* Update functional test watching for default profile name

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>

* Make deprecation warning more descriptive

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>

* Rubocop whinges

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>

* Set title with original test path if no profile name or title provided

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>

* Rubocop whinges

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2017-11-09 12:32:54 +01:00
Chef Expeditor
2c75f048e4 Bump version to 1.44.7 by Expeditor 2017-11-09 11:29:53 +00:00
Adam Leff
86079ca3c7 Properly compare profile version strings as SemVer (#2280)
When configuring a profile dependency, if the dependent profile had a
hyphen in it, it would not properly match the default version constraint
of `>= 0`. This is because a hyphen indicates the version is a pre-release
version and proper version matching would require the constraint to also
be listed with a pre-release version string.

The proper solution is to use the `+` character instead which indicates
a build number, which is what the hyphen was meant to convey. In the
meantime, this change properly compares version strings as SemVer and
also adds tests.

Signed-off-by: Adam Leff <adam@leff.co>
2017-11-09 12:29:41 +01:00
Chef Expeditor
8d555bd160 Bump version to 1.44.6 by Expeditor 2017-11-09 11:25:20 +00:00
Adam Leff
afd23444c9 Eliminate deprecation warnings on resource skipped messages (#2296)
PR #2216 introduced some new tests that use the old syntax that was
deprecated in #2235. This gets them in line and eliminates the
deprecation warnings.

Signed-off-by: Adam Leff <adam@leff.co>
2017-11-09 12:25:11 +01:00
Chef Expeditor
6a01aa0038 Bump version to 1.44.5 by Expeditor 2017-11-09 10:11:29 +00:00
Brett Delle Grazie
0bb318c2dc http resource: supply max-time option using read_timeout and open_timeout (#2289)
Curl doesn't distinguish between them so need to use the sum of both as
the overall timeout.

fixes #2288

Signed-off-by: Brett Delle Grazie <brett.dellegrazie@gmail.com>
2017-11-09 11:11:19 +01:00
Chef Expeditor
3b143633aa Bump version to 1.44.4 by Expeditor 2017-11-09 10:10:07 +00:00
Adam Leff
06a3a6e95b Bump Omnibus ruby to 2.4.2 (#2294)
Signed-off-by: Adam Leff <adam@leff.co>
2017-11-09 11:09:54 +01:00
Adam Leff
884204f1ef
Updated "code" style on website (#2298)
The existing style was a bit harsh, especially with a lot of code
blocks in a row. This lightens it a bit to be more focused on the
monospace aspect rather than offsetting code with different backgrounds.

Signed-off-by: Adam Leff <adam@leff.co>
2017-11-08 16:41:06 -05:00
Chef Expeditor
13a93ebd32 Bump version to 1.44.3 by Expeditor 2017-11-08 17:43:28 +00:00
Adam Leff
0a11280444
nginx resource: support quoted identifiers (#2292)
An nginx config may contain configuration settings that are quoted, such
as a map entry:

"~^\/opcache-api" 1;

The `nginx_conf` resource was failing to properly parse these.

Signed-off-by: Adam Leff <adam@leff.co>
2017-11-08 12:42:37 -05:00
Chef Expeditor
690b1df805 Bump version to 1.44.2 by Expeditor 2017-11-08 10:41:11 +00:00
Adam Leff
9e9025c138 Switch to tomlrb for TOML parsing (#2295)
The `toml` gem has a very strict version dependency on an old version
of parslet. This change switches us to use `tomlrb` instead which has
no direct dependencies. This will allow us to bump up to a later version
of parslet that has better error handling and insight into parser errors.

Signed-off-by: Adam Leff <adam@leff.co>
2017-11-08 11:41:00 +01:00
Chef Expeditor
9440ce6321 Bump version to 1.44.1 by Expeditor 2017-11-07 19:02:06 +00:00
Dominik Richter
eb729c4034 allow users to specify user/namespace when fetching profiles from Chef Automate (#2275)
* allow users to configure the profiles namespace

By default it uses the username of the user that is logged into the system. However, the user can now specify the `--user` on the cli to list profiles from a user other than his own domain.

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

* allow users to provide owner for profile listing and uploading

Signed-off-by: Christoph Hartmann <chris@lollyrock.com>

* use config only

Signed-off-by: Christoph Hartmann <chris@lollyrock.com>
2017-11-07 14:01:55 -05:00
Chef Expeditor
c2ec4b9545 Bump version to 1.44.0 by Expeditor 2017-11-06 18:29:02 +00:00