<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>vendor/plugins/hoptoad_notifier/lib/hoptoad_tasks.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/hoptoad_notifier/recipes/hoptoad.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/hoptoad_notifier/test/hoptoad_tasks_test.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/hoptoad_notifier/vendor/ginger/.gitignore</filename>
    </added>
    <added>
      <filename>vendor/plugins/hoptoad_notifier/vendor/ginger/LICENCE</filename>
    </added>
    <added>
      <filename>vendor/plugins/hoptoad_notifier/vendor/ginger/README.textile</filename>
    </added>
    <added>
      <filename>vendor/plugins/hoptoad_notifier/vendor/ginger/Rakefile</filename>
    </added>
    <added>
      <filename>vendor/plugins/hoptoad_notifier/vendor/ginger/bin/ginger</filename>
    </added>
    <added>
      <filename>vendor/plugins/hoptoad_notifier/vendor/ginger/ginger.gemspec</filename>
    </added>
    <added>
      <filename>vendor/plugins/hoptoad_notifier/vendor/ginger/lib/ginger.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/hoptoad_notifier/vendor/ginger/lib/ginger/configuration.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/hoptoad_notifier/vendor/ginger/lib/ginger/kernel.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/hoptoad_notifier/vendor/ginger/lib/ginger/scenario.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/hoptoad_notifier/vendor/ginger/spec/ginger/configuration_spec.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/hoptoad_notifier/vendor/ginger/spec/ginger/kernel_spec.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/hoptoad_notifier/vendor/ginger/spec/ginger/scenario_spec.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/hoptoad_notifier/vendor/ginger/spec/ginger_spec.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/hoptoad_notifier/vendor/ginger/spec/spec_helper.rb</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -74,6 +74,20 @@ controller, you can do something like this:
 The #notify_hoptoad call will send the notice over to hoptoad for later 
 analysis.
 
+TRACKING DEPLOYMENTS IN HOPTOAD
+
+Paying Hoptoad plans support the ability to track deployments of your application in Hoptoad.
+By notify Hoptoad of your application deployments, all errors are resolved when a deploy occurs,
+so that you'll be notified again about any errors that reoccur after a deployment.
+
+Additionally, it's possible to review the errors in Hoptoad that occurred before and after a deploy.
+
+When Hoptoad is installed as a plugin this functionality is loaded automatically (if you have Capistrano version 2.0.0 or greater).
+
+When Hoptoad installed as a gem, you need to add 
+  require 'hoptoad_notifier/recipes/hoptoad'
+to your deploy.rb
+
 GOING BEYOND EXCEPTIONS
 
 You can also pass a hash to notify_hoptoad method and store whatever you want, not just an exception. And you can also use it anywhere, not just in controllers:</diff>
      <filename>vendor/plugins/hoptoad_notifier/README</filename>
    </modified>
    <modified>
      <diff>@@ -20,3 +20,11 @@ Rake::RDocTask.new(:rdoc) do |rdoc|
   rdoc.rdoc_files.include('README')
   rdoc.rdoc_files.include('lib/**/*.rb')
 end
+
+desc 'Run ginger tests'
+task :ginger do
+  $LOAD_PATH &lt;&lt; File.join(*%w[vendor ginger lib])
+  ARGV.clear
+  ARGV &lt;&lt; 'test'
+  load File.join(*%w[vendor ginger bin ginger])
+end</diff>
      <filename>vendor/plugins/hoptoad_notifier/Rakefile</filename>
    </modified>
    <modified>
      <diff>@@ -237,7 +237,9 @@ module HoptoadNotifier
       if self.respond_to? :session
         data[:session] = {
           :key         =&gt; session.instance_variable_get(&quot;@session_id&quot;),
-          :data        =&gt; session.instance_variable_get(&quot;@data&quot;)
+          :data        =&gt; session.respond_to?(:to_hash) ?
+                            session.to_hash :
+                            session.instance_variable_get(&quot;@data&quot;)
         }
       end
 
@@ -337,7 +339,11 @@ module HoptoadNotifier
     end
 
     def serializable?(value) #:nodoc:
