Permalink
Browse files

Add display-timestamps option to executable

  • Loading branch information...
1 parent 9ed48ba commit 4a02d017af8fe528df6e62b194b760ab588411e0 @markmcspadden markmcspadden committed Dec 15, 2011
Showing with 9 additions and 1 deletion.
  1. +9 −1 bin/bugspots
View
@@ -16,6 +16,11 @@ OptionParser.new do |opts|
opts.on('-d', '--depth [depth]', 'depth of log crawl (integer)') do |d|
options[:depth] = d.to_i
end
+
+ # Option: Set Timestamp Display
+ opts.on('--display-timestamps', 'show timestamps of each identified fix commit') do |dt|
+ options[:display_timestamps] = true
+ end
end.parse!
# Set a reasonable default of depth
@@ -30,7 +35,10 @@ puts
puts "\tFixes:".foreground(:green).underline
fixes.each do |fix|
- puts "\t\t- #{fix.message}".foreground(:yellow)
+ message = "\t\t- "
+ message << "#{fix.date} " if options[:display_timestamps]
+ message << "#{fix.message}"
+ puts message.foreground(:yellow)
end
puts "\n"

0 comments on commit 4a02d01

Please sign in to comment.