Skip to content

Instantly share code, notes, and snippets.

View hunner's full-sized avatar

Hunter Haugen hunner

View GitHub Profile
@terlar
terlar / README.markdown
Last active October 11, 2019 16:07
ArchLinux on Mac Book Retina 13"
@nhinds
nhinds / exported_resources.rb
Created October 3, 2015 06:51
Rspec-puppet support library for testing exported resources
# 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