class Berkshelf::Uploader
def run
def run Berkshelf.log.info "Uploading cookbooks" cookbooks = if names.empty? Berkshelf.log.debug " No names given, using all cookbooks" filtered_cookbooks else Berkshelf.log.debug " Names given (#{names.join(", ")})" names.map { |name| lockfile.retrieve(name) } end # Perform all validations first to prevent partially uploaded cookbooks Validator.validate_files(cookbooks) upload(cookbooks) cookbooks end