summaryrefslogtreecommitdiff
path: root/lib/chef/cookbook_version.rb
diff options
context:
space:
mode:
authordanielsdeleo <dan@getchef.com>2015-02-09 13:15:36 -0800
committerdanielsdeleo <dan@getchef.com>2015-02-11 10:52:49 -0800
commit3587b7ec5c6a802554d01b851a5071fcac2d3c3d (patch)
tree261b936f552b686d8c3a53068244dd6ebcb4ac31 /lib/chef/cookbook_version.rb
parenta164ceb6cac2808088920e36e35b5e9c16a8496b (diff)
downloadchef-3587b7ec5c6a802554d01b851a5071fcac2d3c3d.tar.gz
Standardize deprecation code within CookbookVersion
Diffstat (limited to 'lib/chef/cookbook_version.rb')
-rw-r--r--lib/chef/cookbook_version.rb12
1 files changed, 10 insertions, 2 deletions
diff --git a/lib/chef/cookbook_version.rb b/lib/chef/cookbook_version.rb
index 1f55ff8b72..c030e31a07 100644
--- a/lib/chef/cookbook_version.rb
+++ b/lib/chef/cookbook_version.rb
@@ -76,6 +76,8 @@ class Chef
deprecated!(<<-DEPRECATED)
Cookbooks now have multiple save URLs based on the capabilities of the Chef Server.
To get the default save URL, use code like `Chef::CookbookManifest.new(cookbook_version).save_url`
+
+Called from #{caller(1).first}
DEPRECATED
cookbook_manifest.save_url
@@ -86,6 +88,8 @@ DEPRECATED
deprecated!(<<-DEPRECATED)
Cookbooks now have multiple save URLs based on the capabilities of the Chef Server.
To get the default save URL, use code like `Chef::CookbookManifest.new(cookbook_version).force_save_url`
+
+Called from #{caller(1).first}
DEPRECATED
cookbook_manifest.force_save_url
end
@@ -95,6 +99,8 @@ DEPRECATED
deprecated!(<<-DEPRECATED)
Cookbooks now have multiple JSON representations based on the capabilities of the Chef Server.
To get the Hash representation, use code like `Chef::CookbookManifest.new(cookbook_version).to_hash`
+
+Called from #{caller(1).first}
DEPRECATED
cookbook_manifest.to_hash
end
@@ -104,6 +110,8 @@ DEPRECATED
deprecated!(<<-DEPRECATED)
Cookbooks now have multiple JSON representations based on the capabilities of the Chef Server.
To get the JSON representation, use code like `Chef::CookbookManifest.new(cookbook_version).to_json`
+
+Called from #{caller(1).first}
DEPRECATED
cookbook_manifest.to_json
end
@@ -124,12 +132,12 @@ DEPRECATED
attr_accessor :metadata_filenames
def status=(new_status)
- Chef::Log.warn("Deprecated method `status' called from #{caller(1).first}. This method will be removed")
+ deprecated!("Deprecated method `status' called from #{caller(1).first}. This method will be removed")
@status = new_status
end
def status
- Chef::Log.warn("Deprecated method `status' called from #{caller(1).first}. This method will be removed")
+ deprecated!("Deprecated method `status' called from #{caller(1).first}. This method will be removed")
@status
end