lib/qiita/arguments.rb in qiita-1.3.2 vs lib/qiita/arguments.rb in qiita-1.3.3

- old
+ new

@@ -31,11 +31,11 @@ def ssl !slop_options["no-ssl-verification"] end def method_name - ARGV[0] + @argv[0] end def params params_from_stdin.merge(parsed_argv_data[:params]) end @@ -104,10 +104,10 @@ def parsed_argv_data @parsed_argv_data ||= begin params = {} headers = {} arguments = [] - ARGV[1..-1].each do |section| + @argv[1..-1].each do |section| case when /(?<key>.+):(?<value>[^=]+)/ =~ section headers[key] = value when /(?<key>.+):=(?<value>.+)/ =~ section params[key] = JSON.parse(%<{"key":#{value}}>)["key"]