Skip to content

A project graphing and visualization tool, based off of Railroad and built to export class diagrams and instance diagrams from within a rails environment.

License

asee/mini_gauge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mini_gauge

Mini Gauge is a project based off of railroad to provide nice Graphviz documentation for a Ruby on Rails project. It was created to solve a few internal concerns with railroad, namely:

  • It loads within the project environment, so any customizations or models available in the environment are available for documentation

  • It comes with support for defining which models and relations appear, instead of everything on one graph

  • It supports instances of objects becoming graphviz objects, with data included

When documenting a large project with 134 models and counting, railroad was useful but too large. Additionally, we needed to show both the relations between the classes and what specific instances looked like before and after an operation.

MiniGauge is loaded within the application and extends ActiveRecord to build a Graphviz dot format document, and to append an instance or class and relations to the document. It comes with a sample rakefile to show how to build documentation on a per-class basis, but can be expanded to document extended relations or instances.

This gem includes rake tasks designed to be run from within a rails application. To enable them, create or find an existing rakefile from your project and add the following line:

Dir["#{Gem.searcher.find('mini_gauge').full_gem_path}/lib/tasks/*.rake"].each { |ext| load ext }

Then from the console run

doc:mini_gauge:graph

to produce a set of dot source files and graphs in doc/graphs

Mini gauge is currently in use internally as a library module, this gem is currently under development as a port of the internal library.

See more about Railroad at railroad.rubyforge.org/

Note on Patches/Pull Requests

  • Fork the project.

  • Make your feature addition or bug fix.

  • Add tests for it. This is important so I don’t break it in a future version unintentionally.

  • Commit, do not mess with rakefile, version, or history. (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)

  • Send me a pull request. Bonus points for topic branches.

Copyright © 2010 ASEE. See LICENSE for details.

About

A project graphing and visualization tool, based off of Railroad and built to export class diagrams and instance diagrams from within a rails environment.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages