= RailRoad RailRoad generates models and controllers diagrams in DOT language for a Rails application. = Usage Run RailRoad on the Rails application's root directory. You can redirect its output to a .dot file or pipe it to the dot or neato utilities to produce a graphic. Model diagrams are intended to be processed using dot and controller diagrams are best processed using neato. railroad [options] [command] == Options -a, --all Include all models (not ActiveRecord::Base derived) -b, --brief Generate compact diagram (no attributes nor methods) -c, --compact Concentrate edges -l, --label Add a label with diagram information (type, date, version) -i, --inherit Include inheritance relations -h, --help Display this help message and exit -v, --version Display version information and exit == Commands -M Generate models diagram -C Generate controllers diagram == Examples railroad -M > models.dot Produces a models diagram to the file 'models.dot' railroad -a -i -M > full_models.dot Models diagram with all classes showing inheritance relations railroad -M | dot -Tsvg > models.svg Model diagram in SVG format railroad -C | neato -Tpng > controllers.png Controller diagram in PNG format railroad -h Shows usage help = Processing DOT files To produce a PNG image from model diagram generated by RailRoad you can issue the following command: dot -Tpng models.dot > models.png If you want to do the same with a controller diagram, use neato instead of dot: neato -Tpng controllers.dot > controllers.png If you want to produce SVG (vectorial, scalable, editable) files, you can do the following: dot -Tsvg models.dot > models.svg neato -Tsvg controllers.dot > controllers.svg Important: There is a bug in Graphviz tools when generating SVG files that cause a text overflow. You can solve this problem editing (with a text editor, not a graphical SVG editor) the file and replacing around line 12 "font-size:14.00;" by "font-size:11.00;". Note: For viewing and editing SVG there is an excellent opensource tool called Inkscape (similar to Adobe Illustrator. For DOT processing you can also use Omnigraffle (on Mac OS X). = Requirements RailRoad has been tested with Ruby 1.8.5 and Rails 1.1.6 to 1.2.3 applications. There is no additional requirements (nevertheless, all your Rails application requirements must be installed). In order to view/export the DOT diagrams, you'll need the processing tools from Graphviz. = Website and Project Home http://railroad.rubyforge.org/ = License RailRoad is distributed under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. = Author Javier Smaldone (javier -at- smaldone -dot- com -dot- ar)