type file
show_diff => true (default) prints diff to logs
show_diff => md5 prints only md5 hashes instead of actual values
show_diff => false redacts any information about values
Global show_diff config takes priotiry over this one.
Previously, trying to use a space as a key_val_separator in the ini_setting
type would fail because #strip is being called on the key_val_separator
attribute, which completely kills the space. This commit checks to see
if key_val_separator has been set as a space, and, if so, sets the `k_v_s`
variable in the library to be ' ' instead of ''. This in turn allows the
provider to check for existing values (instead of inserting the value every
time Puppet is run).
The previous match for \s would also match on newlines. This caused
existing settings with blank values to have the newline considered part
of the whitespace surrounding the separator. When such settings are
set with a value, the value ends up on the next line.
Also adding acceptance test for this particular situation.
Noticed this when I was testing the module out with a FreeBSD host this code duplicates the shared_example used in the rest of the spec, so I DRY'd it up! 👍