lib/quality/quality_checker.rb in quality-1.3.0 vs lib/quality/quality_checker.rb in quality-1.3.1

- old
+ new

@@ -35,22 +35,21 @@ end def run_command(processor, &count_violations_on_line) @popener.popen(full_cmd) do |file| processor.file = file - @command_output = processor.process!(&count_violations_on_line) + @command_output = processor.process(&count_violations_on_line) end $CHILD_STATUS.exitstatus end def check_exit_status(exit_status) return if @command_options[:gives_error_code_on_violations] - if exit_status != 0 - fail("Error detected running #{full_cmd}. " \ - "Exit status is #{exit_status}, output is [#{out}]") - end + fail("Error detected running #{full_cmd}. " \ + "Exit status is #{exit_status}, " \ + "output is [#{out}]") if exit_status != 0 end def existing_violations if @count_file.exist?(@filename) @count_io.read(@filename).to_i @@ -83,16 +82,16 @@ args = @command_options[:args] args ||= '' @found_output = false if args.size > 0 - "#{get_cmd_with_ruby_hack_prefix} #{args}" + "#{cmd_with_ruby_hack_prefix} #{args}" else - "#{get_cmd_with_ruby_hack_prefix}" + "#{cmd_with_ruby_hack_prefix}" end end - def get_cmd_with_ruby_hack_prefix + def cmd_with_ruby_hack_prefix if defined?(RUBY_ENGINE) && (RUBY_ENGINE == 'jruby') "jruby -S #{@cmd}" elsif RbConfig::CONFIG['host_os'] =~ /mswin|mingw/ "#{@cmd}.bat" else