Skip to content

Instantly share code, notes, and snippets.

@mischa
Created December 16, 2008 02:52
Show Gist options
  • Select an option

  • Save mischa/36235 to your computer and use it in GitHub Desktop.

Select an option

Save mischa/36235 to your computer and use it in GitHub Desktop.
Run Railroad as a rake task
#(Thanks to Thomas Ritz, http://www.galaxy-ritz.de ,for the code.)
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment