This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# require Puppet::Resource::Catalog::Compiler | |
require 'puppet/indirector/catalog/compiler' | |
# Magic to add a catalog.exported_resources accessor | |
class Puppet::Resource::Catalog::Compiler | |
alias_method :filter_exclude_exported_resources, :filter | |
def filter(catalog) | |
filter_exclude_exported_resources(catalog).tap do |filtered| | |
# Every time we filter a catalog, add a .exported_resources to it. | |
filtered.define_singleton_method(:exported_resources) do |