<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>lib/pulse.rb</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -1,3 +1 @@
-require File.dirname(__FILE__) + '/lib/pulse_controller'
-require File.dirname(__FILE__) + '/lib/pulse_helper'
-require File.dirname(__FILE__) + '/lib/routes'
+require File.dirname(__FILE__) + &quot;/lib/pulse&quot;
\ No newline at end of file</diff>
      <filename>init.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,10 +1,18 @@
 class PulseController &lt; ActionController::Base
   session :off
 
+  #The pulse action. Runs &lt;tt&gt;select 1&lt;/tt&gt; on the DB. If a sane result is
+  #returned, 'OK' is displayed and a 200 response code is returned. If not,
+  #'ERROR' is returned along with a 500 response code.
   def pulse
-    render :text =&gt; &quot;&lt;html&gt;&lt;body&gt;OK&lt;/body&gt;&lt;/html&gt;&quot;
+    if (ActiveRecord::Base.connection.execute(&quot;select 1 from dual&quot;).num_rows rescue 0) == 1
+      render :text =&gt; &quot;&lt;html&gt;&lt;body&gt;OK  #{Time.now.utc.to_s(:db)}&lt;/body&gt;&lt;/html&gt;&quot;
+    else
+      render :text =&gt; '&lt;html&gt;&lt;body&gt;ERROR&lt;/body&gt;&lt;/html&gt;', :status =&gt; :internal_server_error
+    end
   end
-  
+
+  #cancel out loggin for the PulseController by defining logger as &lt;tt&gt;nil&lt;/tt&gt;
   def logger
     nil
   end</diff>
      <filename>lib/pulse_controller.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>a5a169fe79cf0b74337883847940b3a6f02e2c71</id>
    </parent>
  </parents>
  <author>
    <name>Jesse Newland</name>
    <email>jnewland@gmail.com</email>
  </author>
  <url>http://github.com/jnewland/pulse/commit/de42e8c8a17d0ec46b9641a1e1d1b394ca98d988</url>
  <id>de42e8c8a17d0ec46b9641a1e1d1b394ca98d988</id>
  <committed-date>2008-10-03T14:10:29-07:00</committed-date>
  <authored-date>2008-10-03T14:10:29-07:00</authored-date>
  <message>add in DB support, fix loading so this can be installed as a gem</message>
  <tree>822740f9ece0920690ccfe7d9d7b835cc2eaf2f6</tree>
  <committer>
    <name>Jesse Newland</name>
    <email>jnewland@gmail.com</email>
  </committer>
</commit>
