Skip to content
This repository has been archived by the owner on Nov 9, 2020. It is now read-only.

exclude the transport type from puppet module generate #62

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions lib/puppet/type/transport.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down