Skip to content

Extracts all models and objects in a rails app to UML diagrams

License

Notifications You must be signed in to change notification settings

manuel84/rails2use

Repository files navigation

Gem Version travis Code Climate

Rails2use

Extracts all rails model to one UML file written in USE (UML-based Specification Environment).

Currently is only ActiveRecord supported. Wrappers for Mongoid and others are planned.

Installation

Add this line to your application's Gemfile:

gem 'rails2use'

And then execute:

$ bundle

Or install it yourself as:

$ gem install rails2use

Usage

Running Rake-Task:

rake doc:uml FORMAT=use|plantuml TYPE=object,class

Options:

  • FORMAT: use | plantuml (default = plantuml)
  • TYPE: object | class (default = object,class)
  • OUTPUT: filename (default = doc/output.puml)

You can use multiple options in a comma separated way

Using in Ruby:

require 'Rails2use'

Rails2use.extract! # default will extract the use file to rails_project/doc/gen/uml/output.use

Rails2use.extract! file: Rails.root.join('doc', 'gen', 'api', 'uml', 'apiv2.use') # the folder structure will be automtically generated

Contributing

  1. Fork it ( https://github.com/[my-github-username]/rails2use/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

About

Extracts all models and objects in a rails app to UML diagrams

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages