Skip to content

Instantly share code, notes, and snippets.

@apsoto
Created March 11, 2010 23:27
Show Gist options
  • Select an option

  • Save apsoto/329829 to your computer and use it in GitHub Desktop.

Select an option

Save apsoto/329829 to your computer and use it in GitHub Desktop.
monkey patching chef
# file in your cookbook's library dir
module Crazy
def go_nuts
end
end
class Chef::Resource
include Crazy
end
class Chef::Recipe
include Crazy
end
# in the recipe
go_nuts
# or in the resource
service "foo" do
go_nuts
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment