summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2018-11-01 19:24:58 -0700
committerGitHub <noreply@github.com>2018-11-01 19:24:58 -0700
commitebea79845f37b7308523ede57fbbf43bbce469e8 (patch)
tree0ba206b441b743e91cf611f440e790c7c4cbdf61
parenta959268b780227ad849c4b2e27994d3c262410d2 (diff)
parenta80a51fb2001ef75d25d3d7a4fe3d32ff5eb2698 (diff)
downloadchef-ebea79845f37b7308523ede57fbbf43bbce469e8.tar.gz
Merge pull request #7854 from chef/lcg/better-chef-rest-deprecation
update the Chef::REST deprecation warning
-rw-r--r--lib/chef/rest.rb4
-rw-r--r--spec/unit/rest_spec.rb6
2 files changed, 5 insertions, 5 deletions
diff --git a/lib/chef/rest.rb b/lib/chef/rest.rb
index 0705ca9f5a..4fc857e133 100644
--- a/lib/chef/rest.rb
+++ b/lib/chef/rest.rb
@@ -4,7 +4,7 @@
# Author:: Nuo Yan (<nuo@chef.io>)
# Author:: Christopher Brown (<cb@chef.io>)
# Author:: Christopher Walters (<cw@chef.io>)
-# Copyright:: Copyright 2009-2016, Chef Software Inc.
+# Copyright:: Copyright 2009-2018, Chef Software Inc.
# License:: Apache License, Version 2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -59,7 +59,7 @@ class Chef
# http://localhost:4000, a call to +get_rest+ with 'nodes' will make an
# HTTP GET request to http://localhost:4000/nodes
def initialize(url, client_name = Chef::Config[:node_name], signing_key_filename = Chef::Config[:client_key], options = {})
- Chef.deprecated(:chef_rest, "Chef::REST is deprecated. Please use Chef::ServerAPI, or investigate Ridley or ChefAPI.")
+ Chef.deprecated(:chef_rest, "Chef::REST is deprecated. Please use Chef::ServerAPI (and see Chef::HTTP and the related derived classes).")
signing_key_filename = nil if chef_zero_uri?(url)
diff --git a/spec/unit/rest_spec.rb b/spec/unit/rest_spec.rb
index ea3bd88023..2b77a50514 100644
--- a/spec/unit/rest_spec.rb
+++ b/spec/unit/rest_spec.rb
@@ -2,8 +2,8 @@
# Author:: Adam Jacob (<adam@chef.io>)
# Author:: Christopher Brown (<cb@chef.io>)
# Author:: Daniel DeLeo (<dan@chef.io>)
-# Copyright:: Copyright 2008-2016, Chef Software Inc.
-# Copyright:: Copyright 2010-2016, Chef Software Inc.
+# Copyright:: Copyright 2008-2018, Chef Software Inc.
+# Copyright:: Copyright 2010-2018, Chef Software Inc.
# License:: Apache License, Version 2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -96,7 +96,7 @@ describe Chef::REST do
it "emits a deprecation warning" do
Chef::Config[:treat_deprecation_warnings_as_errors] = true
expect { Chef::REST.new(base_url) }.to raise_error Chef::Exceptions::DeprecatedFeatureError,
- /Chef::REST is deprecated. Please use Chef::ServerAPI, or investigate Ridley or ChefAPI./
+ /Chef::REST is deprecated/
end
context "when created with a chef zero URL" do