lib/kicker/options.rb in kicker-2.2.3 vs lib/kicker/options.rb in kicker-2.3.0

- old
+ new

@@ -1,24 +1,29 @@ require 'optparse' class Kicker class << self - attr_accessor :latency, :paths, :silent, :quiet + attr_accessor :latency, :paths, :silent, :quiet, :clear_console def silent? @silent end def quiet? @quiet end + + def clear_console? + @clear_console + end end self.latency = 1 self.paths = %w{ . } self.silent = false self.quiet = false + self.clear_console = false module Options #:nodoc: DONT_SHOW_RECIPES = %w{ could_not_handle_file execute_cli_command dot_kick } def self.recipes_for_display @@ -38,10 +43,14 @@ opt.on('-q', '--quiet', "Quiet output. Don't print timestamps when logging.") do |quiet| Kicker.silent = Kicker.quiet = true end + opt.on('-c', '--clear', "Clear console before each run.") do |clear| + Kicker.clear_console = true + end + opt.on('--[no-]growl', 'Whether or not to use Growl. Default is to use growl.') do |growl| Kicker::Growl.use = growl end opt.on('--growl-command [COMMAND]', 'The command to execute when the Growl succeeded message is clicked.') do |command| @@ -69,6 +78,6 @@ # Returns the global OptionParser instance that recipes can use to add # options. def options Kicker::Options.parser end -end \ No newline at end of file +end