-      !(value.is_a?(Module) || value.kind_of?(IO))
+      value.is_a?(Fixnum) || 
+      value.is_a?(Array)  || 
+      value.is_a?(String) || 
+      value.is_a?(Hash)   || 
+      value.is_a?(Bignum)
     end
 
     def stringify_keys(hash) #:nodoc:
@@ -357,3 +363,4 @@ module HoptoadNotifier
     include HoptoadNotifier::Catcher
   end
 end
+</diff>
      <filename>vendor/plugins/hoptoad_notifier/lib/hoptoad_notifier.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,4 +1,13 @@
 namespace :hoptoad do
+  desc &quot;Notify Hoptoad of a new deploy.&quot;
+  task :deploy =&gt; :environment do
+    require 'hoptoad_tasks'
+    HoptoadTasks.deploy(:rails_env      =&gt; ENV['TO'], 
+                        :scm_revision   =&gt; ENV['REVISION'],
+                        :scm_repository =&gt; ENV['REPO'],
+                        :local_username =&gt; ENV['USER'])
+  end
+
   desc &quot;Verify your plugin installation by sending a test exception to the hoptoad service&quot;
   task :test =&gt; :environment do
     require 'action_controller/test_process'</diff>
      <filename>vendor/plugins/hoptoad_notifier/tasks/hoptoad_notifier_tasks.rake</filename>
    </modified>
    <modified>
      <diff>@@ -40,8 +40,10 @@ class ConfigurationTest &lt; ActiveSupport::TestCase
       assert_equal 'secret',            HoptoadNotifier.proxy_pass
       assert_equal 2,                   HoptoadNotifier.http_open_timeout
       assert_equal 5,                   HoptoadNotifier.http_read_timeout
-      assert_equal (HoptoadNotifier::IGNORE_USER_AGENT_DEFAULT + ['UserAgentString', /UserAgentRegexp/]), HoptoadNotifier.ignore_user_agent
-      assert_equal (HoptoadNotifier::IGNORE_DEFAULT + [RuntimeError]), HoptoadNotifier.ignore
+      assert_equal HoptoadNotifier::IGNORE_USER_AGENT_DEFAULT + ['UserAgentString', /UserAgentRegexp/], 
+                   HoptoadNotifier.ignore_user_agent
+      assert_equal HoptoadNotifier::IGNORE_DEFAULT + [RuntimeError], 
+                   HoptoadNotifier.ignore
     end
 
     should &quot;set a default host&quot; do
@@ -49,15 +51,35 @@ class ConfigurationTest &lt; ActiveSupport::TestCase
       assert_equal &quot;hoptoadapp.com&quot;, HoptoadNotifier.host
     end
 
+    [File.open(__FILE__), Proc.new { puts &quot;boo!&quot; }, Module.new].each do |object|
+      should &quot;remove #{object.class} when cleaning environment&quot; do
+        HoptoadNotifier.configure {}
+        notice = @controller.send(:normalize_notice, {})
+        notice[:environment][:strange_object] = object
+
+        assert_nil @controller.send(:clean_non_serializable_data, notice)[:environment][:strange_object]
+      end
+    end
+
+    [123, &quot;string&quot;, 123_456_789_123_456_789, [:a, :b], {:a =&gt; 1}, HashWithIndifferentAccess.new].each do |object|
+      should &quot;not remove #{object.class} when cleaning environment&quot; do
+        HoptoadNotifier.configure {}
+        notice = @controller.send(:normalize_notice, {})
+        notice[:environment][:strange_object] = object
+
+        assert_equal object, @controller.send(:clean_non_serializable_data, notice)[:environment][:strange_object]
+      end
+    end
+
     should &quot;remove notifier trace when cleaning backtrace&quot; do
       HoptoadNotifier.configure {}
-      options = HoptoadNotifier.default_notice_options
+      notice = @controller.send(:normalize_notice, {})
 
-      options = @controller.send(:normalize_notice, {})
-      dirty_backtrace = @controller.send(:clean_hoptoad_backtrace, options[:backtrace])
+      assert notice[:backtrace].grep(%r{lib/hoptoad_notifier.rb}).any?, notice[:backtrace].inspect
 
