GithubHelp home page GithubHelp logo

isabella232 / yard-metasploit-erd Goto Github PK

View Code? Open in Web Editor NEW

This project forked from rapid7/yard-metasploit-erd

0.0 0.0 0.0 441 KB

YARD plugin that uses metasploit-erd to add Entity-Relationship Diagrams to each namespace Module and ActiveRecord::Base subclass's documentation.

License: BSD 3-Clause "New" or "Revised" License

Ruby 91.79% HTML 8.21%

yard-metasploit-erd's Introduction

YARD::Metasploit::ERD Build StatusCode ClimateCoverage StatusDependency StatusGem Version

yard-metasploit-erd is a YARD plugin that automatically inserts an "Entity-Relationship Diagram" subsection containing a PNG Entity-Relationship Diagram for the entire schema (on the index page), for each Module that contains ActiveRecord::Base subclasses and for each ActiveRecord::Base subclass.

For namespace Modules, the diagrams are restricted to the ActiveRecord::Base subclasses in that namespace and the transitive closure of those classes belongs_to relationships.

Mdm::Module::Author ERD

For ActiveRecord::Base subclasses the diagram is restricted to the transitive closure of its belongs_to relationships.

Mdm::Module namespace ERD

Using the belongs_to transitive closure means that all foreign keys are mapped to primary keys, so any diagram's namespace or class could be extracted to another gem without leaving dangling foreign keys.

Versioning

YARD::Metasploit::ERD is versioned using semantic versioning 2.0. Each branch should set YARD::Metasploit::ERD::Version::PRERELEASE to the branch name, while master should have no PRERELEASE and the PRERELEASE section of YARD::Metasploit::ERD::VERSION does not exist.

Installation

Add this line to your application's Gemfile:

gem 'yard-metasploit-erd'

And then execute:

$ bundle

Or install it yourself as:

$ gem install yard-metasploit-erd

Usage

Add this line to your application's .yardopts

--plugin yard-metasploit-erd

Ensure your ActiveRecord::Base subclasses are loaded when YARD runs by eager loading before the yard:doc task runs:

# lib/tasks/yard.rake
task 'yard:doc' => :eager_load

task eager_load: :environment do
  Rails.application.eager_load!
end

Contributing

  1. Fork it ( https://github.com/[my-github-username]/yard-metasploit-erd/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 new Pull Request

yard-metasploit-erd's People

Contributors

bpatterson-r7 avatar bturner-r7 avatar cdoughty-r7 avatar darkbushido avatar farias-r7 avatar gmikeska-r7 avatar jmartin-tech avatar limhoff-r7 avatar msjenkins-r7 avatar shuckins-r7 avatar trosen-r7 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.