CapistranoTrac
by HandleIT
http://handle.it

== DESCRIPTION:

The capistrano_trac library provides capistrano tasks to interact with a project's Trac site.

Currently, the library simply provides 2 tasks for recording deployments and rollbacks of code related to tickets. This is done by parsing the SVN log between deployed revisions, looking for Trac formatted references to tickets (e.g. #70), and appending a comment to the tickets, recording the deployment/rollback.

== FEATURES/PROBLEMS:

* Failure is incredibly ungraceful, though generally unlikely, given that the requirements for accessing the Trac site are roughly the same as those for accessing the repository.
* Currently, the trac user/pass must be the same as the SCM user/pass. It remains to be seen how much of a problem this will be.

== SYNOPSIS:

Include the recipes:
require 'capistrano_trac/recipes'

For the trac tasks to work, the :trac_url variable must be set to the root of your trac site.
For example:
set :trac_url, "http://www.yourtrachost/trac/yourproject"

The 2 trac ticketing tasks are designed to be run in conjunction with a deployment or rollback, although this isn't mandatory.

To automatically document deployments and rollbacks in your capistrano deployment, add the lines:

* after "deploy", "trac:record_deployment"
* before "deploy:rollback", "trac:record_rollback"

Order is important, otherwise the tasks will be looking at the wrong revisions.

To manually record changes, simply run the record_deployment task to document the most recent deployment changes, or the record_rollback task to document a rollback that is about to be run.

== REQUIREMENTS:

* capistrano >= 2.0.0
* mechanize >= 0.6.10

== INSTALL:

* sudo gem install capistrano_trac

== LICENSE:

(The MIT License)

Copyright (c) 2007 FIX

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
'Software'), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.