Merge pull request #183 from cyberious/MODULES-1908

(MODULES-1908) Munge the setting to ensure we always strip the whitespace
This commit is contained in:
Bryan Jen 2015-08-03 10:10:20 -07:00
commit f1e4313740

View file

@ -17,6 +17,12 @@ Puppet::Type.newtype(:ini_setting) do
newparam(:setting) do
desc 'The name of the setting to be defined.'
munge do |value|
if value =~ /(^\s|\s$)/
Puppet.warn("Settings should not have spaces in the value, we are going to strip the whitespace")
end
value.lstrip.rstrip
end
end
newparam(:path) do