mermaid 0.0.5 → 0.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/lib/mermaid/element_renderers/erd_entity_renderer.rb +16 -2
- data/lib/mermaid/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 82eb20d2315cbe0cf01d624664b573947d891b7f142d531a47805531724232b1
|
4
|
+
data.tar.gz: '02801805d9f7361fd32e575f0db38cfcafbcf92a542c47eae9990c554c2d1924'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 471e35230eeab9df0e9dd6bb4d42bdfc386027af84defb2e20a2b3ca4b0244fa68dc30090a2a5480e06279e94862a58daaa954eaeafca22ffda9abb65932a85a
|
7
|
+
data.tar.gz: 06bc39252e24a72bec57c1566876921010d1319ee171571d61d8acc1ec499038d70dc311201ad6702d8ef45372f10b3d415eb66251f08777a773d429ca92140e
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,13 @@
|
|
1
1
|
## [Unreleased]
|
2
2
|
|
3
|
+
## [0.0.6](https://github.com/seuros/mermaid-ruby/compare/mermaid/v0.0.5...mermaid/v0.0.6) (2025-08-14)
|
4
|
+
|
5
|
+
|
6
|
+
### Bug Fixes
|
7
|
+
|
8
|
+
* conform to mermaid standard syntax. This will allow user to gene… ([9081725](https://github.com/seuros/mermaid-ruby/commit/90817257b7b7a8bab28b1aff250ee5ac83eaa85c))
|
9
|
+
* conform to mermaid standard syntax. This will allow user to generate ERD compatible with Github ([f6574b5](https://github.com/seuros/mermaid-ruby/commit/f6574b54f959f15e9d37f88709fe21b77987293a))
|
10
|
+
|
3
11
|
## [0.0.5](https://github.com/seuros/mermaid-ruby/compare/mermaid/v0.0.4...mermaid/v0.0.5) (2025-07-11)
|
4
12
|
|
5
13
|
|
@@ -10,8 +10,22 @@ module Mermaid
|
|
10
10
|
fragment = "\"#{name}\" {\n"
|
11
11
|
entity_attributes.each do |attr|
|
12
12
|
fragment << " #{attr.type} #{attr.name}"
|
13
|
-
|
14
|
-
|
13
|
+
|
14
|
+
# Separate Mermaid-native constraints from comment-only constraints
|
15
|
+
unless attr.keys.empty?
|
16
|
+
native_keys = attr.keys.select { |key| %i[PK FK].include?(key) }
|
17
|
+
comment_keys = attr.keys.select { |key| [:UK].include?(key) }
|
18
|
+
|
19
|
+
# Add native keys first
|
20
|
+
fragment << " #{native_keys.join(' ')}" unless native_keys.empty?
|
21
|
+
|
22
|
+
# Quote UK as comment to mark it as comment
|
23
|
+
comment_keys.each do |key|
|
24
|
+
fragment << " \"#{key}\""
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
# Add explicit comment if present
|
15
29
|
fragment << " \"#{attr.comment}\"" if attr.comment && !attr.comment.empty?
|
16
30
|
fragment << "\n"
|
17
31
|
end
|
data/lib/mermaid/version.rb
CHANGED