diff options
author | Noah Kantrowitz <noah@coderanger.net> | 2017-04-04 15:40:58 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-04 15:40:58 -0700 |
commit | c93108466c0dbafd60e4c5442e6c95f55e31632f (patch) | |
tree | baccd7af9fa9fe6720a040756daee53db79ded20 | |
parent | 11da4d8864460d6af0946d22413d7df9db6b2ac0 (diff) | |
parent | 617b4f36c0ce2deff6b2d168b7a8355e1566a8cd (diff) | |
download | chef-c93108466c0dbafd60e4c5442e6c95f55e31632f.tar.gz |
Merge pull request #6008 from coderanger/no-more-vendor
No more knife cookbook site vendor
-rw-r--r-- | RELEASE_NOTES.md | 4 | ||||
-rw-r--r-- | lib/chef/knife/cookbook_site_vendor.rb | 46 | ||||
-rw-r--r-- | spec/unit/knife/core/cookbook_scm_repo_spec.rb | 2 | ||||
-rw-r--r-- | spec/unit/knife_spec.rb | 4 |
4 files changed, 7 insertions, 49 deletions
diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 5a4c920a1d..03be083bdb 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -253,3 +253,7 @@ the array form and explicitly add "https://rubygems.org" to their resources. Us either globally or on a resource case-by-case basis. The behavior of the `clear_sources` property is now to only add `--clear-sources` and has no side effects on the source options. + +### `knife cookbook site vendor` has been removed + +Please use `knife cookbook site install` instead. diff --git a/lib/chef/knife/cookbook_site_vendor.rb b/lib/chef/knife/cookbook_site_vendor.rb deleted file mode 100644 index 291715cc0b..0000000000 --- a/lib/chef/knife/cookbook_site_vendor.rb +++ /dev/null @@ -1,46 +0,0 @@ -# -# Author:: Daniel DeLeo (<dan@chef.io>) -# Copyright:: Copyright 2011-2016, Chef Software Inc. -# License:: Apache License, Version 2.0 -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -require "chef/knife" -require "chef/knife/cookbook_site_install" - -class Chef::Knife::CookbookSiteVendor < Chef::Knife::CookbookSiteInstall - - def self.load_deps - superclass.load_deps - end - - def self.options=(new_opts) - superclass.options = new_opts - end - - def self.options - superclass.options - end - - banner(<<-B) -************************************************* -DEPRECATED: please use knife cookbook site install -************************************************* - -#{superclass.banner} -B - - category "deprecated" - -end diff --git a/spec/unit/knife/core/cookbook_scm_repo_spec.rb b/spec/unit/knife/core/cookbook_scm_repo_spec.rb index 137bdddafb..3c16f93533 100644 --- a/spec/unit/knife/core/cookbook_scm_repo_spec.rb +++ b/spec/unit/knife/core/cookbook_scm_repo_spec.rb @@ -83,7 +83,7 @@ BRANCHES it "exits when the git repo is dirty" do @dirty_status = Mixlib::ShellOut.new @dirty_status.stdout.replace(<<-DIRTY) - M chef/lib/chef/knife/cookbook_site_vendor.rb + M chef/lib/chef/knife/cookbook_site_install.rb DIRTY expect(@cookbook_repo).to receive(:shell_out!).with("git status --porcelain", :cwd => @repo_path).and_return(@dirty_status) expect { @cookbook_repo.sanity_check }.to raise_error(SystemExit) diff --git a/spec/unit/knife_spec.rb b/spec/unit/knife_spec.rb index 9569526b2a..00c629b680 100644 --- a/spec/unit/knife_spec.rb +++ b/spec/unit/knife_spec.rb @@ -144,9 +144,9 @@ describe Chef::Knife do end it "finds a subcommand class based on ARGV" do - Chef::Knife.subcommands["cookbook_site_vendor"] = :CookbookSiteVendor + Chef::Knife.subcommands["cookbook_site_install"] = :CookbookSiteInstall Chef::Knife.subcommands["cookbook"] = :Cookbook - expect(Chef::Knife.subcommand_class_from(%w{cookbook site vendor --help foo bar baz})).to eq(:CookbookSiteVendor) + expect(Chef::Knife.subcommand_class_from(%w{cookbook site install --help foo bar baz})).to eq(:CookbookSiteInstall) end it "special case sets the subcommand_loader to GemGlobLoader when running rehash" do |