summaryrefslogtreecommitdiff
path: root/lib/chef/provider.rb
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2017-06-08 13:31:40 -0700
committerLamont Granquist <lamont@scriptkiddie.org>2017-06-08 13:31:40 -0700
commiteb1c36404da38801ca755deccfd754512dd74782 (patch)
treeab6264e3433e6226524da1fb889b36436cc8d70f /lib/chef/provider.rb
parentaa55fd1ade2ec9fd052e3eb0a66f8c6a1d894c19 (diff)
downloadchef-eb1c36404da38801ca755deccfd754512dd74782.tar.gz
Deprecate property namespace magic
This forces everyone to starting using new_resource.property_name instead of just property_name. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Diffstat (limited to 'lib/chef/provider.rb')
-rw-r--r--lib/chef/provider.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/chef/provider.rb b/lib/chef/provider.rb
index c7048d50e5..71d3b12b34 100644
--- a/lib/chef/provider.rb
+++ b/lib/chef/provider.rb
@@ -350,9 +350,11 @@ class Chef
#
if args.empty? && !block
if !new_resource.property_is_set?(__method__) && current_resource
+ Chef.deprecated(:namespace_collisions, "rename #{name} to current_resource.#{name}")
return current_resource.public_send(__method__)
end
end
+ Chef.deprecated(:namespace_collisions, "rename #{name} to new_resource.#{name}")
new_resource.public_send(__method__, *args, &block)
end
EOM