summaryrefslogtreecommitdiff
path: root/lib/chef/data_collector.rb
diff options
context:
space:
mode:
authorThom May <thom@chef.io>2016-10-14 16:46:51 +0100
committerThom May <thom@chef.io>2016-11-16 16:28:15 +0000
commit64b8b0efd90e59ad609ba30fe4bc7ff19e70e940 (patch)
tree779c33247a0617eed1db6b6a662635a0f91d37d3 /lib/chef/data_collector.rb
parentbedcbd5f52448d24fdd7ab26ab79185c011beee3 (diff)
downloadchef-64b8b0efd90e59ad609ba30fe4bc7ff19e70e940.tar.gz
Structure deprecations with additional metadatatm/deprecation_with_url
This adds URLs to each class of deprecation, and correctly prints and formats them for maximum user efficiency. We also provide the URL to the data collector for Visibility to ingest. Signed-off-by: Thom May <thom@chef.io>
Diffstat (limited to 'lib/chef/data_collector.rb')
-rw-r--r--lib/chef/data_collector.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/chef/data_collector.rb b/lib/chef/data_collector.rb
index da7aeee3b8..82c41edfdc 100644
--- a/lib/chef/data_collector.rb
+++ b/lib/chef/data_collector.rb
@@ -274,7 +274,7 @@ class Chef
# see EventDispatch::Base#deprecation
# Append a received deprecation to the list of deprecations
def deprecation(message, location = caller(2..2)[0])
- add_deprecation(message, location)
+ add_deprecation(message.message, message.url, location)
end
private
@@ -410,8 +410,8 @@ class Chef
@error_descriptions = discription_hash
end
- def add_deprecation(message, location)
- @deprecations << { message: message, location: location }
+ def add_deprecation(message, url, location)
+ @deprecations << { message: message, url: url, location: location }
end
def create_resource_report(new_resource, action, current_resource = nil)