<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -11,6 +11,15 @@ Throw something like this in your config.ru to enable notifications.
 
     use Rack::HoptoadNotifier, 'fd48c7d26f724503a0280f808f44b339fc65fab8'
 
+You can also exclude certain sensitive environmental variables using the block syntax
+
+    require 'rack_hoptoad'
+
+    use Rack::HoptoadNotifier, 'fd48c7d26f724503a0280f808f44b339fc65fab8' do |notifier|
+      notifier.environment_filters &lt;&lt; %w(MY_SECRET_KEY MY_SECRET_TOKEN)
+    end
+
+
 If your RACK_ENV variable is set to production or staging it'll actually post
 to hoptoad.  It won't process in the other environments.
 </diff>
      <filename>README.md</filename>
    </modified>
    <modified>
      <diff>@@ -9,6 +9,7 @@ module Rack
     def initialize(app, api_key = nil)
       @app = app
       @api_key = api_key
+      @environment_filters = %w(AWS_ACCESS_KEY  AWS_SECRET_ACCESS_KEY AWS_ACCOUNT SSH_AUTH_SOCK)
       yield self if block_given?
     end
 
@@ -25,11 +26,10 @@ module Rack
       send_notification env['rack.exception'], env if env['rack.exception']
       [status, headers, body]
     end
-
-  private
-    def environment_filters
-      @environment_filters ||= %w(AWS_ACCESS_KEY  AWS_SECRET_ACCESS_KEY AWS_ACCOUNT SSH_AUTH_SOCK)
+    def environment_filter_keys
+      @environment_filters.flatten
     end
+  private
 
     def send_notification(exception, env)
       data = {
@@ -132,7 +132,7 @@ module Rack
 
     def clean_hoptoad_environment(environ) #:nodoc:
       environ.each do |k, v|
-        environ[k] = &quot;[FILTERED]&quot; if environment_filters.any? do |filter|
+        environ[k] = &quot;[FILTERED]&quot; if environment_filter_keys.any? do |filter|
           k.to_s.match(/#{filter}/)
         end
       end</diff>
      <filename>lib/rack/hoptoad_notifier.rb</filename>
    </modified>
    <modified>
      <diff>@@ -20,9 +20,11 @@ describe 'Rack::HoptoadNotifier' do
   end
 
   it 'yields a configuration object to the block when created' do
-    pending
-    notifier = Rack::HoptoadNotifier.new(@app, 'pollywog')
-    notifier.api_key.should.equal 'pollywog'
+    notifier = Rack::HoptoadNotifier.new(@app, 'pollywog') do |app|
+      app.environment_filters &lt;&lt; %w(MY_SECRET_STUFF MY_SECRET_KEY)
+    end
+    notifier.environment_filter_keys.should include('MY_SECRET_STUFF')
+    notifier.environment_filter_keys.should include('MY_SECRET_KEY')
   end
 
   it 'catches exceptions raised from app, posts to hoptoad, and re-raises' do</diff>
      <filename>spec/rack_hoptoad_spec.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>38a7852c38ca7749964b9516f6bb1af60ee21f91</id>
    </parent>
  </parents>
  <author>
    <name>Corey Donohoe</name>
    <email>atmos@atmos.org</email>
  </author>
  <url>http://github.com/atmos/rack_hoptoad/commit/aee6c11bedb6ca21bbfa743a95cae77af1860c5a</url>
  <id>aee6c11bedb6ca21bbfa743a95cae77af1860c5a</id>
  <committed-date>2009-05-14T16:43:29-07:00</committed-date>
  <authored-date>2009-05-14T16:43:29-07:00</authored-date>
  <message>add support and specs for using the environment filters code</message>
  <tree>bb1f716e5ec234a9800648c8d5ae28d24873e86d</tree>
  <committer>
    <name>Corey Donohoe</name>
    <email>atmos@atmos.org</email>
  </committer>
</commit>
