ea 0.2.0 → 0.2.1
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/README.adoc +131 -0
- data/exe/ea +1 -0
- data/lib/ea/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e5f5e58db4cb228d4e35c2d250b57d4b8874c9545d90aacc6792755d6637c121
|
|
4
|
+
data.tar.gz: 4ba8ca434a0ec8c6e3f09f27a828e05b035df520f1a104de7e0b38d2b2de6d24
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f680d715948b18cca3848bcf436a05e9d30ce9dd9a49303f83038ad760e9a9c09eeb71301b63fb04343ad269e2b4b30467c258cdb392c3e252db171bd454223f
|
|
7
|
+
data.tar.gz: a147e69b20c373722320d2d78b796c6c2550c350017a8ff1398be6d25c1a2906d95e048314211785db8781f9bebeb0e193965965fef4e2fd0a2fa1fba5233a98
|
data/README.adoc
ADDED
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
= ea
|
|
2
|
+
Ronald Tse <open.source@ribose.com>
|
|
3
|
+
:doctype: article
|
|
4
|
+
:toc: left
|
|
5
|
+
:toclevels: 3
|
|
6
|
+
:source-highlighter: highlightjs
|
|
7
|
+
|
|
8
|
+
Standalone Ruby gem for parsing Sparx Enterprise Architect data files
|
|
9
|
+
(QEA SQLite database and Sparx XMI). Pure parse, optional bridge to
|
|
10
|
+
`lutaml-uml` for cross-vendor UML output and SPA generation.
|
|
11
|
+
|
|
12
|
+
== Installation
|
|
13
|
+
|
|
14
|
+
gem install ea
|
|
15
|
+
|
|
16
|
+
For SPA generation (optional):
|
|
17
|
+
|
|
18
|
+
gem install ea lutaml-uml
|
|
19
|
+
|
|
20
|
+
Or in your Gemfile:
|
|
21
|
+
|
|
22
|
+
source "https://rubygems.org"
|
|
23
|
+
gem "ea", "~> 0.2"
|
|
24
|
+
gem "lutaml-uml", "~> 0.5" # optional: SPA + SVG diagram rendering
|
|
25
|
+
|
|
26
|
+
== Quick start
|
|
27
|
+
|
|
28
|
+
=== Parse a QEA file (pure — no lutaml-uml needed)
|
|
29
|
+
|
|
30
|
+
[source,ruby]
|
|
31
|
+
----
|
|
32
|
+
require "ea"
|
|
33
|
+
|
|
34
|
+
db = Ea.parse("model.qea") #=> Ea::Qea::Database
|
|
35
|
+
puts "#{db.packages.size} packages, #{db.objects.size} objects"
|
|
36
|
+
----
|
|
37
|
+
|
|
38
|
+
=== Generate a SPA from QEA (requires lutaml-uml)
|
|
39
|
+
|
|
40
|
+
[source,bash]
|
|
41
|
+
----
|
|
42
|
+
ea spa model.qea --output browser.html
|
|
43
|
+
----
|
|
44
|
+
|
|
45
|
+
Produces a single-file Vue IIFE HTML (~300KB for a typical model)
|
|
46
|
+
with package hierarchy, class details, and diagram navigation.
|
|
47
|
+
|
|
48
|
+
=== Generate Sparx XMI from QEA (pure — no lutaml-uml)
|
|
49
|
+
|
|
50
|
+
[source,bash]
|
|
51
|
+
----
|
|
52
|
+
ea convert model.qea --to xmi --output model.xmi
|
|
53
|
+
----
|
|
54
|
+
|
|
55
|
+
=== Extract a diagram as SVG (requires lutaml-uml)
|
|
56
|
+
|
|
57
|
+
[source,bash]
|
|
58
|
+
----
|
|
59
|
+
ea diagrams extract model.qea "Diagram Name" --output diagram.svg
|
|
60
|
+
----
|
|
61
|
+
|
|
62
|
+
== Architecture
|
|
63
|
+
|
|
64
|
+
The ea gem has two layers:
|
|
65
|
+
|
|
66
|
+
=== Pure layer (no lutaml-uml dependency)
|
|
67
|
+
|
|
68
|
+
[cols="1,2"]
|
|
69
|
+
|===
|
|
70
|
+
| `Ea.parse(path)` | Returns `Ea::Qea::Database` (.qea) or `Xmi::Sparx::Root` (.xmi)
|
|
71
|
+
| `Ea::Transformers::QeaToXmi` | Converts `Ea::Qea::Database` → Sparx XMI string
|
|
72
|
+
| `Ea::Qea.load(path)` | Low-level QEA loader → `Ea::Qea::Database`
|
|
73
|
+
| `Ea::Xmi.load(path)` | Low-level XMI loader → `Xmi::Sparx::Root`
|
|
74
|
+
|===
|
|
75
|
+
|
|
76
|
+
=== Bridge layer (optional — lazy-requires lutaml-uml)
|
|
77
|
+
|
|
78
|
+
[cols="1,2"]
|
|
79
|
+
|===
|
|
80
|
+
| `Ea.to_uml(path_or_model)` | Returns `Lutaml::Uml::Document` (tool-agnostic)
|
|
81
|
+
| `Ea::Bridge::QeaToUml` | `Ea::Qea::Database` → `Lutaml::Uml::Document`
|
|
82
|
+
| `Ea::Bridge::XmiToUml` | `Xmi::Sparx::Root` → `Lutaml::Uml::Document`
|
|
83
|
+
|===
|
|
84
|
+
|
|
85
|
+
=== Data flow
|
|
86
|
+
|
|
87
|
+
----
|
|
88
|
+
QEA file ──→ Ea::Qea::Database ──┐
|
|
89
|
+
├──→ Ea::Bridge ──→ Lutaml::Uml::Document
|
|
90
|
+
XMI file ──→ Xmi::Sparx::Root ──┘ │
|
|
91
|
+
├──→ SPA (HTML)
|
|
92
|
+
├──→ SVG diagram
|
|
93
|
+
└──→ cross-vendor output
|
|
94
|
+
|
|
95
|
+
QEA file ──→ Ea::Qea::Database ──→ Ea::Transformers::QeaToXmi ──→ Sparx XMI
|
|
96
|
+
(pure, no lutaml-uml)
|
|
97
|
+
----
|
|
98
|
+
|
|
99
|
+
== CLI commands
|
|
100
|
+
|
|
101
|
+
[cols="1,3"]
|
|
102
|
+
|===
|
|
103
|
+
| `ea spa FILE` | Generate single-page app from QEA/XMI/LUR
|
|
104
|
+
| `ea list FILE` | List model elements (auto-detects QEA or XMI)
|
|
105
|
+
| `ea diagrams list FILE` | List diagrams in a QEA/XMI file
|
|
106
|
+
| `ea diagrams extract FILE NAME` | Render a diagram to SVG
|
|
107
|
+
| `ea validate FILE` | Validate EA model
|
|
108
|
+
| `ea stats FILE` | Show collection counts
|
|
109
|
+
| `ea parse FILE` | Parse to internal model representation
|
|
110
|
+
| `ea convert FILE --to xmi` | Convert QEA → Sparx XMI
|
|
111
|
+
| `ea version` | Show gem version
|
|
112
|
+
|===
|
|
113
|
+
|
|
114
|
+
== Limitations
|
|
115
|
+
|
|
116
|
+
- **Sparx only**: QEA format and Sparx-flavored XMI only. Does not parse
|
|
117
|
+
MagicDraw or Papyrus XMI.
|
|
118
|
+
- **XMI parser**: Parses `<xmi:Extension>` blocks for Sparx-specific
|
|
119
|
+
diagram metadata. Generic OMG XMI is handled by the `xmi` gem.
|
|
120
|
+
|
|
121
|
+
== Development
|
|
122
|
+
|
|
123
|
+
git clone https://github.com/lutaml/ea
|
|
124
|
+
cd ea
|
|
125
|
+
bundle install
|
|
126
|
+
bundle exec rspec # run specs (2036 examples)
|
|
127
|
+
bundle exec ea help # see CLI commands
|
|
128
|
+
|
|
129
|
+
== License
|
|
130
|
+
|
|
131
|
+
MIT — see `LICENSE` file.
|
data/exe/ea
CHANGED
data/lib/ea/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: ea
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ribose Inc.
|
|
@@ -170,6 +170,7 @@ files:
|
|
|
170
170
|
- CHANGELOG.md
|
|
171
171
|
- CLAUDE.md
|
|
172
172
|
- CODE_OF_CONDUCT.md
|
|
173
|
+
- README.adoc
|
|
173
174
|
- README.md
|
|
174
175
|
- Rakefile
|
|
175
176
|
- TODO.next/00-publish-blocking-bugs.md
|