ea 0.1.6 → 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6322d6dfb8ed1b7c957b25ed522ccf6598350a88653e9e44acd0dfb79c2e61b3
4
- data.tar.gz: 88be8b7cfc39592348c422bd4277f5d4bd97ec827bef29d0f40bb12c6dc5d9eb
3
+ metadata.gz: e5f5e58db4cb228d4e35c2d250b57d4b8874c9545d90aacc6792755d6637c121
4
+ data.tar.gz: 4ba8ca434a0ec8c6e3f09f27a828e05b035df520f1a104de7e0b38d2b2de6d24
5
5
  SHA512:
6
- metadata.gz: 0a4219aa40e69edc0f5bcf956d01592d203928612345ae35fac33b8fa4bf610c1615fb3bae4a82788d87d3dd4198ed9808abfd080468e79d68c42f869e2f97b2
7
- data.tar.gz: 5429e2a0281d4aa1efbe7358e64975a017660f060fcb1ecc76ad07f4eb2f992115ee9b0dc1fa1dcb2b53e114a8741b43040a4cdcb00c95d2cf5a07db6e81ca02
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.
@@ -0,0 +1,30 @@
1
+ # 01 — Release lutaml-uml 0.3.0
2
+
3
+ **Status: PENDING**
4
+
5
+ ## Problem
6
+ The local lutaml-uml has 10 unpushed commits (559 files, +354k LOC)
7
+ containing the UmlRepository + StaticSite + Vue frontend infrastructure.
8
+ None of this is on rubygems. The published versions (0.2.12, 1.0.0)
9
+ don't include any of it.
10
+
11
+ This blocks ea CI — `lutaml/uml_repository` is not installable from
12
+ rubygems.
13
+
14
+ ## Steps
15
+ 1. Commit all local changes on `chore/consolidate-todos` branch.
16
+ 2. Bump version: `0.2.0` → `0.3.0`.
17
+ 3. Verify `bundle exec rspec` passes.
18
+ 4. Push branch + open PR.
19
+ 5. Merge-rebase.
20
+ 6. Trigger GHA release.
21
+
22
+ ## Version rationale
23
+ 0.3.0 not 0.2.13 because the UmlRepository + StaticSite is a major
24
+ feature surface. 0.3.0 continues the 0.x API line (Lutaml::Uml::UmlClass
25
+ etc.) that ea targets. Published 1.0.0 has a different API (renamed
26
+ classes) and should be ignored / yanked.
27
+
28
+ ## Verification
29
+ - `gem list -r --exact lutaml-uml` shows 0.3.0.
30
+ - `gem content lutaml-uml --version 0.3.0 | grep uml_repository` succeeds.
@@ -0,0 +1,33 @@
1
+ # 02 — Fix lutaml meta-gem broken requires
2
+
3
+ **Status: PENDING**
4
+
5
+ ## Problem
6
+ `lib/lutaml.rb` requires 6 files that don't exist:
7
+
8
+ ```ruby
9
+ require "lutaml/converter" # MISSING
10
+ require "lutaml/ea" # MISSING (ea uses Ea:: namespace)
11
+ require "lutaml/xmi" # MISSING (xmi uses Xmi:: namespace)
12
+ require "lutaml/qea" # MISSING
13
+ require "lutaml/model_transformations" # MISSING
14
+ require "lutaml/cli" # MISSING
15
+ ```
16
+
17
+ `require "lutaml"` crashes immediately. The meta-gem is unusable.
18
+
19
+ ## Fix
20
+ Remove the 6 broken requires. Keep only the ones that resolve to
21
+ real files in the gem's own `lib/` tree:
22
+
23
+ ```ruby
24
+ require_relative "lutaml/version"
25
+ require "lutaml/lml"
26
+ require "lutaml/uml"
27
+ require "lutaml/uml_repository"
28
+ ```
29
+
30
+ ## Note
31
+ The meta-gem should NOT try to remap other gems' namespaces. The ea
32
+ gem uses `Ea::*`, the xmi gem uses `Xmi::*`. Users who want both should
33
+ `require "ea"` and `require "xmi"` explicitly.
@@ -0,0 +1,20 @@
1
+ # 03 — Release lutaml 0.11.0
2
+
3
+ **Status: PENDING (depends on 02)**
4
+
5
+ ## Problem
6
+ Published 0.10.19 has phantom runtime deps (htmlentities, liquid,
7
+ listen, nokogiri, paint, lutaml-path) that shouldn't be in the
8
+ meta-gem gemspec. Plus the 6 broken requires from TODO 02.
9
+
10
+ ## Steps
11
+ 1. After TODO 02 fix is merged.
12
+ 2. Bump version: `0.10.19` → `0.11.0`.
13
+ 3. Verify `require "lutaml"` works without LoadError.
14
+ 4. Push + merge.
15
+ 5. Trigger GHA release.
16
+
17
+ ## Verification
18
+ - `require "lutaml"` succeeds.
19
+ - No LoadError from missing requires.
20
+ - Published gemspec deps are clean.
@@ -0,0 +1,23 @@
1
+ # 04 — Update ea gemspec pin to ~> 0.3
2
+
3
+ **Status: PENDING (depends on 01)**
4
+
5
+ ## Problem
6
+ ea.gemspec pins `spec.add_development_dependency "lutaml-uml", "~> 0.2.0"`.
7
+ This resolves to 0.2.12 on rubygems, which doesn't have UmlRepository.
8
+ CI fails on every PR.
9
+
10
+ ## Fix
11
+ ```ruby
12
+ # BEFORE:
13
+ spec.add_development_dependency "lutaml-uml", "~> 0.2.0"
14
+
15
+ # AFTER:
16
+ spec.add_development_dependency "lutaml-uml", "~> 0.3"
17
+ ```
18
+
19
+ `~> 0.3` means `>= 0.3.0, < 1.0.0`, which resolves to 0.3.0 (with
20
+ UmlRepository) and excludes the incompatible 1.0.0.
21
+
22
+ ## Verification
23
+ - `bundle exec rspec` passes in CI (rubygems mode) without admin override.
@@ -0,0 +1,48 @@
1
+ # 05 — Remove ea conditional require workarounds
2
+
3
+ **Status: PENDING (depends on 01)**
4
+
5
+ ## Problem
6
+ Multiple spec files use `begin/rescue LoadError` around
7
+ `require "lutaml/uml_repository"` because the published gem didn't
8
+ ship the file. After lutaml-uml 0.3.0 is released, these workarounds
9
+ are unnecessary noise.
10
+
11
+ ## Files to simplify
12
+
13
+ ### spec/spec_helper.rb
14
+ ```ruby
15
+ # BEFORE:
16
+ begin
17
+ require "lutaml/uml"
18
+ rescue LoadError
19
+ end
20
+ begin
21
+ require "lutaml/uml_repository"
22
+ rescue LoadError
23
+ end
24
+
25
+ # AFTER:
26
+ require "lutaml/uml"
27
+ require "lutaml/uml_repository"
28
+ ```
29
+
30
+ ### spec/ea/diagram/extractor_spec.rb
31
+ ```ruby
32
+ # BEFORE:
33
+ begin
34
+ require "lutaml/uml_repository/repository"
35
+ rescue LoadError
36
+ end
37
+ RSpec.configure do ... skip ... end
38
+
39
+ # AFTER:
40
+ require "lutaml/uml_repository/repository"
41
+ ```
42
+
43
+ ### spec/ea/qea/verification/comprehensive_equivalence_spec.rb
44
+ Same pattern — remove begin/rescue + skip guard.
45
+
46
+ ## Verification
47
+ - Full suite passes without any conditional requires.
48
+ - No `skip "lutaml/uml_repository not available"` messages.
@@ -0,0 +1,20 @@
1
+ # 06 — Release ea 0.2.0
2
+
3
+ **Status: PENDING (depends on 04, 05)**
4
+
5
+ ## Problem
6
+ ea is at 0.1.6. The gemspec pin change (`~> 0.2.0` → `~> 0.3`) is a
7
+ breaking change for anyone using ea's dev dependency — they need to
8
+ install lutaml-uml 0.3.0. This warrants a minor version bump.
9
+
10
+ ## Steps
11
+ 1. After TODO 04 and 05 are merged.
12
+ 2. Bump version: `0.1.6` → `0.2.0`.
13
+ 3. Verify `bundle exec rspec` passes in rubygems mode (CI mode).
14
+ 4. Push + merge.
15
+ 5. Trigger GHA release.
16
+
17
+ ## Verification
18
+ - ea 0.2.0 on rubygems.
19
+ - `gem install ea && ea spa model.qea` works with published lutaml-uml 0.3.0.
20
+ - CI passes WITHOUT admin override (first time ever).
@@ -0,0 +1,35 @@
1
+ # 07 — Migrate plateau-model to ea gem
2
+
3
+ **Status: PENDING (depends on 06)**
4
+
5
+ ## Problem
6
+ The plateau-model project (`/Users/mulgogi/src/mn/plateau-model`)
7
+ currently depends on the broken `lutaml` meta-gem via a local path:
8
+
9
+ ```ruby
10
+ # Gemfile
11
+ gem "lutaml", path: "/Users/mulgogi/src/lutaml/lutaml"
12
+ ```
13
+
14
+ And generates SPA via:
15
+ ```bash
16
+ bundle exec lutaml uml build-spa model.qea -o index.html
17
+ ```
18
+
19
+ ## Fix
20
+ Switch to the standalone `ea` gem:
21
+
22
+ ```ruby
23
+ # Gemfile
24
+ source "https://rubygems.org"
25
+ gem "ea", "~> 0.2"
26
+ ```
27
+
28
+ ```bash
29
+ bundle exec ea spa model.qea -o index.html
30
+ ```
31
+
32
+ ## Verification
33
+ - Generated index.html is structurally equivalent to the existing one
34
+ (same packages=58, diagrams=188, classes≈600).
35
+ - No dependency on the lutaml meta-gem.
@@ -0,0 +1,15 @@
1
+ # TODO.release — Streamlined dependency tree
2
+
3
+ Execute each item in order. Each step depends on the previous.
4
+
5
+ ## Index
6
+
7
+ | # | Title | Gem | Priority |
8
+ |---|---|---|---|
9
+ | 01 | [Release lutaml-uml 0.3.0](01-release-lutaml-uml-030.md) | lutaml-uml | BLOCKING — critical path |
10
+ | 02 | [Fix lutaml meta-gem broken requires](02-fix-lutaml-meta-gem-requires.md) | lutaml | high — independent of 01 |
11
+ | 03 | [Release lutaml 0.11.0](03-release-lutaml-0110.md) | lutaml | high — depends on 02 |
12
+ | 04 | [Update ea gemspec pin to ~> 0.3](04-update-ea-gemspec-pin.md) | ea | high — depends on 01 |
13
+ | 05 | [Remove ea conditional require workarounds](05-remove-ea-conditional-requires.md) | ea | high — depends on 01 |
14
+ | 06 | [Release ea 0.2.0](06-release-ea-020.md) | ea | high — depends on 04, 05 |
15
+ | 07 | [Migrate plateau-model to ea gem](07-migrate-plateau-model.md) | plateau-model | medium — depends on 06 |
data/exe/ea CHANGED
@@ -3,5 +3,6 @@
3
3
 
