summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoah Kantrowitz <noah@coderanger.net>2016-04-23 12:02:43 -0700
committerNoah Kantrowitz <noah@coderanger.net>2016-04-23 12:02:43 -0700
commit2206b76e7319f198b507af62060fbcc8f3279f8a (patch)
tree12e1436ac04b7ef27838ea8cdb6c3a2067754bc6
parent32fbc8908cc41c218951d5e2c9413e7efc6df5f1 (diff)
downloadchef-2206b76e7319f198b507af62060fbcc8f3279f8a.tar.gz
The easy_install provider (and resource) are deprecated and will be removed in Chef 13.
This is because easy_install itself is long-since deprecated by the Python community and has been de-facto unmaintained for around 5 years.
-rw-r--r--lib/chef/provider/package/easy_install.rb2
-rw-r--r--spec/unit/provider/package/easy_install_spec.rb6
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",
})