<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -14,7 +14,9 @@ module HoptoadNotifier
     # Overrides the rescue_action method in ActionController::Base, but does not inhibit
     # any custom processing that is defined with Rails 2's exception helpers.
     def rescue_action_in_public_with_hoptoad(exception)
-      HoptoadNotifier.notify_or_ignore(exception, :request =&gt; request)
+      unless ignore_user_agent?
+        HoptoadNotifier.notify_or_ignore(exception, :request =&gt; request)
+      end
       rescue_action_in_public_without_hoptoad(exception)
     end
 </diff>
      <filename>lib/hoptoad_notifier/catcher.rb</filename>
    </modified>
    <modified>
      <diff>@@ -4,18 +4,6 @@ class CatcherTest &lt; Test::Unit::TestCase
 
   include DefinesConstants
 
-  class CollectingSender
-    attr_reader :collected
-
-    def initialize
-      @collected = []
-    end
-
-    def send_to_hoptoad(data)
-      @collected &lt;&lt; data
-    end
-  end
-
   def setup
     super
     reset_config
@@ -44,6 +32,13 @@ class CatcherTest &lt; Test::Unit::TestCase
         local
       end
     end
+    if opts[:user_agent]
+      if opts[:request].respond_to?(:user_agent=)
+        opts[:request].user_agent = opts[:user_agent]
+      else
+        opts[:request].env[&quot;HTTP_USER_AGENT&quot;] = opts[:user_agent]
+      end
+    end
     klass.consider_all_requests_local = opts[:all_local]
     klass.local                       = opts[:local]
     controller = klass.new
@@ -132,12 +127,21 @@ class CatcherTest &lt; Test::Unit::TestCase
     end
   end
 
-  def assert_caught_and_sent
-    assert !HoptoadNotifier.sender.collected.empty?
+  should &quot;ignore exceptions when user agent is being ignored by regular expression&quot; do
+    HoptoadNotifier.configuration.ignore_user_agent_only = [/Ignored/]
+    process_action(:user_agent =&gt; 'ShouldBeIgnored') { raise 'Oh no' }
+    assert_caught_and_not_sent
   end
 
-  def assert_caught_and_not_sent
-    assert HoptoadNotifier.sender.collected.empty?
+  should &quot;ignore exceptions when user agent is being ignored by string&quot; do
+    HoptoadNotifier.configuration.ignore_user_agent_only = ['IgnoredUserAgent']
+    process_action(:user_agent =&gt; 'IgnoredUserAgent') { raise 'Oh no' }
+    assert_caught_and_not_sent
   end
 
+  should &quot;not ignore exceptions when user agent is not being ignored&quot; do
+    HoptoadNotifier.configuration.ignore_user_agent_only = ['IgnoredUserAgent']
+    process_action(:user_agent =&gt; 'NonIgnoredAgent') { raise 'Oh no' }
+    assert_caught_and_sent
+  end
 end</diff>
      <filename>test/catcher_test.rb</filename>
    </modified>
    <modified>
      <diff>@@ -13,19 +13,19 @@ end
 
 def should_notify_normally
   should &quot;send even ignored exceptions if told manually&quot; do
-    expect_something_sent
     @controller.expects(:rescue_action_in_public_without_hoptoad).never
     assert_nothing_raised do
       request(&quot;manual_notify_ignored&quot;)
     end
+    assert_caught_and_sent
   end
 
   should &quot;ignore default exceptions&quot; do
-    expect_nothing_sent
     @controller.expects(:rescue_action_in_public_without_hoptoad)
     assert_nothing_raised do
       request(&quot;do_raise_ignored&quot;)
     end
+    assert_caught_and_not_sent
   end
 
   should &quot;send session data to hoptoad when the session has @data&quot; do
@@ -61,14 +61,6 @@ class ControllerTest &lt; Test::Unit::TestCase
     @controller.stubs(:local_request? =&gt; false)
   end
 
-  def expect_something_sent
-    HoptoadNotifier.sender.expects(:send_to_hoptoad).with(anything)
-  end
-
-  def expect_nothing_sent
-    HoptoadNotifier.sender.expects(:send_to_hoptoad).never
-  end
-
   context &quot;when auto-included&quot; do
     setup do
       HoptoadNotifier.configure do |config|
