lutaml 0.10.18 → 0.10.19

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.
Files changed (137) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +4 -0
  3. data/.rubocop_todo.yml +82 -161
  4. data/CLAUDE.md +17 -0
  5. data/frontend/dist/app.iife.js +24 -0
  6. data/frontend/dist/style.css +1 -0
  7. data/frontend/index.html +26 -0
  8. data/frontend/package-lock.json +2805 -0
  9. data/frontend/package.json +26 -0
  10. data/frontend/src/App.vue +59 -0
  11. data/frontend/src/app.ts +8 -0
  12. data/frontend/src/components/AppHeader.vue +127 -0
  13. data/frontend/src/components/AppSidebar.vue +119 -0
  14. data/frontend/src/components/ClassDetails.vue +247 -0
  15. data/frontend/src/components/DiagramView.vue +79 -0
  16. data/frontend/src/components/PackageDetails.vue +92 -0
  17. data/frontend/src/components/PackageTreeNode.vue +64 -0
  18. data/frontend/src/components/SearchResults.vue +48 -0
  19. data/frontend/src/components/WelcomeView.vue +66 -0
  20. data/frontend/src/shims-vue.d.ts +5 -0
  21. data/frontend/src/stores/dataStore.ts +79 -0
  22. data/frontend/src/stores/uiStore.ts +167 -0
  23. data/frontend/src/styles/main.css +1566 -0
  24. data/frontend/src/types.ts +221 -0
  25. data/frontend/tests/e2e/__screenshots__/new-dark-mode.png +0 -0
  26. data/frontend/tests/e2e/__screenshots__/new-package-details.png +0 -0
  27. data/frontend/tests/e2e/__screenshots__/new-search-modal.png +0 -0
  28. data/frontend/tests/e2e/__screenshots__/new-sidebar-collapsed.png +0 -0
  29. data/frontend/tests/e2e/__screenshots__/new-welcome.png +0 -0
  30. data/frontend/tests/e2e/render.spec.ts +188 -0
  31. data/frontend/tsconfig.json +20 -0
  32. data/frontend/vite.config.ts +26 -0
  33. data/frontend/vitest.config.ts +8 -0
  34. data/lib/lutaml/cli/uml/build_command.rb +69 -48
  35. data/lib/lutaml/cli/uml/spa_command.rb +23 -8
  36. data/lib/lutaml/ea/diagram/extractor.rb +35 -47
  37. data/lib/lutaml/qea/validation/database.rb +6 -0
  38. data/lib/lutaml/qea.rb +2 -0
  39. data/lib/lutaml/uml/abstraction.rb +1 -0
  40. data/lib/lutaml/uml/action.rb +2 -0
  41. data/lib/lutaml/uml/activity.rb +1 -0
  42. data/lib/lutaml/uml/actor.rb +1 -0
  43. data/lib/lutaml/uml/association.rb +2 -0
  44. data/lib/lutaml/uml/association_generalization.rb +2 -0
  45. data/lib/lutaml/uml/behavior.rb +1 -0
  46. data/lib/lutaml/uml/cardinality.rb +2 -0
  47. data/lib/lutaml/uml/class.rb +2 -0
  48. data/lib/lutaml/uml/classifier.rb +2 -0
  49. data/lib/lutaml/uml/comment.rb +2 -0
  50. data/lib/lutaml/uml/connector.rb +2 -0
  51. data/lib/lutaml/uml/connector_end.rb +2 -0
  52. data/lib/lutaml/uml/constraint.rb +2 -0
  53. data/lib/lutaml/uml/data_type.rb +2 -0
  54. data/lib/lutaml/uml/dependency.rb +2 -0
  55. data/lib/lutaml/uml/diagram.rb +2 -0
  56. data/lib/lutaml/uml/diagram_link.rb +2 -0
  57. data/lib/lutaml/uml/diagram_object.rb +2 -0
  58. data/lib/lutaml/uml/document.rb +2 -0
  59. data/lib/lutaml/uml/enum.rb +2 -0
  60. data/lib/lutaml/uml/event.rb +1 -0
  61. data/lib/lutaml/uml/fidelity.rb +2 -0
  62. data/lib/lutaml/uml/final_state.rb +1 -0
  63. data/lib/lutaml/uml/fontname.rb +2 -0
  64. data/lib/lutaml/uml/general_attribute.rb +2 -0
  65. data/lib/lutaml/uml/generalization.rb +2 -0
  66. data/lib/lutaml/uml/group.rb +2 -0
  67. data/lib/lutaml/uml/instance.rb +2 -0
  68. data/lib/lutaml/uml/model.rb +2 -0
  69. data/lib/lutaml/uml/model_helpers.rb +16 -5
  70. data/lib/lutaml/uml/namespace.rb +2 -0
  71. data/lib/lutaml/uml/opaque_behavior.rb +1 -0
  72. data/lib/lutaml/uml/operation.rb +2 -0
  73. data/lib/lutaml/uml/operation_parameter.rb +2 -0
  74. data/lib/lutaml/uml/package.rb +2 -0
  75. data/lib/lutaml/uml/parsers/yaml.rb +0 -1
  76. data/lib/lutaml/uml/port.rb +1 -0
  77. data/lib/lutaml/uml/primitive_type.rb +2 -0
  78. data/lib/lutaml/uml/property.rb +2 -0
  79. data/lib/lutaml/uml/pseudostate.rb +1 -0
  80. data/lib/lutaml/uml/realization.rb +1 -0
  81. data/lib/lutaml/uml/region.rb +1 -0
  82. data/lib/lutaml/uml/state.rb +2 -0
  83. data/lib/lutaml/uml/state_machine.rb +1 -0
  84. data/lib/lutaml/uml/tagged_value.rb +2 -0
  85. data/lib/lutaml/uml/top_element.rb +2 -0
  86. data/lib/lutaml/uml/top_element_attribute.rb +2 -0
  87. data/lib/lutaml/uml/transition.rb +2 -0
  88. data/lib/lutaml/uml/trigger.rb +2 -0
  89. data/lib/lutaml/uml/value.rb +2 -0
  90. data/lib/lutaml/uml/vertex.rb +1 -0
  91. data/lib/lutaml/uml_repository/class_lookup_index.rb +15 -16
  92. data/lib/lutaml/uml_repository/queries/search_query.rb +38 -11
  93. data/lib/lutaml/uml_repository/static_site/configuration.rb +109 -0
  94. data/lib/lutaml/uml_repository/static_site/data_transformer.rb +17 -3
  95. data/lib/lutaml/uml_repository/static_site/generator.rb +41 -355
  96. data/lib/lutaml/uml_repository/static_site/id_generator.rb +7 -2
  97. data/lib/lutaml/uml_repository/static_site/models/spa_attribute.rb +23 -4
  98. data/lib/lutaml/uml_repository/static_site/models/spa_cardinality.rb +9 -0
  99. data/lib/lutaml/uml_repository/static_site/models/spa_class.rb +28 -27
  100. data/lib/lutaml/uml_repository/static_site/models/spa_diagram.rb +2 -2
  101. data/lib/lutaml/uml_repository/static_site/models/spa_inherited_association.rb +1 -1
  102. data/lib/lutaml/uml_repository/static_site/models/spa_inherited_attribute.rb +1 -1
  103. data/lib/lutaml/uml_repository/static_site/models/spa_metadata.rb +16 -0
  104. data/lib/lutaml/uml_repository/static_site/models/spa_operation.rb +4 -4
  105. data/lib/lutaml/uml_repository/static_site/models/spa_package.rb +10 -8
  106. data/lib/lutaml/uml_repository/static_site/models/spa_package_tree_node.rb +8 -8
  107. data/lib/lutaml/uml_repository/static_site/models/spa_search_entry.rb +2 -3
  108. data/lib/lutaml/uml_repository/static_site/models/spa_search_index.rb +29 -0
  109. data/lib/lutaml/uml_repository/static_site/models/spa_statistics.rb +5 -5
  110. data/lib/lutaml/uml_repository/static_site/models/spa_tree_class_ref.rb +3 -2
  111. data/lib/lutaml/uml_repository/static_site/models.rb +2 -0
  112. data/lib/lutaml/uml_repository/static_site/output/multi_file_strategy.rb +69 -0
  113. data/lib/lutaml/uml_repository/static_site/output/strategy.rb +36 -0
  114. data/lib/lutaml/uml_repository/static_site/output/vue_inlined_strategy.rb +113 -0
  115. data/lib/lutaml/uml_repository/static_site/output.rb +15 -0
  116. data/lib/lutaml/uml_repository/static_site/search_index_builder.rb +15 -38
  117. data/lib/lutaml/uml_repository/static_site/serializers/association_serializer.rb +70 -0
  118. data/lib/lutaml/uml_repository/static_site/serializers/attribute_serializer.rb +2 -38
  119. data/lib/lutaml/uml_repository/static_site/serializers/base.rb +66 -0
  120. data/lib/lutaml/uml_repository/static_site/serializers/class_serializer.rb +10 -36
  121. data/lib/lutaml/uml_repository/static_site/serializers/diagram_serializer.rb +1 -15
  122. data/lib/lutaml/uml_repository/static_site/serializers/inheritance_resolver.rb +26 -137
  123. data/lib/lutaml/uml_repository/static_site/serializers/metadata_builder.rb +57 -3
  124. data/lib/lutaml/uml_repository/static_site/serializers/operation_serializer.rb +3 -8
  125. data/lib/lutaml/uml_repository/static_site/serializers/package_serializer.rb +3 -27
  126. data/lib/lutaml/uml_repository/static_site/serializers/package_tree_builder.rb +1 -15
  127. data/lib/lutaml/uml_repository/static_site/serializers.rb +4 -0
  128. data/lib/lutaml/uml_repository/static_site.rb +5 -7
  129. data/lib/lutaml/uml_repository/validators/repository_validator.rb +40 -30
  130. data/lib/lutaml/uml_repository/web_ui/app.rb +1 -1
  131. data/lib/lutaml/version.rb +1 -1
  132. data/lib/lutaml/xmi/parsers/xml.rb +0 -1
  133. metadata +38 -6
  134. data/TODO.cleanups/05-replace-marshal-load.md +0 -37
  135. data/TODO.cleanups/06-replace-eval-in-tests.md +0 -41
  136. data/TODO.cleanups/10-split-large-files.md +0 -47
  137. data/lib/lutaml/uml_repository/static_site/association_serialization.rb +0 -77
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9c53820c1a0daa57dc4a07ee45bdd249600b22a194d47f0e011fcc14147d15fd
4
- data.tar.gz: d03fce90025ce62a4715d187b8e723dd63cb8a768a7e8e016bf4d9160a0ba2dd
3
+ metadata.gz: c13d434118617c3c74306f71dfffaeaa2803b07b0251267798da192d7f6b599f
4
+ data.tar.gz: c76e117160fadf1b041cc3e6a51fb1ee055416e9014fe7a0fedbfac85344f4e4
5
5
  SHA512:
