def run
      sandbox_path = sandbox_cookbook
      share = knife_class.new
      share.ui = logging_ui(share.ui)
      share.config[:cookbook_path] = sandbox_path
      share.name_args = [name, category]
      share.run
    ensure
      FileUtils.remove_dir(sandbox_path)
    end
def run
      sandbox_path = sandbox_cookbook
      share = knife_class.new
      share.ui = logging_ui(share.ui)
      share.config[:cookbook_path] = sandbox_path
      share.name_args = [name, category]
      share.run
    ensure
      FileUtils.remove_dir(sandbox_path)
    end
Creates a new instance.

 @param [Hash] options configuration for a publisher
 @option options [Logger] an optional logger instance
 @option options [String] source_path the path to a git repository
 @option options [String] name (required) the name of the cookbook
 @option options [String] category a Community Site category for the
   cookbook
 @option options [Chef::Knife] knife_class an alternate Knife plugin class
   to create, configure, and invoke
 @raise [ArgumentError] if any required options are not set

 Prepares a sandbox copy of the cookbook and uploads it to the Community
 Site.