Skip to content

Commit

Permalink
Add Rails Mermaid ERD gem
Browse files Browse the repository at this point in the history
Why these changes are being introduced:

EngX has been discussing ways to add more visual documentation
to our applications. The Rails Mermaid ERD gem is one way to
achieve that.

Relevant ticket(s):

N/A

How this addresses that need:

This adds the Rails Mermaid ERD gem and a note about updating
the diagram to the PR template. However, it does not include the
actual ERD markdown, because seems that it doesn't actually work
just yet (see side effects).

Side effects of this change:

There's a Mermaid rendering issue on GitHub. Apparently, [this has
been fixed upstream, but GitHub is a few versions behind](mermaid-js/mermaid#4388).

I think it makes sense to add the gem for now, but I'm open to
waiting until everything is working properly.
  • Loading branch information
jazairi committed Aug 28, 2023
1 parent 6852e65 commit 62946fa
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,15 @@
[our guide](https://mitlibraries.github.io/guides/basics/a11y.html) and
all issues introduced by these changes have been resolved or opened as new
issues (link to those issues in the Pull Request details above)
- [ ] ERD has been updated (if applicable)
- [ ] Stakeholder approval has been confirmed (or is not needed)

#### Code Reviewer

- [ ] The commit message is clear and follows our guidelines
(not just this pull request message)
- [ ] There are appropriate tests covering any new functionality
- [ ] The documentation has been updated or is unnecessary
- [ ] The documentation, including ERD, has been updated or is unnecessary
- [ ] The changes have been verified
- [ ] New dependencies are appropriate or there were no changes

Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,6 @@ coverage

storage
.vscode

# Ignore Rails Mermaid ERD gem generated HTML. (We put the markdown in the readme instead.)
docs/etd_erd.html
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ group :development do
gem 'dotenv-rails'
gem 'letter_opener'
gem 'listen'
gem 'rails-mermaid_erd'
gem 'rubocop'
gem 'rubocop-rails'
gem 'scout_apm'
Expand Down
1 change: 1 addition & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -449,6 +449,7 @@ DEPENDENCIES
pg
puma
rails (~> 7.0)
rails-mermaid_erd
rubocop
rubocop-rails
rubyzip
Expand Down
3 changes: 3 additions & 0 deletions config/mermaid_erd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# result path
# default "mermaid_erd/index.html"
result_path: docs/etd_erd.html

0 comments on commit 62946fa

Please sign in to comment.