Skip to content

Instantly share code, notes, and snippets.

@stevendanna
Created December 5, 2014 17:40
Show Gist options
  • Save stevendanna/e8c4097dc3af01c1ad39 to your computer and use it in GitHub Desktop.
Save stevendanna/e8c4097dc3af01c1ad39 to your computer and use it in GitHub Desktop.
my_test "foo" do
action :create
end
class Chef
class Provider
class MyTest < Chef::Provider
def load_current_resource
@current_resource ||= Chef::Resource::MyTest.new("foo")
end
def action_create
d = directory "foo"
d.run_action(:create)
end
end
end
end
class Chef
class Resource
class MyTest < Chef::Resource
def initialize(name, run_context=nil)
super
@action = :create
@allowed_actions << :create
@provider = Chef::Provider::MyTest
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment