
Security News
New Website “Is It Really FOSS?” Tracks Transparency in Open Source Distribution Models
A new site reviews software projects to reveal if they’re truly FOSS, making complex licensing and distribution models easy to understand.
= Mongoid-ERD
Create model-diagram (ERD graph) via Graphviz using the mongoid's model source code.
Export a executable merd:
$ merd | dot -Tpng > docs/erd.png
or:
$ merd --model_dir=other/models | dot -Tpng > docs/erd.png
You can also create only a subset of models by:
$ merd --include=Class1,Class2
or
$ merd --exclude=Class4,Class5
You need to add dot executable in your PATH.
= Class, Inherits and Fields
class xxx:yyy: a record xxx inherit from yyy. The first class that contains include Mongoid::Document on the file will be tracked. yyy will be created as a box node if no corresponding file found.
field :xxx, type:yyy: a field xxx with type yyy. type and default will be tracked.
embeds_many/embeds_one/has_many/has_one :xxx, :as => :yyy: field and a belong_to/embeds_many/embeds_one/has_one link to xxx
belongs_to/embedded_in :xxx: a field without link.
Methods before :private keyword will also be tracked.
= Special Markers
erd_tag user.core tag name of the current class (see configuration files below)
erd{}
class xxx:yyy # erd{fillcolor:xxx} yyy: yyy will become the label of the current class.
field ... # erd{...} xxx: xxx will become the label of that field.
embeds_many ... # erd{...} yyy: yyy will become the label of that edge.
erd -> node_name{color:yyy} label: arbitrage edge with attributes.
= Configuration Files
config/mongoid_erd.yml:
user: {shape: Mrecord}
user.core: {fillcolor: blue}
user.core attributes will be merged to user, then should be merged into class ... # erd{attrs}. Those attributes will passed to dot language as the attributes associate to the class node.
An other will to use tag is restrict output contains only classes with specific tag:
$ merd --tag=user
FAQs
Unknown package
We found that mongoid-erd demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
A new site reviews software projects to reveal if they’re truly FOSS, making complex licensing and distribution models easy to understand.
Security News
Astral unveils pyx, a Python-native package registry in beta, designed to speed installs, enhance security, and integrate deeply with uv.
Security News
The Latio podcast explores how static and runtime reachability help teams prioritize exploitable vulnerabilities and streamline AppSec workflows.