lib/gizzard/commands.rb in gizzmo-0.8.2 vs lib/gizzard/commands.rb in gizzmo-0.8.3
- old
+ new
@@ -389,16 +389,23 @@
end
end
class ReportCommand < ShardCommand
def run
+
things = @argv.map do |shard|
parse(down(ShardId.parse(shard))).join("\n")
end
- group(things).each do |string, things|
- puts "=== " + sign(string) + ": #{things.length}" + " ===================="
- puts string
+ if command_options.flat
+ things.zip(@argv).each do |thing, shard_id|
+ puts "#{sign(thing)}\t#{shard_id}"
+ end
+ else
+ group(things).each do |string, things|
+ puts "=== " + sign(string) + ": #{things.length}" + " ===================="
+ puts string
+ end
end
end
def sign(string)
::Digest::MD5.hexdigest(string)[0..10]