@@ -87,7 +79,7 @@ class ControllerTest &lt; Test::Unit::TestCase
 
       @controller = ::AutoIncludeController.new
       stub_public_request!
-      stub_sender!
+      HoptoadNotifier.sender = CollectingSender.new
     end
 
     context &quot;when included through the configure block&quot; do
@@ -187,28 +179,26 @@ class ControllerTest &lt; Test::Unit::TestCase
         end
         reset_config
         stub_public_request!
-        stub_sender!
+        HoptoadNotifier.sender = CollectingSender.new
       end
 
       should_notify_normally
 
       context &quot;and configured to ignore_by_filter&quot; do
         setup do
-          HoptoadNotifier.configure do |config|
-            config.ignore_by_filter do |exception_data|
-              if exception_data[:error_class] == &quot;RuntimeError&quot;
-                true if exception_data[:request][:params]['blah'] == 'skip'
-              end
+          HoptoadNotifier.configuration.ignore_by_filter do |exception_data|
+            if exception_data[:error_class] == &quot;RuntimeError&quot;
+              true if exception_data[:request][:params]['blah'] == 'skip'
             end
           end
         end
 
         should &quot;ignore exceptions based on param data&quot; do
-          expect_nothing_sent
           @controller.expects(:rescue_action_in_public_without_hoptoad)
           assert_nothing_raised do
             request(&quot;do_raise&quot;, &quot;get&quot;, nil, :blah =&gt; 'skip')
           end
+          assert_caught_and_not_sent
         end
       end
 
@@ -218,27 +208,27 @@ class ControllerTest &lt; Test::Unit::TestCase
         end
 
         should &quot;still ignore default exceptions&quot; do
-          expect_nothing_sent
           @controller.expects(:rescue_action_in_public_without_hoptoad)
           assert_nothing_raised do
             request(&quot;do_raise_ignored&quot;)
           end
+          assert_caught_and_not_sent
         end
 
         should &quot;ignore specified exceptions&quot; do
-          expect_nothing_sent
           @controller.expects(:rescue_action_in_public_without_hoptoad)
           assert_nothing_raised do
             request(&quot;do_raise_not_ignored&quot;)
           end
+          assert_caught_and_not_sent
         end
 
         should &quot;not ignore unspecified, non-default exceptions&quot; do
-          expect_something_sent
           @controller.expects(:rescue_action_in_public_without_hoptoad)
           assert_nothing_raised do
             request(&quot;do_raise&quot;)
           end
+          assert_caught_and_sent
         end
       end
 
@@ -248,69 +238,54 @@ class ControllerTest &lt; Test::Unit::TestCase
         end
 
         should &quot;no longer ignore default exceptions&quot; do
-          expect_something_sent
           @controller.expects(:rescue_action_in_public_without_hoptoad)
           assert_nothing_raised do
             request(&quot;do_raise_ignored&quot;)
           end
+          assert_caught_and_sent
         end
 
         should &quot;ignore specified exceptions&quot; do
-          expect_nothing_sent
           @controller.expects(:rescue_action_in_public_without_hoptoad)
           assert_nothing_raised do
             request(&quot;do_raise_not_ignored&quot;)
           end
+          assert_caught_and_not_sent
         end
 
         should &quot;not ignore unspecified, non-default exceptions&quot; do
-          expect_something_sent
           @controller.expects(:rescue_action_in_public_without_hoptoad)
           assert_nothing_raised do
             request(&quot;do_raise&quot;)
           end
+          assert_caught_and_sent
         end
       end
 
