summaryrefslogtreecommitdiff
path: root/lib/chef/provider/directory.rb
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2020-03-02 16:05:50 -0800
committerLamont Granquist <lamont@scriptkiddie.org>2020-03-02 16:05:50 -0800
commit812fcb568e06afdcdaad5d624c97b666a43a65b1 (patch)
treead8b78eb755684239cfa8d5724b0fd3ad204d415 /lib/chef/provider/directory.rb
parent36a727691ea93d1f5fe8cf267fae5dd92516a9f0 (diff)
downloadchef-812fcb568e06afdcdaad5d624c97b666a43a65b1.tar.gz
Use the action DSL consistently
May be a potentially breaking change if I noodle hard enough on it, it does mean that all the actions are now (correctly) encapsulated in a sub-resource collection, whereas before they never had one. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Diffstat (limited to 'lib/chef/provider/directory.rb')
-rw-r--r--lib/chef/provider/directory.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/chef/provider/directory.rb b/lib/chef/provider/directory.rb
index ad627757f8..28ddb202be 100644
--- a/lib/chef/provider/directory.rb
+++ b/lib/chef/provider/directory.rb
@@ -121,7 +121,7 @@ class Chef
end
end
- def action_create
+ action :create do
unless ::File.exists?(new_resource.path)
converge_by("create new directory #{new_resource.path}") do
if new_resource.recursive == true
@@ -137,7 +137,7 @@ class Chef
load_resource_attributes_from_file(new_resource) unless Chef::Config[:why_run]
end
- def action_delete
+ action :delete do
if ::File.exists?(new_resource.path)
converge_by("delete existing directory #{new_resource.path}") do
if new_resource.recursive == true