From: GeorgeCox Date: Mon, 3 Jun 2019 16:10:57 +0000 (+0100) Subject: (maint) Typo fixes (#844) X-Git-Tag: v2.1.0~8 X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=b834cde666f1e56776787b396df7f93a31a0b086;p=puppet-modules%2Fpuppetlabs-firewall.git (maint) Typo fixes (#844) * Changed case of error message Changed the case of the tables in the error message when defining a custom chain. The error message shows the tables in uppercase (as you'd see when using iptables directly), while the regex in lib/puppet/provider/firewallchain/iptables_chain.rb is expecting lowercase. It looks like lib/puppet/provider/firewallchain/iptables_chain.rb is expecting the default chains in uppercase so I have left those. * Corrected typo, hyphen not yphen --- diff --git a/lib/puppet/type/firewall.rb b/lib/puppet/type/firewall.rb index 3a32142..297589a 100644 --- a/lib/puppet/type/firewall.rb +++ b/lib/puppet/type/firewall.rb @@ -619,7 +619,7 @@ Puppet::Type.newtype(:firewall) do unless value =~ %r{^[a-zA-Z0-9\-_]+$} raise ArgumentError, <<-PUPPETCODE Jump destination must consist of alphanumeric characters, an - underscore or a yphen. + underscore or a hyphen. PUPPETCODE end @@ -652,7 +652,7 @@ Puppet::Type.newtype(:firewall) do unless value =~ %r{^[a-zA-Z0-9\-_]+$} raise ArgumentError, <<-PUPPETCODE Goto destination must consist of alphanumeric characters, an - underscore or a yphen. + underscore or a hyphen. PUPPETCODE end diff --git a/lib/puppet/type/firewallchain.rb b/lib/puppet/type/firewallchain.rb index f45afe0..f6aa709 100644 --- a/lib/puppet/type/firewallchain.rb +++ b/lib/puppet/type/firewallchain.rb @@ -49,8 +49,8 @@ Puppet::Type.newtype(:firewallchain) do validate do |value| if value !~ NAME_FORMAT - raise ArgumentError, 'Inbuilt chains must be in the form {chain}:{table}:{protocol} where {table} is one of FILTER,' \ - ' NAT, MANGLE, RAW, RAWPOST, BROUTE, SECURITY or empty (alias for filter), chain can be anything without colons' \ + raise ArgumentError, 'Inbuilt chains must be in the form {chain}:{table}:{protocol} where {table} is one of filter,' \ + ' nat, mangle, raw, rawpost, broute, security or empty (alias for filter), chain can be anything without colons' \ ' or one of PREROUTING, POSTROUTING, BROUTING, INPUT, FORWARD, OUTPUT for the inbuilt chains, and {protocol} being' \ " IPv4, IPv6, ethernet (ethernet bridging) got '#{value}' table:'#{Regexp.last_match(1)}' chain:'#{Regexp.last_match(2)}' protocol:'#{Regexp.last_match(3)}'" else