From 8f51bec4799e32784af6d0f790145906deb5c52c Mon Sep 17 00:00:00 2001 From: Tim Smith Date: Tue, 19 Dec 2017 11:30:53 -0800 Subject: Modernize launchd resource Signed-off-by: Tim Smith --- lib/chef/provider/launchd.rb | 1 - lib/chef/resource/launchd.rb | 6 ++---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/lib/chef/provider/launchd.rb b/lib/chef/provider/launchd.rb index 8281410d42..8d868784dd 100644 --- a/lib/chef/provider/launchd.rb +++ b/lib/chef/provider/launchd.rb @@ -17,7 +17,6 @@ # require "chef/provider" -require "chef/resource/launchd" require "chef/resource/file" require "chef/resource/cookbook_file" require "chef/resource/macosx_service" diff --git a/lib/chef/resource/launchd.rb b/lib/chef/resource/launchd.rb index 3fba76e220..3a85fed14f 100644 --- a/lib/chef/resource/launchd.rb +++ b/lib/chef/resource/launchd.rb @@ -17,19 +17,17 @@ # require "chef/resource" -require "chef/provider/launchd" class Chef class Resource class Launchd < Chef::Resource + resource_name :launchd provides :launchd, os: "darwin" - identity_attr :label - default_action :create allowed_actions :create, :create_if_missing, :delete, :enable, :disable, :restart - property :label, String, default: lazy { name }, identity: true + property :label, String, identity: true, name_property: true property :backup, [Integer, FalseClass] property :cookbook, String property :group, [String, Integer] -- cgit v1.2.1