Commit MetaInfo

Revisão87419b018c25adc07bf563b2783739eb2734ea74 (tree)
Hora2016-05-26 17:45:11
AutorTatsuki Sugiura <sugi@nemu...>
CommiterTatsuki Sugiura

Mensagem de Log

Allow multiple argument to upload.

Mudança Sumário

Diff

--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
1+2016-05-26 Tatsuki Sugiura <sugi@nemui.org>
2+
3+ * Version 0.1.3
4+ * frs_uplaod, relfile: Allow multiple target arguments.
5+
16 2016-05-18 Tatsuki Sugiura <sugi@nemui.org>
27
38 * Version 0.1.2
--- a/lib/osdn/cli/command/frs_upload.rb
+++ b/lib/osdn/cli/command/frs_upload.rb
@@ -46,7 +46,13 @@ module OSDN; module CLI; module Command
4646 end
4747 end
4848
49- @target_dir = Pathname.new(ARGV.shift || '.')
49+ (ARGV.empty? ? ['.'] : ARGV).each do |d|
50+ @target_dir = Pathname.new(d)
51+ process_target
52+ end
53+ end
54+
55+ def process_target
5056 proj_info = api.get_project target_proj # check project existance
5157
5258 vars = load_variables(@target_dir)
--- a/lib/osdn/cli/command/relfile.rb
+++ b/lib/osdn/cli/command/relfile.rb
@@ -5,7 +5,7 @@ module OSDN; module CLI; module Command
55 class Relfile < FrsBase
66 def help
77 puts "#{$0} relfile [opts] [list]"
8- puts "#{$0} relfile [opts] create <target-file>"
8+ puts "#{$0} relfile [opts] create <target-file> [target-files...]"
99 puts "#{$0} relfile [opts] update <numeric-file-id>"
1010 puts "#{$0} relfile [opts] delete <numeric-file-id>"
1111 puts "Options:"
@@ -69,12 +69,18 @@ module OSDN; module CLI; module Command
6969 end
7070
7171 def create
72- filename = ARGV.shift
73- if !filename
72+ if ARGV.empty? || ARGV.first == ""
7473 logger.fatal "Target filename is missing."
7574 help
7675 return
7776 end
77+
78+ ARGV.each do |f|
79+ create_one(f)
80+ end
81+ end
82+
83+ def create_one(filename)
7884 file = Pathname('.') + filename
7985 logger.debug "Calculating digest for #{file}..."
8086
--- a/lib/osdn/cli/version.rb
+++ b/lib/osdn/cli/version.rb
@@ -1,5 +1,5 @@
11 module OSDN
22 module CLI
3- VERSION = "0.1.2"
3+ VERSION = "0.1.3"
44 end
55 end
Show on old repository browser