<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,4 +1,4 @@
-Copyright (c) 2007 Dan Croak, thoughtbot, inc.
+Copyright (c) 2009 Dan Croak, thoughtbot, inc.
 
 Permission is hereby granted, free of charge, to any person obtaining
 a copy of this software and associated documentation files (the</diff>
      <filename>MIT-LICENSE</filename>
    </modified>
    <modified>
      <diff>@@ -12,26 +12,16 @@ sudo gem install thoughtbot-quietbacktrace --source=http://gems.github.com
 Usage
 -----
 
-Silencers remove lines from the backtrace that return true for given conditions.
-Filters modify the output of backtrace lines.
-
-Override the defaults by adding your own backtrace_silencers:
+Silencers remove lines from the backtrace. Create your own:
 
     class Test::Unit::TestCase
-  	  self.new_backtrace_silencer :shoulda do |line| 
-        line.include? 'vendor/plugins/shoulda'
-      end
-      self.backtrace_silencers &lt;&lt; :shoulda
+  	  
     end
 
-Or your own backtrace_filters:
+Filters modify the output of backtrace lines. Create your own:
 
     class Test::Unit::TestCase
-      self.new_backtrace_filter :ruby_path do |line|
-         ruby_file_path = '/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8'
-         line.slice!(0..(line =~ ruby_file_path)) if (line =~ ruby_file_path)
-      end
-      self.backtrace_filters &lt;&lt; :ruby_path
+      
     end
 
 Turn Quiet Backtrace off anywhere in your test suite by setting the flag to false:
@@ -41,20 +31,6 @@ Turn Quiet Backtrace off anywhere in your test suite by setting the flag to fals
 Rails-specific usage
 --------------------
 
-Install the gem and add it your Rails app:
-
-* gem install thoughtbot-quietbacktrace --source http://gems.github.com
-* cd vendor/gems
-* gem unpack quietbacktrace
-
-Quiet Backtrace comes with an excellent Rails-specific silencer and filter.
-They must be added (usually in test_helper.rb) because they are not turned on by default:
-
-    class Test::Unit::TestCase
-      self.backtrace_silencers &lt;&lt; :rails_vendor
-      self.backtrace_filters   &lt;&lt; :rails_root
-    end
-
 Because Quiet Backtrace works by adding attributes onto Test::Unit::TestCase,
 you can add and remove silencers and filters at any level in your test suite,
 down to the individual test. </diff>
      <filename>README.markdown</filename>
    </modified>
    <modified>
      <diff>@@ -1,23 +1,44 @@
 require 'test/unit'
+require 'cattr_accessor'
+require File.join(File.dirname(__FILE__), 'backtrace_cleaner')
 
-def mix_cleaner_into_test_unit
-  require File.join(File.dirname(__FILE__), 'quietbacktrace', 'cleaner')
+module QuietBacktrace
+  module TestCase
+    def self.included(klass)
+      klass.class_eval do
+        cattr_accessor :quiet_backtrace
+        self.quiet_backtrace = true
+      end
+    end
+  end
   
-  Test::Unit::Util::BacktraceFilter.module_eval do 
-    include QuietBacktrace::CleanerForTestUnit 
+  module CleanerForTestUnit
+    def self.included(klass)
+      klass.send :alias_method, :filter_backtrace_without_cleaning, :filter_backtrace
+      klass.send :alias_method, :filter_backtrace, :filter_backtrace_with_cleaning
+    end
+
+    def filter_backtrace_with_cleaning(backtrace)
+      backtrace = filter_backtrace_without_cleaning(backtrace)
+      backtrace = backtrace.first.split(&quot;\n&quot;) if backtrace.size == 1
+      cleaner = QuietBacktrace::BacktraceCleaner.new 
+      cleaner.clean(backtrace)
+    end
   end
 end
 
-def mix_rails_cleaner_into_test_unit
-  require File.join(File.dirname(__FILE__), 'quietbacktrace', 'rails', 'cleaner')
- 
+Test::Unit::TestCase.class_eval { include QuietBacktrace::TestCase }
+
+if Test::Unit::TestCase.quiet_backtrace
   Test::Unit::Util::BacktraceFilter.module_eval do 
-    include QuietBacktrace::Rails::CleanerForTestUnit 
+    include QuietBacktrace::CleanerForTestUnit 
   end
 end
 
-if defined?(Rails)
-  mix_rails_cleaner_into_test_unit
-else
-  mix_cleaner_into_test_unit
-end
+# module Rails
+#   def backtrace_cleaner
+#     @@backtrace_cleaner ||= begin
+#       QuietBacktrace::BacktraceCleaner.new
+#     end
+#   end
+# end</diff>
      <filename>lib/quietbacktrace.rb</filename>
    </modified>
    <modified>
      <diff>@@ -4,43 +4,22 @@ class Test::Unit::TestCase
   
   def setup
     @backtrace = [ &quot;/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/test/unit/assertions.rb:48:in `assert_block'&quot;, 
-                   &quot;/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/test/unit/assertions.rb:495:in `_wrap_assertion'&quot;, 
-                   &quot;/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/test/unit/assertions.rb:46:in `assert_block'&quot;, 
                    &quot;/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/test/unit/assertions.rb:313:in `flunk'&quot;,
                    &quot;/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/benchmark.rb:293&quot;, 
                    &quot;/Users/james/Documents/railsApps/generating_station/app/controllers/photos_controller.rb:315:in `something'&quot;,
                    &quot;/Users/james/Documents/railsApps/generating_station/vendor/plugins/quiet_stacktraces/test/quiet_stacktraces_test.rb:21:in `test_this_plugin'&quot;, 
-                   &quot;/Users/james/Documents/railsApps/generating_station/vendor/plugins/quiet_stacktraces/quiet_stacktraces_test.rb:25:in `test_this_plugin'&quot;,
                    &quot;/Library/Ruby/Gems/1.8/gems/activerecord-1.99.0/lib/active_record/connection_adapters/mysql_adapter.rb:471:in `real_connect'&quot;,
-                   &quot;/Library/Ruby/Gems/1.8/gems/activerecord-1.99.0/lib/active_record/fixtures.rb:895:in `teardown'&quot;,
-                   &quot;/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/test/unit/ui/testrunnermediator.rb:46:in `run_suite'&quot;, 
-                   &quot;/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/test/unit/ui/console/testrunner.rb:67:in `start_mediator'&quot;, 
                    &quot;/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/test/unit/ui/console/testrunner.rb:41:in `start'&quot;, 
-                   &quot;/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/test/unit/ui/testrunnerutilities.rb:29:in `run'&quot;, 
-                   &quot;/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/test/unit/autorunner.rb:216:in `run'&quot;, 
-                   &quot;/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/test/unit/autorunner.rb:12:in `run'&quot;, 
                    &quot;/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/test/unit.rb:278&quot;, 
                    &quot;/Users/james/Documents/railsApps/generating_station/vendor/plugins/quiet_stacktraces/test/quiet_stacktraces_test.rb:20&quot;,
                    &quot;/app/controllers/blogs_controller.rb:5:in `index'&quot;,
-                   &quot;thin (0.6.4) lib/thin/connection.rb:35:in `process'&quot;,
-                   &quot;thin (0.6.4) lib/thin/connection.rb:23:in `receive_data'&quot;,
-                   &quot;eventmachine (0.10.0) lib/eventmachine.rb:1056:in `event_callback'&quot;,
-                   &quot;eventmachine (0.10.0) lib/eventmachine.rb:224:in `run_machine'&quot;,
-                   &quot;eventmachine (0.10.0) lib/eventmachine.rb:224:in `run'&quot;,
-                   &quot;thin (0.6.4) lib/thin/server.rb:113:in `start'&quot;,
-                   &quot;thin (0.6.4) lib/thin/controllers/controller.rb:59:in `start'&quot;,
-                   &quot;thin (0.6.4) lib/thin/runner.rb:143:in `send'&quot;,
-                   &quot;thin (0.6.4) lib/thin/runner.rb:143:in `run_command'&quot;,
-                   &quot;thin (0.6.4) lib/thin/runner.rb:114:in `run!'&quot;,
-                   &quot;thin (0.6.4) bin/thin:6&quot;,
-                   &quot;/opt/local/bin/thin:16:in `load'&quot;,
-                   &quot;/opt/local/bin/thin:16&quot;,
-                   &quot;/Users/dancroak/dev/nationalgazette/vendor/gems/thoughtbot-shoulda-2.0.6/lib/shoulda/controller/macros.rb:193:in `__bind_1230852072_504846'&quot;,
-                   &quot;/Users/dancroak/dev/nationalgazette/vendor/gems/thoughtbot-shoulda-2.0.6/lib/shoulda/context.rb:254:in `call'&quot;,
                    &quot;/Users/dancroak/dev/nationalgazette/vendor/gems/thoughtbot-shoulda-2.0.6/lib/shoulda/context.rb:254:in `test: on a GET to #index.rss should respond with content type of application/rs+xml. '&quot;,
                    &quot;/Users/dancroak/dev/nationalgazette/vendor/rails/activesupport/lib/active_support/testing/setup_and_teardown.rb:94:in `__send__'&quot;,
                    &quot;/Users/dancroak/dev/nationalgazette/vendor/rails/activesupport/lib/active_support/testing/setup_and_teardown.rb:94:in `run'&quot;,
-                   &quot;/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/test/unit/testsuite.rb:34:in `run'&quot;]
+                   &quot;lib/mongrel&quot;, &quot;bin/mongrel&quot;,
+                   &quot;lib/passenger&quot;, &quot;bin/passenger-spawn-server&quot;,
+                   &quot;lib/rack&quot;, &quot;script/server&quot;, 
+                   &quot;rubygems/custom_require&quot;, &quot;benchmark.rb&quot;]
   end
   
   # test &quot;verify something&quot; do</diff>
      <filename>test/test_helper.rb</filename>
    </modified>
  </modified>
  <removed type="array">
    <removed>
      <filename>lib/quietbacktrace/cleaner.rb</filename>
    </removed>
    <removed>
      <filename>lib/quietbacktrace/rails/cleaner.rb</filename>
    </removed>
    <removed>
      <filename>test/cleaner_test.rb</filename>
    </removed>
    <removed>
      <filename>test/rails_cleaner_test.rb</filename>
    </removed>
  </removed>
  <parents type="array">
    <parent>
      <id>294359c371749cbacaefaade3d99359f86936e0b</id>
    </parent>
  </parents>
  <author>
    <name>Dan Croak</name>
    <email>dcroak@thoughtbot.com</email>
  </author>
  <url>http://github.com/thoughtbot/quietbacktrace/commit/6f3eb93fc139dced52f5b83176f49e36ee5b581e</url>
  <id>6f3eb93fc139dced52f5b83176f49e36ee5b581e</id>
  <committed-date>2009-01-01T20:54:55-08:00</committed-date>
  <authored-date>2009-01-01T20:54:55-08:00</authored-date>
  <message>experiment with turning quiet backtrace off</message>
  <tree>d004b3a2de5cc7b3061454da0bd06254e04d1752</tree>
  <committer>
    <name>Dan Croak</name>
    <email>dcroak@thoughtbot.com</email>
  </committer>
</commit>