6
- metadata.gz: cebc1ecb62b6a0daa11b21206995fac13a9a45d4ef9707ed248e97ff20757ee6c1a59216b96b00e2fb568bb48966a4660f03a171bc97183b343003796ea1f895
7
- data.tar.gz: 0b3280443cd693c733f82a4a43e6b68ba4276bfabf9400d9dddd098e918315ec9bdcdec4138ffd57e0f72d2509b2f388d4de4262e0a6cf24b541f6a2bf89520c
6
+ metadata.gz: f5ff34832797c015997e5b3c2d0c61cd0c3b5c0cd2ca944af09f98b4bab2e3a383386551b9572cea28eeb95fa71743a6453abd95b3d8e8ea80cda05961f30972
7
+ data.tar.gz: 0e72e6c2c5ef782512e80036e714029a6ae7a620924b7346db474e2ff20e5f2b8e7da8285feead75afe90fc0a9d06cec9b4dcd754eeeb40f4bbb57315a0d5a2f
data/.gitignore CHANGED
@@ -23,3 +23,7 @@ old-docs
23
23
  TODO.*/
24
24
  TODO.*.md
25
25
  .rubocop_todo.yml.tmp
26
+
27
+ # Frontend build artifacts
28
+ frontend/node_modules/
29
+ TODO.migrate/
data/.rubocop_todo.yml CHANGED
@@ -1,143 +1,65 @@
1
1
  # This configuration was generated by
