diff options
author | Noah Kantrowitz <noah@coderanger.net> | 2016-04-25 12:11:03 -0700 |
---|---|---|
committer | Noah Kantrowitz <noah@coderanger.net> | 2016-04-25 12:11:03 -0700 |
commit | 4491736471bc49fb0e50b6a70508d99d6bae5eb4 (patch) | |
tree | 12e1436ac04b7ef27838ea8cdb6c3a2067754bc6 | |
parent | 32fbc8908cc41c218951d5e2c9413e7efc6df5f1 (diff) | |
parent | 2206b76e7319f198b507af62060fbcc8f3279f8a (diff) | |
download | chef-4491736471bc49fb0e50b6a70508d99d6bae5eb4.tar.gz |
Merge pull request #4860 from coderanger/notsoeasy
The easy_install provider and resource are deprecated and will be removed in Chef 13
-rw-r--r-- | lib/chef/provider/package/easy_install.rb | 2 | ||||
-rw-r--r-- | spec/unit/provider/package/easy_install_spec.rb | 6 |
2 files changed, 8 insertions, 0 deletions
diff --git a/lib/chef/provider/package/easy_install.rb b/lib/chef/provider/package/easy_install.rb index a876258d04..989f2ab9d2 100644 --- a/lib/chef/provider/package/easy_install.rb +++ b/lib/chef/provider/package/easy_install.rb @@ -112,6 +112,7 @@ class Chef end def install_package(name, version) + Chef.log_deprecation("The easy_install package provider is deprecated and will be removed in Chef 13.") run_command(:command => "#{easy_install_binary_path}#{expand_options(@new_resource.options)} \"#{name}==#{version}\"") end @@ -120,6 +121,7 @@ class Chef end def remove_package(name, version) + Chef.log_deprecation("The easy_install package provider is deprecated and will be removed in Chef 13.") run_command(:command => "#{easy_install_binary_path }#{expand_options(@new_resource.options)} -m #{name}") end diff --git a/spec/unit/provider/package/easy_install_spec.rb b/spec/unit/provider/package/easy_install_spec.rb index 79a5889f9f..fa5eea00a2 100644 --- a/spec/unit/provider/package/easy_install_spec.rb +++ b/spec/unit/provider/package/easy_install_spec.rb @@ -61,6 +61,7 @@ describe Chef::Provider::Package::EasyInstall do describe "actions_on_package" do it "should run easy_install with the package name and version" do + expect(Chef).to receive(:log_deprecation).with(/easy_install package provider is deprecated/) expect(@provider).to receive(:run_command).with({ :command => "easy_install \"boto==1.8d\"", }) @@ -68,6 +69,7 @@ describe Chef::Provider::Package::EasyInstall do end it "should run easy_install with the package name and version and specified options" do + expect(Chef).to receive(:log_deprecation).with(/easy_install package provider is deprecated/) expect(@provider).to receive(:run_command).with({ :command => "easy_install --always-unzip \"boto==1.8d\"", }) @@ -76,6 +78,7 @@ describe Chef::Provider::Package::EasyInstall do end it "should run easy_install with the package name and version" do + expect(Chef).to receive(:log_deprecation).with(/easy_install package provider is deprecated/) expect(@provider).to receive(:run_command).with({ :command => "easy_install \"boto==1.8d\"", }) @@ -83,6 +86,7 @@ describe Chef::Provider::Package::EasyInstall do end it "should run easy_install -m with the package name and version" do + expect(Chef).to receive(:log_deprecation).with(/easy_install package provider is deprecated/) expect(@provider).to receive(:run_command).with({ :command => "easy_install -m boto", }) @@ -90,6 +94,7 @@ describe Chef::Provider::Package::EasyInstall do end it "should run easy_install -m with the package name and version and specified options" do + expect(Chef).to receive(:log_deprecation).with(/easy_install package provider is deprecated/) expect(@provider).to receive(:run_command).with({ :command => "easy_install -x -m boto", }) @@ -98,6 +103,7 @@ describe Chef::Provider::Package::EasyInstall do end it "should run easy_install -m with the package name and version" do + expect(Chef).to receive(:log_deprecation).with(/easy_install package provider is deprecated/) expect(@provider).to receive(:run_command).with({ :command => "easy_install -m boto", }) |