From feb0509889474ad95c8871185b561f1eaf9d8706 Mon Sep 17 00:00:00 2001 From: Tim Smith Date: Thu, 6 Jul 2017 22:55:06 -0700 Subject: Auto increment the chef version for deprecations It's the next major version not Chef 13. Signed-off-by: Tim Smith --- lib/chef/deprecation/warnings.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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) -- cgit v1.2.1