summaryrefslogtreecommitdiff
path: root/chef-config
diff options
context:
space:
mode:
authorNoah Kantrowitz <noah@coderanger.net>2018-06-14 18:39:14 -0700
committerNoah Kantrowitz <noah@coderanger.net>2018-06-14 18:39:14 -0700
commitd98d35448da139c5c039f810f5cb9c86094f695b (patch)
tree32a7af49b4919fc8a148690780f18d26ff4eb79b /chef-config
parentaa4f3285f3e49919e29f40337183fd0510baaee5 (diff)
downloadchef-d98d35448da139c5c039f810f5cb9c86094f695b.tar.gz
Simplify the deprecations system a bit, and introduce ways to silence deprecation warnings.
Signed-off-by: Noah Kantrowitz <noah@coderanger.net>
Diffstat (limited to 'chef-config')
-rw-r--r--chef-config/lib/chef-config/config.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/chef-config/lib/chef-config/config.rb b/chef-config/lib/chef-config/config.rb
index 82f25f4139..ed8fab9ee4 100644
--- a/chef-config/lib/chef-config/config.rb
+++ b/chef-config/lib/chef-config/config.rb
@@ -715,6 +715,11 @@ module ChefConfig
ENV.key?("CHEF_TREAT_DEPRECATION_WARNINGS_AS_ERRORS")
end
+ # Which deprecations warnings to silence. Can be set to `true` to silence
+ # all warnings, or an array of strings like either `"deprecation_type"` or
+ # `"filename.rb:lineno"`.
+ default :silence_deprecation_warnings, []
+
# Whether the resource count should be updated for log resource
# on running chef-client
default :count_log_resource_updates, true