Created
December 5, 2014 17:40
-
-
Save stevendanna/e8c4097dc3af01c1ad39 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
my_test "foo" do | |
action :create | |
end |
This file contains hidden or 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
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 |
This file contains hidden or 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
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