bin/cos in cos-0.1.1 vs bin/cos in cos-0.1.2

- old
+ new

@@ -113,16 +113,16 @@ desc 'download [PATH] [FILE_STORE]', '下载文件(大文件自动分片下载,支持多线程下载,断点续传)' method_option :min_slice_size, aliases: '-m', desc: '最小完整下载大小', type: :numeric, banner: 'bytes' method_option :disable_cpt, aliases: '-d', desc: '禁用断点续传(分片下载时有效)', type: :boolean, default: false method_option :threads, aliases: '-t', desc: '线程数(分片下载时有效)', type: :numeric method_option :download_retry, aliases: '-n', desc: '重试次数(分片下载时有效)', type: :numeric - method_option :slice_size, aliases: '-s', desc: '分片下载时每个分片的大小(分片下载时有效)', type: :numeric + method_option :part_size, aliases: '-s', desc: '分片下载时每个分片的大小(分片下载时有效)', type: :numeric method_option :cpt_file, aliases: '-e', desc: '指定断点续传记录(分片下载时有效)' def download(path, file_store) rescue_errors do file = bucket.download(path, file_store, - enabled_options([:min_slice_size, :disable_cpt, :threads, :download_retry, :slice_size, :cpt_file])) do |percent| + enabled_options([:min_slice_size, :disable_cpt, :threads, :download_retry, :part_size, :cpt_file])) do |percent| puts("下载进度: #{(percent*100).round(2)}%", :green) end puts(file, :blue) puts("#{file_store} 下载完成!", :purple) end @@ -132,15 +132,15 @@ method_option :min_slice_size, aliases: '-m', desc: '最小完整下载大小', type: :numeric, banner: 'bytes' method_option :disable_mkdir, aliases: '-k', desc: '禁止自动创建本地目录', type: :boolean, default: false method_option :disable_cpt, aliases: '-d', desc: '禁用断点续传(分片下载时有效)', type: :boolean, default: false method_option :threads, aliases: '-t', desc: '线程数(分片下载时有效)', type: :numeric method_option :download_retry, aliases: '-n', desc: '重试次数(分片下载时有效)', type: :numeric - method_option :slice_size, aliases: '-s', desc: '分片下载时每个分片的大小(分片下载时有效)', type: :numeric + method_option :part_size, aliases: '-s', desc: '分片下载时每个分片的大小(分片下载时有效)', type: :numeric method_option :cpt_file, aliases: '-e', desc: '指定断点续传记录(分片下载时有效)' def download_all(path, file_store_path) rescue_errors do files = bucket.download_all(path, file_store_path, - enabled_options([:min_slice_size, :disable_mkdir, :disable_cpt, :threads, :download_retry, :slice_size, :cpt_file])) do |percent| + enabled_options([:min_slice_size, :disable_mkdir, :disable_cpt, :threads, :download_retry, :part_size, :cpt_file])) do |percent| puts("下载进度: #{(percent*100).round(2)}%", :green) end files.each do |file| puts(file, :blue) \ No newline at end of file