2
2
  # `rubocop --auto-gen-config`
3
- # on 2026-05-14 13:10:59 UTC using RuboCop version 1.86.1.
3
+ # on 2026-05-22 10:40:49 UTC using RuboCop version 1.86.1.
4
4
  # The point is for the user to remove these configuration records
5
5
  # one by one as the offenses are removed from the code base.
6
6
  # Note that changes in the inspected code, or installation of new
7
7
  # versions of RuboCop, may require this file to be generated again.
8
8
 
9
- # Offense count: 67
9
+ # Offense count: 2
10
10
  # This cop supports safe autocorrection (--autocorrect).
11
11
  # Configuration parameters: EnforcedStyle, IndentationWidth.
12
12
  # SupportedStyles: with_first_argument, with_fixed_indentation
13
13
  Layout/ArgumentAlignment:
14
- Enabled: false
15
-
16
- # Offense count: 1
17
- # This cop supports safe autocorrection (--autocorrect).
18
- # Configuration parameters: EnforcedStyle, IndentationWidth.
19
- # SupportedStyles: with_first_element, with_fixed_indentation
20
- Layout/ArrayAlignment:
21
14
  Exclude:
22
- - 'lib/lutaml/uml_repository/repository_enhanced.rb'
15
+ - 'lib/lutaml/uml_repository/static_site/data_transformer.rb'
16
+ - 'lib/lutaml/uml_repository/static_site/generator.rb'
23
17
 
