lib/quality/rake/task.rb in quality-2.0.1 vs lib/quality/rake/task.rb in quality-2.1.0
- old
+ new
@@ -46,10 +46,15 @@
# Array of strings describing tools to be skipped--e.g., ["cane"]
#
# Defaults to []
attr_accessor :skip_tools
+ # Log command executation
+ #
+ # Defaults to false
+ attr_accessor :verbose
+
# Array of directory names which contain ruby files to analyze.
#
# Defaults to %w(app lib test spec feature), which translates to *.rb in
# the base directory, as well as those directories.
attr_writer :ruby_dirs
@@ -64,10 +69,12 @@
def initialize(args = {})
parse_args(args)
@skip_tools = []
+ @verbose = false
+
@output_dir = 'metrics'
yield self if block_given?
define
@@ -178,10 +185,11 @@
def ratchet_quality_cmd(cmd,
command_options,
&count_violations_on_line)
quality_checker = @quality_checker_class.new(cmd,
command_options,
- @output_dir)
+ @output_dir,
+ verbose)
quality_checker.execute(&count_violations_on_line)
end
def ruby_dirs
@ruby_dirs ||= %w(app lib test spec feature)