We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent efe8477 commit d0140c8Copy full SHA for d0140c8
ruby/browse.rb
@@ -55,14 +55,16 @@ def browse args={}, forcetype = nil
55
if __FILE__ == $0
56
unless ARGV.size > 0
57
puts "\nusage: ruby browse.rb jsonfile OR"
58
- puts " ruby browse.rb jsonfile [json|csv|standard|xml]"
+ puts " ruby browse.rb jsonfile [json|csv|standard|xml] OR"
59
exit
60
end
61
- require 'json'
62
b = Browse.new('http://localhost:8983/solr/select/?')
63
args = eval(File.open(ARGV[0]).read)
64
ARGV[1] = 'standard' if ARGV[1] == 'xml'
65
- b.browse args, ARGV[1]
+ unless args.kind_of? Array
+ args = [args]
66
+ end
67
+ args.each {|a| b.browse a, ARGV[1]}
68
69
70
0 commit comments