24
- # Offense count: 12
18
+ # Offense count: 1
25
19
  # This cop supports safe autocorrection (--autocorrect).
26
20
  # Configuration parameters: IndentationWidth.
27
21
  Layout/AssignmentIndentation:
28
22
  Exclude:
29
- - 'lib/lutaml/cli/uml/build_command.rb'
30
- - 'lib/lutaml/cli/uml/diagram_command.rb'
31
- - 'lib/lutaml/uml_repository/index_builders/class_index.rb'
32
- - 'lib/lutaml/uml_repository/index_builders/package_index.rb'
33
- - 'lib/lutaml/uml_repository/queries/search_query.rb'
34
- - 'lib/lutaml/uml_repository/repository_enhanced.rb'
35
-
36
- # Offense count: 13
37
- # This cop supports safe autocorrection (--autocorrect).
38
- # Configuration parameters: EnforcedStyleAlignWith.
39
- # SupportedStylesAlignWith: either, start_of_block, start_of_line
40
- Layout/BlockAlignment:
41
- Exclude:
42
- - 'lib/lutaml/cli/uml/build_command.rb'
43
- - 'lib/lutaml/cli/uml/diagram_command.rb'
44
- - 'lib/lutaml/uml_repository/queries/search_query.rb'
45
- - 'spec/lutaml/cli/search_commands_spec.rb'
46
- - 'spec/lutaml/cli/uml/search_command_spec.rb'
47
- - 'spec/lutaml/qea/integration/full_parsing_spec.rb'
23
+ - 'lib/lutaml/uml_repository/static_site/output/vue_inlined_strategy.rb'
48
24
 
49
- # Offense count: 12
50
- # This cop supports safe autocorrection (--autocorrect).
51
- Layout/BlockEndNewline:
52
- Exclude:
53
- - 'lib/lutaml/cli/uml/build_command.rb'
54
- - 'lib/lutaml/cli/uml/diagram_command.rb'
55
- - 'lib/lutaml/uml_repository/queries/search_query.rb'
56
- - 'spec/lutaml/cli/search_commands_spec.rb'
57
- - 'spec/lutaml/cli/uml/search_command_spec.rb'
58
- - 'spec/lutaml/qea/integration/full_parsing_spec.rb'
59
-
60
- # Offense count: 11
25
+ # Offense count: 21
61
26
  # This cop supports safe autocorrection (--autocorrect).
