summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThom May <thom@may.lt>2017-03-21 07:22:50 +0000
committerGitHub <noreply@github.com>2017-03-21 07:22:50 +0000
commit6c694680ec96fc51c7d535cd3190a81874dfc3a9 (patch)
tree960449ecadb6f3361814b46ff2929224999276b2
parent422d5720de5401fac3e52f50d63507f11765e8fe (diff)
parent7c36621bbf3b029ee694b0e8ecd9f7dad477bb9d (diff)
downloadchef-6c694680ec96fc51c7d535cd3190a81874dfc3a9.tar.gz
Merge pull request #5923 from chef/lcg/remove-chef-shell-out
Chef-13: remove Chef::ShellOut
-rw-r--r--RELEASE_NOTES.md4
-rw-r--r--lib/chef.rb3
-rw-r--r--lib/chef/shell_out.rb13
-rw-r--r--spec/unit/shell_out_spec.rb18
4 files changed, 5 insertions, 33 deletions
diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md
index 5fde487091..c7a541d284 100644
--- a/RELEASE_NOTES.md
+++ b/RELEASE_NOTES.md
@@ -110,3 +110,7 @@ will give you an experience consistent with `chef-solo --legacy-mode`.
The deprecated code has been removed. All providers and resources should now be using Chef >= 12.0 `provides` syntax.
+### Remove Chef::ShellOut
+
+This was deprecated and replaced a long time ago with mixlib-shellout and the shell_out mixin.
+
diff --git a/lib/chef.rb b/lib/chef.rb
index 3e161dc365..3d6b783253 100644
--- a/lib/chef.rb
+++ b/lib/chef.rb
@@ -1,6 +1,6 @@
#
# Author:: Adam Jacob (<adam@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");
@@ -24,7 +24,6 @@ require "chef/log"
require "chef/config"
require "chef/providers"
require "chef/resources"
-require "chef/shell_out"
require "chef/daemon"
diff --git a/lib/chef/shell_out.rb b/lib/chef/shell_out.rb
deleted file mode 100644
index 54ff718e8e..0000000000
--- a/lib/chef/shell_out.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-require "mixlib/shellout"
-
-class Chef
- class ShellOut < Mixlib::ShellOut
-
- def initialize(*args)
- Chef::Log.warn("Chef::ShellOut is deprecated, please use Mixlib::ShellOut")
- called_from = caller[0..3].inject("Called from:\n") { |msg, trace_line| msg << " #{trace_line}\n" }
- Chef::Log.warn(called_from)
- super
- end
- end
-end
diff --git a/spec/unit/shell_out_spec.rb b/spec/unit/shell_out_spec.rb
deleted file mode 100644
index 35844f4961..0000000000
--- a/spec/unit/shell_out_spec.rb
+++ /dev/null
@@ -1,18 +0,0 @@
-require File.expand_path("../../spec_helper", __FILE__)
-
-describe "Chef::ShellOut deprecation notices" do
- it "logs a warning when initializing a new Chef::ShellOut object" do
- expect(Chef::Log).to receive(:warn).with("Chef::ShellOut is deprecated, please use Mixlib::ShellOut")
- expect(Chef::Log).to receive(:warn).with(/Called from\:/)
- Chef::ShellOut.new("pwd")
- end
-end
-
-describe "Chef::Exceptions::ShellCommandFailed deprecation notices" do
-
- it "logs a warning when referencing the constant Chef::Exceptions::ShellCommandFailed" do
- expect(Chef::Log).to receive(:warn).with("Chef::Exceptions::ShellCommandFailed is deprecated, use Mixlib::ShellOut::ShellCommandFailed")
- expect(Chef::Log).to receive(:warn).with(/Called from\:/)
- Chef::Exceptions::ShellCommandFailed
- end
-end