diff --git a/lib/puppet/type/transport.rb b/lib/puppet/type/transport.rb index 2f592bf..767311b 100644 --- a/lib/puppet/type/transport.rb +++ b/lib/puppet/type/transport.rb @@ -21,6 +21,19 @@ end defaultto({}) end + + # NOTE: Should match the behavior of the default titlepattern which is to set + # the `name` parameter. Intentionally uses a lambda to disqualify this + # type from compilation by `puppet generate types` so that the + # metaparameter definition below still works. + # + # FIXME: This is some epic hacky bullshit that will extract a price from + # someone in the future. If you're reading this comment, find a way + # to kill this. Good luck and godspeed. + def self.title_patterns + [[/(.*)/m, [[:name, lambda {|x| x}]]]] + end + end unless Puppet::Type.metaparams.include? :transport