diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2017-02-24 16:59:33 -0800 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2017-02-28 11:19:48 -0800 |
commit | 81db0e0cfc218169a70a8178f83c567b467d2e6c (patch) | |
tree | 7eb9f48622f1c06546ddac7e41c82380fe4bd885 | |
parent | 0ca58ffd12e5399792e0f8a3b54c6f3ba7bddab2 (diff) | |
download | chef-81db0e0cfc218169a70a8178f83c567b467d2e6c.tar.gz |
Chef 13: remove unused path property from execute resource
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
-rw-r--r-- | lib/chef/resource/execute.rb | 12 | ||||
-rw-r--r-- | spec/support/shared/unit/execute_resource.rb | 12 | ||||
-rw-r--r-- | spec/unit/resource/execute_spec.rb | 2 |
3 files changed, 5 insertions, 21 deletions
diff --git a/lib/chef/resource/execute.rb b/lib/chef/resource/execute.rb index 677c4608b3..c327b00fb6 100644 --- a/lib/chef/resource/execute.rb +++ b/lib/chef/resource/execute.rb @@ -1,7 +1,7 @@ # # Author:: Adam Jacob (<adam@chef.io>) # Author:: Tyler Cloke (<tyler@chef.io>) -# Copyright:: Copyright 2008-2016, Chef Software Inc. +# Copyright:: Copyright 2008-2017, Chef Software Inc. # License:: Apache License, Version 2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -109,16 +109,6 @@ class Chef :kind_of => [ TrueClass, FalseClass ]) end - def path(arg = nil) - Chef::Log.warn "The 'path' attribute of 'execute' is not used by any provider in Chef 11 or Chef 12. Use 'environment' attribute to configure 'PATH'. This attribute will be removed in Chef 13." - - set_or_return( - :path, - arg, - :kind_of => [ Array ] - ) - end - def returns(arg = nil) set_or_return( :returns, diff --git a/spec/support/shared/unit/execute_resource.rb b/spec/support/shared/unit/execute_resource.rb index ab6ed2b86b..2c556bb6cd 100644 --- a/spec/support/shared/unit/execute_resource.rb +++ b/spec/support/shared/unit/execute_resource.rb @@ -1,7 +1,7 @@ # # Author:: Adam Jacob (<adam@chef.io>) # Author:: Tyler Cloke (<tyler@chef.io>) -# Copyright:: Copyright 2008-2016, Chef Software Inc. +# Copyright:: Copyright 2008-2017, Chef Software Inc. # License:: Apache License, Version 2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -76,14 +76,8 @@ shared_examples_for "an execute resource" do expect(@resource.group).to eql(1) end - it "should accept an array for the execution path in Chef-12 and log deprecation message", chef: "< 13" do - expect(Chef::Log).to receive(:warn).at_least(:once) - @resource.path ["woot"] - expect(@resource.path).to eql(["woot"]) - end - - it "should raise an exception in chef-13", chef: ">= 13" do - expect(@resource.path [ "woot" ]).to raise_error + it "the old path property (that never worked) is not supported in chef >= 13" do + expect { @resource.path [ "woot" ] }.to raise_error end it "should accept an integer for the return code" do diff --git a/spec/unit/resource/execute_spec.rb b/spec/unit/resource/execute_spec.rb index 4c0ee694c3..69e4e91f2a 100644 --- a/spec/unit/resource/execute_spec.rb +++ b/spec/unit/resource/execute_spec.rb @@ -1,7 +1,7 @@ # # Author:: Adam Jacob (<adam@chef.io>) # Author:: Tyler Cloke (<tyler@chef.io>) -# Copyright:: Copyright 2008-2016, Chef Software Inc. +# Copyright:: Copyright 2008-2017, Chef Software Inc. # License:: Apache License, Version 2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); |