+      dirty_backtrace = @controller.send(:clean_hoptoad_backtrace, notice[:backtrace])
       dirty_backtrace.each do |line|
-        assert_no_match /lib\/hoptoad_notifier.rb/, line
+        assert_no_match %r{lib/hoptoad_notifier.rb}, line
       end
     end
 </diff>
      <filename>vendor/plugins/hoptoad_notifier/test/configuration_test.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,5 +1,23 @@
 require File.dirname(__FILE__) + '/helper'
 
+def expect_session_data_for(controller)
+  # NOTE: setting expectations on the controller is not a good idea here,
+  # because the controller is the unit we're trying to test. However, as all
+  # exception-related behavior is mixed into the controller itsef, we have
+  # little choice. Delegating notifier methods from the controller to a
+  # Sender could make this easier to maintain and test.
+
+  @controller.expects(:send_to_hoptoad).with do |params|
+    assert params.respond_to?(:to_hash), &quot;The notifier needs a hash&quot;
+    notice = params[:notice]
+    assert_not_nil notice, &quot;No notice passed to the notifier&quot;
+    assert_not_nil notice[:session][:key], &quot;No session key was set&quot;
+    assert_not_nil notice[:session][:data], &quot;No session data was set&quot;
+    true
+  end
+  @controller.stubs(:rescue_action_in_public_without_hoptoad)
+end
+
 def should_notify_normally
   should &quot;have inserted its methods into the controller&quot; do
     assert @controller.methods.include?(&quot;inform_hoptoad&quot;)
@@ -79,6 +97,24 @@ def should_notify_normally
 
     assert_equal(:serializable_data, @controller.send(:clean_notice, raw_notice))
   end
+
+  should &quot;send session data to hoptoad when the session has @data&quot; do
+    expect_session_data_for(@controller)
+    @request = ActionController::TestRequest.new
+    @request.action = 'do_raise'
+    @request.session.instance_variable_set(&quot;@data&quot;, { :message =&gt; 'Hello' })
+    @response = ActionController::TestResponse.new
+    @controller.process(@request, @response)
+  end
+
+  should &quot;send session data to hoptoad when the session responds to to_hash&quot; do
+    expect_session_data_for(@controller)
+    @request = ActionController::TestRequest.new
+    @request.action = 'do_raise'
+    @request.session.stubs(:to_hash).returns(:message =&gt; 'Hello')
+    @response = ActionController::TestResponse.new
+    @controller.process(@request, @response)
+  end
 end
 
 def should_auto_include_catcher</diff>
      <filename>vendor/plugins/hoptoad_notifier/test/controller_test.rb</filename>
    </modified>
    <modified>
      <diff>@@ -3,6 +3,8 @@ require 'rubygems'
 require 'mocha'
 gem 'thoughtbot-shoulda', &quot;&gt;= 2.0.0&quot;
 require 'shoulda'
+
+$LOAD_PATH &lt;&lt; File.join(File.dirname(__FILE__), *%w[.. vendor ginger lib])
 require 'ginger'
 
 require 'action_controller'</diff>
      <filename>vendor/plugins/hoptoad_notifier/test/helper.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>e53e0fc40b3ac23ad5e127900961722b94f5bf16</id>
    </parent>
  </parents>
  <author>
    <name>Matt Jankowski</name>
    <email>mjankowski@thoughtbot.com</email>
  </author>
  <url>http://github.com/thoughtbot/suspenders/commit/8ef2a000509219718b6b328ee5a440e727d10864</url>
  <id>8ef2a000509219718b6b328ee5a440e727d10864</id>
  <committed-date>2009-04-23T06:49:19-07:00</committed-date>
  <authored-date>2009-04-23T06:49:10-07:00</authored-date>
  <message>update notifier</message>
  <tree>3b102f400e21cd86694f0f872e83abd23ffe3fdf</tree>
  <committer>
    <name>Matt Jankowski</name>
    <email>mjankowski@thoughtbot.com</email>
  </committer>
</commit>
