The pulse gem currently defines the method as:
def pulse render :text => "OK" end
We've had a similar action in our applications for quite some time, although I really like the idea of externalizing it to a gem. Our implementation is slightly different though. Since so many rails applications depend on a database, I instead added:
def pulse rows = ActiveRecord::Base.connection.execute("select 1 from dual").num_rows rescue 0 render :text => rows == 1 ? "OK" : "Error!" end
Now you are not only testing your application is live, but that it can connect to the database.
