This is a specific Arecibo implementation for Ruby on Rails.
Check out of SVN the rails client:
svn co http://arecibo.svn.beanstalkapp.com/clients/trunk/rails/ arecibo
Place this folder into your vendor/plugins directory.
Add in the following two lines into your Rails environment settings, normally this would be config/environment.rb:
ARECIBO_ACCOUNT_NUMBER = 'yourpublicaccount' ARECIBO_RESULT_TEMPLATE = "layouts/arecibo"
Add the following into your application controller (controllers/application.rb):
def rescue_action(exception) report_to_arecibo(exception) end
And finally copy the file from arecibo/assets/arecibo.rhtml into app/views/layouts. This is so that once the error has been sent to Arecibo, an error page is rendered. You can change the ARECIBO_RESULT_TEMPLATE to point to an error file of your liking or simply change the one now in place.
Installation is now complete.
If you wish to use the HTTP transport, then the Rails process will need to be allowed to make HTTP posts to the Arecibo server.
By default we set all 404 as priority 5, 500 as priority 1 and the rest as priority 3. This can be altered in the wrapper.py module.
A UID is generated by Rails is passed on to Arecibo, meaning that by default: UID, IP, server, type, traceback, url, status, user_agent, server and priority are set.
This uses the Ruby library which sets a 10 second time out.
All the sample clients are in SVN, if you create your own client, please let us know.