Skip to content

Instantly share code, notes, and snippets.

@lamdor
Forked from darrinholst/monkey_patch.rb
Created March 27, 2012 20:18
Show Gist options
  • Save lamdor/2219932 to your computer and use it in GitHub Desktop.
Save lamdor/2219932 to your computer and use it in GitHub Desktop.
require 'chef/resource/deploy'
require 'chef/provider/deploy/revision'
class Chef
class Resource
class Deploy
def before_rollback(arg=nil, &block)
arg ||= block
set_or_return(:before_rollback, arg, :kind_of => [Proc, String])
end
end
end
end
class Chef
class Provider
class Deploy
class Revision
def action_rollback
callback(:before_rollback, @new_resource.before_rollback)
super
end
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment