inspec/lib
Adam Leff 12fec238f7
json resource: ensure params is not nil in even of read/parse failure (#2354)
When the JSON resource (and those that subclass off of it) were modified
to properly throw exceptions in the event of failure, this caused the
`params` method to return nil instead of what it used to be, an empty
hash.

This is fine in the case of a describe block, but it's not okay when used
outside of a describe, as it will cause users trying to pluck from the
hash to throw a dreaded-and-unhelpful NilClass error.

This change pre-populates the params to be an empty hash, and if the
read/parse steps fail, it will still be one.

Signed-off-by: Adam Leff <adam@leff.co>
2017-11-29 16:31:06 -05:00
..
bundles Bump Rubocop to 0.49.1 (#2323) 2017-11-21 08:49:41 +01:00
fetchers Bump Rubocop to 0.49.1 (#2323) 2017-11-21 08:49:41 +01:00
inspec Bump version to 1.46.3 by Expeditor 2017-11-29 14:16:49 +00:00
matchers Bump Rubocop to 0.49.1 (#2323) 2017-11-21 08:49:41 +01:00
resources json resource: ensure params is not nil in even of read/parse failure (#2354) 2017-11-29 16:31:06 -05:00
source_readers Bump Rubocop to 0.49.1 (#2323) 2017-11-21 08:49:41 +01:00
utils Allow skipping/failing resources in FilterTable (#2349) 2017-11-29 07:32:40 -05:00
inspec.rb Remove any "All Rights Reserved" references (#1969) 2017-06-28 04:14:19 -07:00