Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Rake tasks for use with Railroad

  • Loading branch information...
commit 38af5b61347d329484c02f303e72f5a43ebc7755 1 parent 28fefa2
@ffmike authored
View
1  README.textile
@@ -66,6 +66,7 @@ h3. Coding Tools
* "will-paginate":http://wiki.github.com/mislav/will_paginate for pagination
* "annotate":http://github.com/ctran/annotate_models to annotate models, exemplars, and routes
* "carmen":http://github.com/jim/carmen to handle state and country selects
+* rake doc:diagram tasks for use with "railroad":http://railroad.rubyforge.org/
h3. Database Tools
View
3  patterns/default/doc/README_FOR_APP
@@ -44,7 +44,8 @@ Coding Tools
#{'- jQuery and jQueryUI' if javascript_library == 'jquery'}
#{' jQuery files are uncompressed, but Jammit will recompress them on deploy. You may want a custom jQueryUI from http://jqueryui.com/download' if javascript_library == 'jquery'}
- Annotate for annotating model, exemplar, and route files
-- Carmen to handle state and country selects
+- Carmen to handle state and country selects
+- rake doc:diagram tasks for use with railroad
Database Tools
==============
View
13 patterns/default/lib/tasks/diagrams.rake
@@ -0,0 +1,13 @@
+namespace :doc do
+ namespace :diagram do
+ task :models do
+ sh "railroad -i -l -a -m -M | dot -Tsvg | sed 's/font-size:14.00/font-size:11.00/g' > doc/models.svg"
+ end
+
+ task :controllers do
+ sh "railroad -i -l -C | neato -Tsvg | sed 's/font-size:14.00/font-size:11.00/g' > doc/controllers.svg"
+ end
+ end
+
+ task :diagrams => %w(diagram:models diagram:controllers)
+end
View
4 templates/lark/main.rb
@@ -137,7 +137,9 @@
rakefile 'mail.rake', load_pattern('lib/tasks/mail.rake')
end
# rakefile for use with annotate
-rakefile 'annotate.rake', load_pattern('lib/tasks/annotate.rake')
+rakefile 'annotate.rake', load_pattern('lib/tasks/annotate.rake')
+# adds railroad tasks
+rakefile 'diagrams.rake', load_pattern('lib/tasks/diagrams.rake')
# adds rake doc:dnote
rakefile 'doc.rake', load_pattern('lib/tasks/doc.rake')
# rakefile for database sizes
Please sign in to comment.
Something went wrong with that request. Please try again.