<commit_before>class RSpactorFormatter
  attr_accessor :example_group, :options, :where
  def initialize(options, where)
    @options = options
    @where = where
  end
  
  def dump_summary(duration, example_count, failure_count, pending_count)
    img = (failure_count == 0) ? "rails_ok.png" : "rails_fail.png"
    growl "Test Results", "#{example_count} examples, #{failure_count} failures", File.dirname(__FILE__) + "/../images/#{img}", 0
  end

  def start(*ignore_these)
  end

  def add_example_group(*ignore_these)
  end

  def example_started(*ignore_these)
  end

  def example_passed(*ignore_these)
  end

  def example_failed(*ignore_these)
  end
  
  def example_pending( *ignore_these) 
  end

  def start_dump
  end

  def dump_failure(*ignore_these)
  end

  def dump_pending
  end

  def close
  end
  
  def growl(title, msg, img, pri = 0)
    system("growlnotify -w -n rspactor --image #{img} -p #{pri} -m #{msg.inspect} #{title} &") 
  end
end

<commit_msg>cleanup RSpactorFormatter by inheriting from Spec::Runner::Formatter::BaseFormatter<commit_after>require 'spec/runner/formatter/base_formatter'

class RSpactorFormatter < Spec::Runner::Formatter::BaseFormatter
  def dump_summary(duration, total, failures, pending)
    image_path = File.dirname(__FILE__) + "/../images/rails_#{failures.zero?? 'ok' : 'fail'}.png"
    growl "Test Results", "#{total} examples, #{failures} failures", image_path, 0
  end
  
  def growl(title, msg, img, pri = 0)
    system("growlnotify -w -n rspactor --image #{img} -p #{pri} -m #{msg.inspect} #{title} &") 
  end
end


{'fraction_non_alphanumeric': 0.1306277742549144, 'fraction_numerical': 0.0031705770450221942, 'mean_word_length': 4.190789473684211, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6839307', 'n_tokens_mistral': 558, 'n_tokens_neox': 524, 'n_words': 134}