4
4
  $LOAD_PATH.unshift(File.expand_path("../lib", __dir__))
5
5
 
6
+ require "ea"
6
7
  require "ea/cli"
7
8
  Ea::Cli::App.start(ARGV)
data/lib/ea/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Ea
4
- VERSION = "0.1.6"
4
+ VERSION = "0.2.1"
5
5
  end
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.1.6
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
@@ -134,14 +134,14 @@ dependencies:
134
134
  requirements:
135
135
  - - "~>"
136
136
  - !ruby/object:Gem::Version
137
- version: 0.2.0
137
+ version: '0.5'
138
138
  type: :development
139
139
  prerelease: false
140
140
  version_requirements: !ruby/object:Gem::Requirement
141
141
  requirements:
142
142
  - - "~>"
143
143
  - !ruby/object:Gem::Version
144
- version: 0.2.0
144
+ version: '0.5'
145
145
  - !ruby/object:Gem::Dependency
146
146
  name: rubocop
147
147
  requirement: !ruby/object:Gem::Requirement
@@ -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
@@ -213,6 +214,14 @@ files:
213
214
  - TODO.next/38-xmi-parser-feature-parity.md
214
215
  - TODO.next/39-ea-spa-cli-command.md
215
216
  - TODO.next/40-drop-lur-only-check-in-diagrams-extract.md
217
+ - TODO.release/01-release-lutaml-uml-030.md
218
+ - TODO.release/02-fix-lutaml-meta-gem-requires.md
219
+ - TODO.release/03-release-lutaml-0110.md
220
+ - TODO.release/04-update-ea-gemspec-pin.md
221
+ - TODO.release/05-remove-ea-conditional-requires.md
222
+ - TODO.release/06-release-ea-020.md
223
+ - TODO.release/07-migrate-plateau-model.md
224
+ - TODO.release/README.md
216
225
  - config/diagram_styles.yml
217
226
  - config/model_transformations.yml
218
227
  - config/qea_schema.yml