62
- # Configuration parameters: AllowForAlignment.
63
- Layout/CommentIndentation:
64
- Exclude:
65
- - 'lib/lutaml/uml_repository/index_builders/association_index.rb'
66
- - 'lib/lutaml/uml_repository/index_builders/class_index.rb'
67
- - 'lib/lutaml/uml_repository/index_builders/package_index.rb'
68
-
69
- # Offense count: 1
70
- # This cop supports safe autocorrection (--autocorrect).
71
- Layout/ElseAlignment:
72
- Exclude:
73
- - 'lib/lutaml/uml_repository/validators/repository_validator.rb'
74
-
75
- # Offense count: 137
76
- # This cop supports safe autocorrection (--autocorrect).
77
- Layout/EmptyLines:
78
- Enabled: false
79
-
80
- # Offense count: 2
81
- # This cop supports safe autocorrection (--autocorrect).
82
- Layout/EmptyLinesAfterModuleInclusion:
83
- Exclude:
84
- - 'lib/lutaml/converter/xmi_to_uml.rb'
85
- - 'lib/lutaml/xmi/parsers/xmi_base.rb'
86
-
87
- # Offense count: 3
88
- # This cop supports safe autocorrection (--autocorrect).
89
- Layout/EmptyLinesAroundMethodBody:
90
- Exclude:
91
- - 'lib/lutaml/cli/uml/build_command.rb'
92
- - 'lib/lutaml/cli/uml/spa_command.rb'
93
- - 'lib/lutaml/cli/uml/validate_command.rb'
94
-
95
- # Offense count: 4
96
- # This cop supports safe autocorrection (--autocorrect).
97
- # Configuration parameters: EnforcedStyleAlignWith.
98
- # SupportedStylesAlignWith: keyword, variable, start_of_line
99
- Layout/EndAlignment:
100
- Exclude:
101
- - 'lib/lutaml/uml_repository/index_builders/association_index.rb'
102
- - 'lib/lutaml/uml_repository/index_builders/class_index.rb'
103
- - 'lib/lutaml/uml_repository/index_builders/package_index.rb'
104
- - 'lib/lutaml/uml_repository/validators/repository_validator.rb'
105
-
106
- # Offense count: 51
107
- # This cop supports safe autocorrection (--autocorrect).
108
- # Configuration parameters: Width, EnforcedStyleAlignWith, AllowedPatterns.
109
- # SupportedStylesAlignWith: start_of_line, relative_to_receiver
110
- Layout/IndentationWidth:
111
- Exclude:
112
- - 'lib/lutaml/cli/uml/build_command.rb'
113
- - 'lib/lutaml/cli/uml/diagram_command.rb'
114
- - 'lib/lutaml/uml_repository/index_builders/association_index.rb'
115
- - 'lib/lutaml/uml_repository/index_builders/class_index.rb'
116
- - 'lib/lutaml/uml_repository/index_builders/package_index.rb'
117
- - 'lib/lutaml/uml_repository/queries/search_query.rb'
118
- - 'lib/lutaml/uml_repository/validators/repository_validator.rb'
119
- - 'spec/lutaml/cli/search_commands_spec.rb'
120
- - 'spec/lutaml/cli/uml/search_command_spec.rb'
121
- - 'spec/lutaml/qea/integration/full_parsing_spec.rb'
122
-
123
- # Offense count: 271
27
+ # Configuration parameters: AllowMultipleStyles, EnforcedHashRocketStyle, EnforcedColonStyle, EnforcedLastArgumentHashStyle.
28
+ # SupportedHashRocketStyles: key, separator, table
29
+ # SupportedColonStyles: key, separator, table
30
+ # SupportedLastArgumentHashStyles: always_inspect, always_ignore, ignore_implicit, ignore_explicit
31
+ Layout/HashAlignment:
32
+ Exclude:
33
+ - 'lib/lutaml/uml_repository/static_site/models/spa_attribute.rb'
34
+ - 'lib/lutaml/uml_repository/static_site/models/spa_class.rb'
35
+ - 'lib/lutaml/uml_repository/static_site/models/spa_operation.rb'
36
+ - 'lib/lutaml/uml_repository/static_site/models/spa_package.rb'
37
+ - 'lib/lutaml/uml_repository/static_site/models/spa_package_tree_node.rb'
38
+ - 'lib/lutaml/uml_repository/static_site/models/spa_tree_class_ref.rb'
39
+ - 'lib/lutaml/uml_repository/static_site/serializers/metadata_builder.rb'
40
+
41
+ # Offense count: 216
124
42
  # This cop supports safe autocorrection (--autocorrect).
125
43
  # Configuration parameters: Max, AllowHeredoc, AllowURI, AllowQualifiedName, URISchemes, AllowRBSInlineAnnotation, AllowCopDirectives, AllowedPatterns, SplitStrings.
126
44
  # URISchemes: http, https
127
45
  Layout/LineLength:
128
46
  Enabled: false
129
47
 
130
- # Offense count: 1
131
- # This cop supports safe autocorrection (--autocorrect).
132
- Layout/MultilineBlockLayout:
133
- Exclude:
134
- - 'spec/lutaml/qea/integration/full_parsing_spec.rb'
135
-
136
- # Offense count: 81
48
+ # Offense count: 22
137
49
  # This cop supports safe autocorrection (--autocorrect).
138
50
  # Configuration parameters: AllowInHeredoc.
139
51
  Layout/TrailingWhitespace:
140
- Enabled: false
52
+ Exclude:
53
+ - 'lib/lutaml/uml_repository/static_site/data_transformer.rb'
54
+ - 'lib/lutaml/uml_repository/static_site/generator.rb'
55
+ - 'lib/lutaml/uml_repository/static_site/models/spa_attribute.rb'
56
+ - 'lib/lutaml/uml_repository/static_site/models/spa_class.rb'
57
+ - 'lib/lutaml/uml_repository/static_site/models/spa_operation.rb'
58
+ - 'lib/lutaml/uml_repository/static_site/models/spa_package.rb'
59
+ - 'lib/lutaml/uml_repository/static_site/models/spa_package_tree_node.rb'
60
+ - 'lib/lutaml/uml_repository/static_site/models/spa_tree_class_ref.rb'
61
+ - 'lib/lutaml/uml_repository/static_site/output/vue_inlined_strategy.rb'
62
+ - 'lib/lutaml/uml_repository/static_site/serializers/metadata_builder.rb'
141
63
 
142
64
  # Offense count: 1
143
65
  Lint/BinaryOperatorWithIdenticalOperands:
@@ -197,16 +119,14 @@ Lint/UnusedMethodArgument:
197
119
  Exclude:
198
120
  - 'lib/lutaml/cli/uml/export_command.rb'
199
121
 
200
- # Offense count: 7
122
+ # Offense count: 4
201
123
  Lint/UselessConstantScoping:
202
124
  Exclude:
203
125
  - 'lib/lutaml/cli/interactive_shell.rb'
204
126
  - 'lib/lutaml/cli/uml/diagram_command.rb'
205
127
  - 'lib/lutaml/qea/factory/ea_to_uml_factory.rb'
206
- - 'lib/lutaml/uml_repository/static_site/generator.rb'
207
- - 'lib/lutaml/uml_repository/static_site/serializers/inheritance_resolver.rb'
208
128
 
209
- # Offense count: 10
129
+ # Offense count: 13
210
130
  # Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes, Max.
211
131
  Metrics/AbcSize:
212
132
  Exclude:
@@ -215,39 +135,41 @@ Metrics/AbcSize:
215
135
  - 'lib/lutaml/qea/factory/generalization_builder.rb'
216
136
  - 'lib/lutaml/uml_repository/exporters/markdown/class_page_builder.rb'
217
137
  - 'lib/lutaml/uml_repository/queries/search_query.rb'
138
+ - 'lib/lutaml/uml_repository/static_site/output/vue_inlined_strategy.rb'
218
139
  - 'lib/lutaml/uml_repository/static_site/serializers/class_serializer.rb'
140
+ - 'lib/lutaml/uml_repository/static_site/serializers/metadata_builder.rb'
219
141
 
220
- # Offense count: 1
221
- # Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns, inherit_mode.
222
- # AllowedMethods: refine
223
- Metrics/BlockLength:
224
- Max: 27
225
-
226
- # Offense count: 3
142
+ # Offense count: 8
227
143
  # Configuration parameters: AllowedMethods, AllowedPatterns, Max.
228
144
  Metrics/CyclomaticComplexity:
229
145
  Exclude:
230
146
  - 'lib/lutaml/qea/factory/generalization_builder.rb'
147
+ - 'lib/lutaml/uml/model_helpers.rb'
231
148
  - 'lib/lutaml/uml_repository/index_builders/association_index.rb'
232
- - 'lib/lutaml/uml_repository/static_site/serializers/class_serializer.rb'
149
+ - 'lib/lutaml/uml_repository/static_site/data_transformer.rb'
150
+ - 'lib/lutaml/uml_repository/static_site/generator.rb'
151
+ - 'lib/lutaml/uml_repository/static_site/output/vue_inlined_strategy.rb'
152
+ - 'lib/lutaml/uml_repository/static_site/serializers/base.rb'
153
+ - 'lib/lutaml/uml_repository/static_site/serializers/metadata_builder.rb'
233
154
 
234
- # Offense count: 55
155
+ # Offense count: 63
235
156
  # Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
236
157
  Metrics/MethodLength:
237
- Max: 17
158
+ Max: 23
238
159
 
239
160
  # Offense count: 5
240
161
  # Configuration parameters: CountKeywordArgs, MaxOptionalParameters.
241
162
  Metrics/ParameterLists:
242
163
  Max: 7
243
164
 
244
- # Offense count: 3
165
+ # Offense count: 4
245
166
  # Configuration parameters: AllowedMethods, AllowedPatterns, Max.
246
167
  Metrics/PerceivedComplexity:
247
168
  Exclude:
248
169
  - 'lib/lutaml/qea/factory/ea_to_uml_factory.rb'
249
- - 'lib/lutaml/uml_repository/static_site/serializers/class_serializer.rb'
250
- - 'lib/lutaml/uml_repository/validators/repository_validator.rb'
170
+ - 'lib/lutaml/uml_repository/static_site/generator.rb'
171
+ - 'lib/lutaml/uml_repository/static_site/output/vue_inlined_strategy.rb'
172
+ - 'lib/lutaml/uml_repository/static_site/serializers/base.rb'
251
173
 