-      context &quot;and configured to ignore certain user agents&quot; do
-        setup do
-          HoptoadNotifier.configuration.ignore_user_agent &lt;&lt; /Ignored/
-          HoptoadNotifier.configuration.ignore_user_agent &lt;&lt; 'IgnoredUserAgent'
-        end
-
-        should &quot;ignore exceptions when user agent is being ignored&quot; do
-          expect_nothing_sent
-          @controller.expects(:rescue_action_in_public_without_hoptoad)
-          assert_nothing_raised do
-            request(&quot;do_raise&quot;, :get, 'IgnoredUserAgent')
-          end
-        end
-
-        should &quot;ignore exceptions when user agent is being ignored (regexp)&quot; do
-          HoptoadNotifier.configuration.ignore_user_agent_only = [/Ignored/]
-          expect_nothing_sent
-          @controller.expects(:rescue_action_in_public_without_hoptoad)
-          assert_nothing_raised do
-            request(&quot;do_raise&quot;, :get, 'IgnoredUserAgent')
-          end
+      should &quot;ignore exceptions when user agent is being ignored by regular expression&quot; do
+        HoptoadNotifier.configuration.ignore_user_agent_only = [/Ignored/]
+        @controller.expects(:rescue_action_in_public_without_hoptoad)
+        assert_nothing_raised do
+          request(&quot;do_raise&quot;, :get, 'IgnoredUserAgent')
         end
+        assert_caught_and_not_sent
+      end
 
-        should &quot;ignore exceptions when user agent is being ignored (string)&quot; do
-          HoptoadNotifier.configuration.ignore_user_agent_only = ['IgnoredUserAgent']
-          expect_nothing_sent
-          @controller.expects(:rescue_action_in_public_without_hoptoad)
-          assert_nothing_raised do
-            request(&quot;do_raise&quot;, :get, 'IgnoredUserAgent')
-          end
+      should &quot;ignore exceptions when user agent is being ignored by string&quot; do
+        HoptoadNotifier.configuration.ignore_user_agent_only = ['IgnoredUserAgent']
+        @controller.expects(:rescue_action_in_public_without_hoptoad)
+        assert_nothing_raised do
+          request(&quot;do_raise&quot;, :get, 'IgnoredUserAgent')
         end
+        assert_caught_and_not_sent
+      end
 
-        should &quot;not ignore exceptions when user agent is not being ignored&quot; do
-          expect_something_sent
-          @controller.expects(:rescue_action_in_public_without_hoptoad)
-          assert_nothing_raised do
-            request(&quot;do_raise&quot;)
-          end
+      should &quot;not ignore exceptions when user agent is not being ignored&quot; do
+        @controller.expects(:rescue_action_in_public_without_hoptoad)
+        assert_nothing_raised do
+          request(&quot;do_raise&quot;)
         end
+        assert_caught_and_sent
       end
     end
   end</diff>
      <filename>test/controller_test.rb</filename>
    </modified>
    <modified>
      <diff>@@ -148,6 +148,15 @@ class Test::Unit::TestCase
       }
     }
   end
+
+  def assert_caught_and_sent
+    assert !HoptoadNotifier.sender.collected.empty?
+  end
+
+  def assert_caught_and_not_sent
+    assert HoptoadNotifier.sender.collected.empty?
+  end
+
 end
 
 module DefinesConstants
@@ -185,6 +194,19 @@ class Array
       end
     end
   end
+
+end
+
+class CollectingSender
+  attr_reader :collected
+
+  def initialize
+    @collected = []
+  end
+
+  def send_to_hoptoad(data)
+    @collected &lt;&lt; data
+  end
 end
 
 class FakeLogger</diff>
      <filename>test/helper.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>568a97350432f02d851fa08ce4cbcb88d02dab7e</id>
    </parent>
  </parents>
  <author>
    <name>Joe Ferris</name>
    <email>jferris@metaphor.local</email>
  </author>
  <url>http://github.com/thoughtbot/hoptoad_notifier/commit/4532c9fe6fccd547aeee6c1964bd802ff854ba53</url>
  <id>4532c9fe6fccd547aeee6c1964bd802ff854ba53</id>
  <committed-date>2009-11-05T08:12:09-08:00</committed-date>
  <authored-date>2009-07-31T12:28:53-07:00</authored-date>
  <message>Restored user agent ignoring</message>
  <tree>8c87c45e455c65eca2e21090590a2a05d9a2c97e</tree>
  <committer>
    <name>Joe Ferris</name>
    <email>jferris@metaphor.local</email>
  </committer>
</commit>
