inspec/lib/utils
Adam Leff ea7c0c493e Provide a method-based accessor for SimpleConfig hashes
When SimpleConfig parses a config file that has sections, such as a mysqld
config file, the values within that section are returned via a Hash. However,
we do not provide an easy way to write tests for those deep hash values:

```
describe mysql_conf('/tmp/my.cnf') do
  its('mysqld.expire_logs_days') { should cmp 10 }
end

  MySQL Configuration
     ∅  undefined method `expire_logs_days' for #<Hash:0x007fe463795a00>
```

This change provides a method-based accessor for Hashes that are built via
SimpleConfig.

```
describe mysql_conf('/tmp/my.cnf') do
  its('mysqld.expire_logs_days') { should cmp 10 }
end

  MySQL Configuration
     ✔  mysqld.expire_logs_days should cmp == 10
```

Fixes #1541 by changing the way the attributes are fetched.

Signed-off-by: Adam Leff <adam@leff.co>
2017-03-15 14:49:16 -05:00
..
command_wrapper.rb Address rubocop violations 2017-02-08 16:49:16 -06:00
convert.rb lint 2016-01-15 04:07:25 +01:00
filter.rb Address rubocop violations 2017-02-08 16:49:16 -06:00
filter_array.rb rubocop fixes 2016-02-09 11:51:52 +01:00
find_files.rb fix warning in #find_files[_or_error] 2016-02-01 16:32:47 +01:00
hash.rb implement be_mounted.with for file resources 2016-01-03 00:03:24 +01:00
json_log.rb optimize json logger for line delimited JSON 2016-02-04 16:38:57 +01:00
latest_version.rb Avoid connection timeout of "inspec version" (#1538) 2017-03-06 09:23:42 -07:00
modulator.rb add author header 2015-10-06 18:55:44 +02:00
object_traversal.rb Fix ObjectTraverser when accessing array values 2017-03-15 11:35:55 +01:00
parser.rb Add FreeBSD support for ZFS datasets and pools 2017-02-22 10:29:49 -07:00
plugin_registry.rb Address rubocop violations 2017-02-08 16:49:16 -06:00
simpleconfig.rb Provide a method-based accessor for SimpleConfig hashes 2017-03-15 14:49:16 -05:00