252
174
  # Offense count: 3
253
175
  # Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames.
@@ -255,7 +177,7 @@ Metrics/PerceivedComplexity:
255
177
  Naming/MethodParameterName:
256
178
  Exclude:
257
179
  - 'lib/lutaml/cli/tree_view_formatter.rb'
258
- - 'lib/lutaml/uml_repository/static_site/generator.rb'
180
+ - 'lib/lutaml/uml_repository/static_site/output/vue_inlined_strategy.rb'
259
181
  - 'spec/lutaml/parsers/serialize_xmi_to_liquid_spec.rb'
260
182
 
261
183
  # Offense count: 3
@@ -280,11 +202,6 @@ Performance/MapMethodChain:
280
202
  - 'lib/lutaml/cli/output_formatter.rb'
281
203
  - 'lib/lutaml/qea/models/ea_diagram_link.rb'
282
204
 
283
- # Offense count: 5
284
- RSpec/AnyInstance:
285
- Exclude:
286
- - 'spec/lutaml/uml_repository/static_site/generator_spec.rb'
287
-
288
205
  # Offense count: 1
289
206
  RSpec/BeforeAfterAll:
290
207
  Exclude:
@@ -307,12 +224,12 @@ RSpec/ContextWording:
307
224
  - 'spec/lutaml/cli/uml/verify_command_spec.rb'
308
225
  - 'spec/lutaml/qea/integration/full_parsing_spec.rb'
309
226
 
310
- # Offense count: 22
227
+ # Offense count: 23
311
228
  # Configuration parameters: IgnoredMetadata.
312
229
  RSpec/DescribeClass:
313
230
  Enabled: false
314
231
 
315
- # Offense count: 646
232
+ # Offense count: 684
316
233
  # Configuration parameters: CountAsOne.
317
234
  RSpec/ExampleLength:
318
235
  Max: 30
@@ -366,11 +283,17 @@ RSpec/MessageSpies:
366
283
  - 'spec/lutaml/uml_repository/presenters/diagram_presenter_spec.rb'
367
284
  - 'spec/lutaml/uml_repository/repository_spec.rb'
368
285
 
369
- # Offense count: 40
286
+ # Offense count: 2
287
+ RSpec/MultipleDescribes:
288
+ Exclude:
289
+ - 'spec/lutaml/uml_repository/static_site/models_spec.rb'
290
+ - 'spec/lutaml/uml_repository/static_site/output_strategy_spec.rb'
291
+
292
+ # Offense count: 84
370
293
  RSpec/MultipleExpectations:
371
- Max: 7
294
+ Max: 12
372
295
 
373
- # Offense count: 148
296
+ # Offense count: 145
374
297
  # Configuration parameters: AllowSubject.
375
298
  RSpec/MultipleMemoizedHelpers:
376
299
  Max: 11
@@ -380,13 +303,12 @@ RSpec/MultipleMemoizedHelpers:
380
303
  RSpec/NestedGroups:
381
304
  Max: 4
382
305
 
383
- # Offense count: 2
306
+ # Offense count: 1
384
307
  # Configuration parameters: AllowedPatterns.
385
308
  # AllowedPatterns: ^expect_, ^assert_
386
309
  RSpec/NoExpectationExample:
387
310
  Exclude:
388
311
  - 'spec/lutaml/qea/verification/comprehensive_equivalence_spec.rb'
389
- - 'spec/lutaml/uml_repository/static_site/generator_spec.rb'
390
312
 
391
313
  # Offense count: 12
392
314
  RSpec/RepeatedExample:
@@ -416,7 +338,7 @@ Security/MarshalLoad:
416
338
  Exclude:
417
339
  - 'lib/lutaml/uml_repository/package_loader.rb'
418
340
 
419
- # Offense count: 17
341
+ # Offense count: 1
420
342
  # This cop supports safe autocorrection (--autocorrect).
421
343
  # Configuration parameters: EnforcedStyle, ProceduralMethods, FunctionalMethods, AllowedMethods, AllowedPatterns, AllowBracesOnProceduralOneLiners, BracesRequiredMethods.
422
344
  # SupportedStyles: line_count_based, semantic, braces_for_chaining, always_braces
@@ -425,12 +347,14 @@ Security/MarshalLoad:
425
347
  # AllowedMethods: lambda, proc, it
