From: adrianiurca Date: Mon, 11 Jan 2021 16:03:38 +0000 (+0200) Subject: avoid to remove spaces outside string hex X-Git-Tag: v2.8.1~2^2~1 X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=cc97a34f163078640f02132938fd05080dd02b6d;p=puppet-modules%2Fpuppetlabs-firewall.git avoid to remove spaces outside string hex --- diff --git a/lib/puppet/type/firewall.rb b/lib/puppet/type/firewall.rb index 1f38384..e227aba 100644 --- a/lib/puppet/type/firewall.rb +++ b/lib/puppet/type/firewall.rb @@ -2075,7 +2075,7 @@ Puppet::Type.newtype(:firewall) do given as an argument. PUPPETCODE munge do |value| - _value = value.delete(' ') + _value = value.split('|').map { |x| x.include?('!') ? x : "|#{x.delete(' ')}|" }.join end end