From f68460aebd4a24997eb3fc01b523191450644fa3 Mon Sep 17 00:00:00 2001 From: Tim Smith Date: Thu, 24 Jan 2019 15:15:25 -0800 Subject: Cleanup requires / includes in knife supermarket 1) Move everything into the deps blocks 2) don't require shell_out in install since we're not using it. We use mixlib_archive now Signed-off-by: Tim Smith --- lib/chef/knife/supermarket_install.rb | 9 +++------ lib/chef/knife/supermarket_share.rb | 7 ++----- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/lib/chef/knife/supermarket_install.rb b/lib/chef/knife/supermarket_install.rb index 1a5ec2a1a1..5a72e6184d 100644 --- a/lib/chef/knife/supermarket_install.rb +++ b/lib/chef/knife/supermarket_install.rb @@ -1,6 +1,6 @@ # # Author:: Christopher Webber () -# Copyright:: Copyright (c) 2014-2018 Chef Software, Inc. +# Copyright:: Copyright (c) 2014-2019 Chef Software, Inc. # License:: Apache License, Version 2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -18,15 +18,14 @@ require "chef/knife" require "chef/exceptions" -require "shellwords" -require "mixlib/archive" class Chef class Knife class SupermarketInstall < Knife deps do - require "chef/mixin/shell_out" + require "shellwords" + require "mixlib/archive" require "chef/knife/core/cookbook_scm_repo" require "chef/cookbook/metadata" end @@ -71,8 +70,6 @@ class Chef attr_reader :vendor_path def run - extend Chef::Mixin::ShellOut - if config[:cookbook_path] Chef::Config[:cookbook_path] = config[:cookbook_path] else diff --git a/lib/chef/knife/supermarket_share.rb b/lib/chef/knife/supermarket_share.rb index bee90a9113..f3f6a8ec38 100644 --- a/lib/chef/knife/supermarket_share.rb +++ b/lib/chef/knife/supermarket_share.rb @@ -1,6 +1,6 @@ # # Author:: Christopher Webber () -# Copyright:: Copyright (c) 2014-2018 Chef Software, Inc. +# Copyright:: Copyright (c) 2014-2019 Chef Software, Inc. # License:: Apache License, Version 2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -17,7 +17,6 @@ # require "chef/knife" -require "chef/mixin/shell_out" class Chef class Knife @@ -29,11 +28,9 @@ class Chef require "chef/cookbook_loader" require "chef/cookbook_uploader" require "chef/cookbook_site_streaming_uploader" - require "mixlib/shellout" + require "chef/mixin/shell_out" end - include Chef::Mixin::ShellOut - banner "knife supermarket share COOKBOOK [CATEGORY] (options)" category "supermarket" -- cgit v1.2.1