426
348
  Style/BlockDelimiters:
427
349
  Exclude:
428
- - 'lib/lutaml/cli/uml/build_command.rb'
429
- - 'lib/lutaml/cli/uml/diagram_command.rb'
430
- - 'lib/lutaml/uml_repository/queries/search_query.rb'
431
- - 'spec/lutaml/cli/search_commands_spec.rb'
432
- - 'spec/lutaml/cli/uml/search_command_spec.rb'
433
- - 'spec/lutaml/qea/integration/full_parsing_spec.rb'
350
+ - 'lib/lutaml/uml_repository/static_site/serializers/metadata_builder.rb'
351
+
352
+ # Offense count: 1
353
+ # This cop supports unsafe autocorrection (--autocorrect-all).
354
+ # Configuration parameters: MinBranchesCount.
355
+ Style/CaseLikeIf:
356
+ Exclude:
357
+ - 'lib/lutaml/uml/model_helpers.rb'
434
358
 
435
359
  # Offense count: 2
436
360
  # This cop supports safe autocorrection (--autocorrect).
@@ -438,21 +362,11 @@ Style/ComparableClamp:
438
362
  Exclude:
439
363
  - 'lib/lutaml/cli/enhanced_formatter.rb'
440
364
 
441
- # Offense count: 16
442
- # This cop supports safe autocorrection (--autocorrect).
443
- Style/MultilineIfModifier:
444
- Exclude:
445
- - 'lib/lutaml/cli/uml/build_command.rb'
446
- - 'lib/lutaml/cli/uml/diagram_command.rb'
447
- - 'lib/lutaml/uml_repository/index_builders/class_index.rb'
448
- - 'lib/lutaml/uml_repository/index_builders/package_index.rb'
449
- - 'lib/lutaml/uml_repository/repository_enhanced.rb'
450
-
451
365
  # Offense count: 1
452
366
  # This cop supports safe autocorrection (--autocorrect).
453
- Style/MultilineTernaryOperator:
367
+ Style/NegatedIfElseCondition:
454
368
  Exclude:
455
- - 'lib/lutaml/uml_repository/validators/repository_validator.rb'
369
+ - 'lib/lutaml/cli/uml/spa_command.rb'
456
370
 
457
371
  # Offense count: 2
458
372
  # Configuration parameters: AllowedClasses.
@@ -473,3 +387,10 @@ Style/SafeNavigationChainLength:
473
387
  Exclude:
474
388
  - 'lib/lutaml/qea/validation/attribute_validator.rb'
475
389
  - 'lib/lutaml/qea/validation/operation_validator.rb'
390
+
391
+ # Offense count: 1
392
+ # This cop supports unsafe autocorrection (--autocorrect-all).
393
+ # Configuration parameters: Mode.
394
+ Style/StringConcatenation:
395
+ Exclude:
396
+ - 'lib/lutaml/cli/uml/spa_command.rb'
data/CLAUDE.md CHANGED
@@ -22,6 +22,23 @@ Lutaml is a Ruby gem for parsing and transforming UML models from multiple forma
22
22
  - DRY: consolidate duplicated patterns (especially `format_definition`, index building, metadata construction).
23
23
  - Never commit TODO tracking files to git.
24
24
 
25
+ ## Spec Require Rules
26
+
27
+ **ALWAYS use `require_relative` in spec files. NEVER use bare `require`.**
28
+
29
+ `require` depends on `$LOAD_PATH` which is unreliable:
30
+ - Running a single spec file (`bundle exec rspec spec/foo/bar_spec.rb`) may not have `lib/` on the load path, causing `LoadError`.
31
+ - If the gem is installed globally, `require "lutaml/foo"` loads the installed gem version, not the local working copy — specs silently test the wrong code.
32
+ - `require_relative` resolves relative to the spec file's location. It always loads the exact file you intend, regardless of how the spec is run.
33
+
34
+ ```ruby
35
+ # WRONG — may load wrong file or fail
36
+ require "lutaml/uml_repository/static_site/data_transformer"
37
+
38
+ # CORRECT — always loads the local file
39
+ require_relative "../../../lib/lutaml/uml_repository/static_site/data_transformer"
40
+ ```
41
+
25
42
  ## Architecture
26
43
  - `lib/lutaml/uml/` — UML domain models (Class, Association, Package, etc.)
27
44
  - `lib/lutaml/uml_repository/` — Repository pattern over UML documents (queries, presenters, exporters, SPA)