diff options
Diffstat (limited to 'lib/chef/deprecation')
-rw-r--r-- | lib/chef/deprecation/provider/remote_directory.rb | 2 | ||||
-rw-r--r-- | lib/chef/deprecation/warnings.rb | 7 |
2 files changed, 4 insertions, 5 deletions
diff --git a/lib/chef/deprecation/provider/remote_directory.rb b/lib/chef/deprecation/provider/remote_directory.rb index 5e5188f28b..9b442651d7 100644 --- a/lib/chef/deprecation/provider/remote_directory.rb +++ b/lib/chef/deprecation/provider/remote_directory.rb @@ -22,7 +22,7 @@ class Chef module RemoteDirectory def directory_root_in_cookbook_cache - Chef.log_deprecation "the Chef::Provider::RemoteDirectory#directory_root_in_cookbook_cache method is deprecated" + Chef.deprecated :internal_api, "the Chef::Provider::RemoteDirectory#directory_root_in_cookbook_cache method is deprecated" @directory_root_in_cookbook_cache ||= begin diff --git a/lib/chef/deprecation/warnings.rb b/lib/chef/deprecation/warnings.rb index 411e95ea39..f5feb91063 100644 --- a/lib/chef/deprecation/warnings.rb +++ b/lib/chef/deprecation/warnings.rb @@ -23,10 +23,9 @@ class Chef def add_deprecation_warnings_for(method_names) method_names.each do |name| define_method(name) do |*args| - message = [] - message << "Method '#{name}' of '#{self.class}' is deprecated. It will be removed in Chef 13." - message << "Please update your cookbooks accordingly." - Chef.log_deprecation(message) + message = "Method '#{name}' of '#{self.class}' is deprecated. It will be removed in Chef 13." + message << " Please update your cookbooks accordingly." + Chef.deprecated(:internal_api, message) super(*args) end end |