summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Smith <tsmith@chef.io>2017-07-06 22:55:06 -0700
committerTim Smith <tsmith@chef.io>2017-07-06 22:55:06 -0700
commitfeb0509889474ad95c8871185b561f1eaf9d8706 (patch)
treeac3f743fd326f5349778d08412785c199067f792
parented60cc2ec66a8547324605d77fbbed39bf773f4b (diff)
downloadchef-auto_deprecation_version.tar.gz
Auto increment the chef version for deprecationsauto_deprecation_version
It's the next major version not Chef 13. Signed-off-by: Tim Smith <tsmith@chef.io>
-rw-r--r--lib/chef/deprecation/warnings.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/chef/deprecation/warnings.rb b/lib/chef/deprecation/warnings.rb
index f5feb91063..c227739a8d 100644
--- a/lib/chef/deprecation/warnings.rb
+++ b/lib/chef/deprecation/warnings.rb
@@ -20,10 +20,12 @@ class Chef
module Deprecation
module Warnings
+ require "chef/version"
+
def add_deprecation_warnings_for(method_names)
method_names.each do |name|
define_method(name) do |*args|
- message = "Method '#{name}' of '#{self.class}' is deprecated. It will be removed in Chef 13."
+ message = "Method '#{name}' of '#{self.class}' is deprecated. It will be removed in Chef #{Chef::VERSION.to_i.next}."
message << " Please update your cookbooks accordingly."
Chef.deprecated(:internal_api, message)
super(*args)