summaryrefslogtreecommitdiff
path: root/lib/chef/resource.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chef/resource.rb')
-rw-r--r--lib/chef/resource.rb8
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/chef/resource.rb b/lib/chef/resource.rb
index 074ab772a1..cde202dcf2 100644
--- a/lib/chef/resource.rb
+++ b/lib/chef/resource.rb
@@ -925,9 +925,7 @@ class Chef
# @deprecated Multiple actions are supported by resources. Please call {}#updated_by_last_action} instead.
#
def updated=(true_or_false)
- Chef::Log.warn("Chef::Resource#updated=(true|false) is deprecated. Please call #updated_by_last_action(true|false) instead.")
- Chef::Log.warn("Called from:")
- caller[0..3].each { |line| Chef::Log.warn(line) }
+ Chef.deprecated(:custom_resource, "Chef::Resource#updated=(true|false) is deprecated. Please call #updated_by_last_action(true|false) instead.")
updated_by_last_action(true_or_false)
@updated = true_or_false
end
@@ -982,7 +980,7 @@ class Chef
# @deprecated Use resource_name instead.
#
def self.dsl_name
- Chef.log_deprecation "Resource.dsl_name is deprecated and will be removed in Chef 13. Use resource_name instead."
+ Chef.deprecated(:custom_resource, "Resource.dsl_name is deprecated and will be removed in Chef 13. Use resource_name instead.")
if name
name = self.name.split("::")[-1]
convert_to_snake_case(name)
@@ -1060,7 +1058,7 @@ class Chef
#
def self.provider_base(arg = nil)
if arg
- Chef.log_deprecation("Resource.provider_base is deprecated and will be removed in Chef 13. Use provides on the provider, or provider on the resource, instead.")
+ Chef.deprecated(:custom_resource, "Resource.provider_base is deprecated and will be removed in Chef 13. Use provides on the provider, or provider on the resource, instead.")
end
@provider_base ||= arg || Chef::Provider
end