lutaml 0.10.3 → 0.10.4
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/.rubocop.yml +1 -1
- data/.rubocop_todo.yml +4 -149
- data/CHANGELOG.md +108 -0
- data/lib/lutaml/cli/uml_commands.rb +2 -2
- data/lib/lutaml/command_line.rb +1 -1
- data/lib/lutaml/model_transformations/parsers/base_parser.rb +1 -1
- data/lib/lutaml/model_transformations/transformation_engine.rb +1 -1
- data/lib/lutaml/qea/factory/document_builder.rb +1 -1
- data/lib/lutaml/qea/repositories/base_repository.rb +6 -6
- data/lib/lutaml/qea/validation/base_validator.rb +2 -3
- data/lib/lutaml/qea/validation/validation_message.rb +2 -2
- data/lib/lutaml/qea/validation/validation_result.rb +2 -2
- data/lib/lutaml/sysml.rb +1 -1
- data/lib/lutaml/uml/has_members.rb +1 -1
- data/lib/lutaml/uml/parsers/dsl.rb +1 -1
- data/lib/lutaml/uml.rb +1 -1
- data/lib/lutaml/uml_repository/queries/inheritance_query.rb +0 -1
- data/lib/lutaml/uml_repository/repository.rb +2 -2
- data/lib/lutaml/version.rb +1 -1
- data/lib/lutaml.rb +3 -1
- data/lutaml.gemspec +2 -2
- metadata +5 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 9db8def51fe994ba67b18e3e2045df78ebc06fab52a471fb95e7421738e10dcc
|
|
4
|
+
data.tar.gz: 1ba2c6caed21e4a4b35b4a117f39327312505ebe2b72f389db3561f568395577
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9a529f0ab5096212dc808a5cd21ca2eba20cbc8f1bc940076398755302af766462e66e3984d33ef9349d0510c0d25aa845af4b8b7046b6cdc93317d2d21aba5d
|
|
7
|
+
data.tar.gz: e26992d6162b77054ef39f915d4633a213452a98b6e0057ae4240ad825d7f008f529024ba91b3dfbd7dc77ac40a02e4ee3c01cbbdeabcbe3e77c2d5898ebe468
|
data/.rubocop.yml
CHANGED
data/.rubocop_todo.yml
CHANGED
|
@@ -1,138 +1,32 @@
|
|
|
1
1
|
# This configuration was generated by
|
|
2
2
|
# `rubocop --auto-gen-config`
|
|
3
|
-
# on 2026-04-
|
|
3
|
+
# on 2026-04-25 02:05:14 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: 28
|
|
10
|
-
# This cop supports safe autocorrection (--autocorrect).
|
|
11
|
-
# Configuration parameters: EnforcedStyle, IndentationWidth.
|
|
12
|
-
# SupportedStyles: with_first_argument, with_fixed_indentation
|
|
13
|
-
Layout/ArgumentAlignment:
|
|
14
|
-
Exclude:
|
|
15
|
-
- 'lib/lutaml/qea/database.rb'
|
|
16
|
-
- 'spec/lutaml/qea/database_spec.rb'
|
|
17
|
-
- 'spec/lutaml/qea/factory/class_transformer_spec.rb'
|
|
18
|
-
- 'spec/lutaml/qea/factory/package_transformer_spec.rb'
|
|
19
|
-
- 'spec/lutaml/qea/verification/comprehensive_equivalence_spec.rb'
|
|
20
|
-
|
|
21
|
-
# Offense count: 2
|
|
22
|
-
# This cop supports safe autocorrection (--autocorrect).
|
|
23
|
-
# Configuration parameters: EnforcedStyle, IndentationWidth.
|
|
24
|
-
# SupportedStyles: with_first_element, with_fixed_indentation
|
|
25
|
-
Layout/ArrayAlignment:
|
|
26
|
-
Exclude:
|
|
27
|
-
- 'spec/lutaml/qea/verification/equivalence_integration_spec.rb'
|
|
28
|
-
|
|
29
|
-
# Offense count: 2
|
|
30
|
-
# This cop supports safe autocorrection (--autocorrect).
|
|
31
|
-
# Configuration parameters: EnforcedStyleAlignWith.
|
|
32
|
-
# SupportedStylesAlignWith: either, start_of_block, start_of_line
|
|
33
|
-
Layout/BlockAlignment:
|
|
34
|
-
Exclude:
|
|
35
|
-
- 'lib/lutaml/uml_repository/queries/class_query.rb'
|
|
36
|
-
- 'spec/lutaml/qea/verification/equivalence_integration_spec.rb'
|
|
37
|
-
|
|
38
9
|
# Offense count: 1
|
|
39
10
|
# This cop supports safe autocorrection (--autocorrect).
|
|
40
|
-
Layout/BlockEndNewline:
|
|
41
|
-
Exclude:
|
|
42
|
-
- 'spec/lutaml/qea/verification/equivalence_integration_spec.rb'
|
|
43
|
-
|
|
44
|
-
# Offense count: 2
|
|
45
|
-
# This cop supports safe autocorrection (--autocorrect).
|
|
46
|
-
# Configuration parameters: AllowForAlignment.
|
|
47
|
-
Layout/CommentIndentation:
|
|
48
|
-
Exclude:
|
|
49
|
-
- 'lib/lutaml/qea/factory/class_transformer.rb'
|
|
50
|
-
|
|
51
|
-
# Offense count: 2
|
|
52
|
-
# This cop supports safe autocorrection (--autocorrect).
|
|
53
11
|
Layout/ElseAlignment:
|
|
54
12
|
Exclude:
|
|
55
13
|
- 'lib/lutaml/qea/factory/class_transformer.rb'
|
|
56
|
-
- 'lib/lutaml/uml_repository/queries/class_query.rb'
|
|
57
|
-
|
|
58
|
-
# Offense count: 1
|
|
59
|
-
# This cop supports safe autocorrection (--autocorrect).
|
|
60
|
-
# Configuration parameters: EmptyLineBetweenMethodDefs, EmptyLineBetweenClassDefs, EmptyLineBetweenModuleDefs, DefLikeMacros, AllowAdjacentOneLineDefs, NumberOfEmptyLines.
|
|
61
|
-
Layout/EmptyLineBetweenDefs:
|
|
62
|
-
Exclude:
|
|
63
|
-
- 'lib/lutaml/uml_repository/statistics_calculator.rb'
|
|
64
|
-
|
|
65
|
-
# Offense count: 1
|
|
66
|
-
# This cop supports safe autocorrection (--autocorrect).
|
|
67
|
-
Layout/EmptyLines:
|
|
68
|
-
Exclude:
|
|
69
|
-
- 'lib/lutaml/uml_repository/statistics_calculator.rb'
|
|
70
|
-
|
|
71
|
-
# Offense count: 2
|
|
72
|
-
# This cop supports safe autocorrection (--autocorrect).
|
|
73
|
-
# Configuration parameters: EnforcedStyle.
|
|
74
|
-
# SupportedStyles: empty_lines, no_empty_lines
|
|
75
|
-
Layout/EmptyLinesAroundBlockBody:
|
|
76
|
-
Exclude:
|
|
77
|
-
- 'lib/lutaml/qea/factory/class_transformer.rb'
|
|
78
|
-
- 'lib/lutaml/qea/factory/enum_transformer.rb'
|
|
79
14
|
|
|
80
15
|
# Offense count: 1
|
|
81
16
|
# This cop supports safe autocorrection (--autocorrect).
|
|
82
|
-
# Configuration parameters: EnforcedStyleAlignWith.
|
|
83
|
-
# SupportedStylesAlignWith: keyword, variable, start_of_line
|
|
84
|
-
Layout/EndAlignment:
|
|
85
|
-
Exclude:
|
|
86
|
-
- 'lib/lutaml/qea/factory/class_transformer.rb'
|
|
87
|
-
|
|
88
|
-
# Offense count: 16
|
|
89
|
-
# This cop supports safe autocorrection (--autocorrect).
|
|
90
|
-
# Configuration parameters: AllowMultipleStyles, EnforcedHashRocketStyle, EnforcedColonStyle, EnforcedLastArgumentHashStyle.
|
|
91
|
-
# SupportedHashRocketStyles: key, separator, table
|
|
92
|
-
# SupportedColonStyles: key, separator, table
|
|
93
|
-
# SupportedLastArgumentHashStyles: always_inspect, always_ignore, ignore_implicit, ignore_explicit
|
|
94
|
-
Layout/HashAlignment:
|
|
95
|
-
Exclude:
|
|
96
|
-
- 'spec/lutaml/qea/factory/class_transformer_spec.rb'
|
|
97
|
-
- 'spec/lutaml/qea/factory/package_transformer_spec.rb'
|
|
98
|
-
|
|
99
|
-
# Offense count: 1
|
|
100
|
-
# This cop supports safe autocorrection (--autocorrect).
|
|
101
|
-
# Configuration parameters: EnforcedStyle.
|
|
102
|
-
# SupportedStyles: normal, indented_internal_methods
|
|
103
|
-
Layout/IndentationConsistency:
|
|
104
|
-
Exclude:
|
|
105
|
-
- 'lib/lutaml/qea/factory/class_transformer.rb'
|
|
106
|
-
|
|
107
|
-
# Offense count: 6
|
|
108
|
-
# This cop supports safe autocorrection (--autocorrect).
|
|
109
17
|
# Configuration parameters: Width, EnforcedStyleAlignWith, AllowedPatterns.
|
|
110
18
|
# SupportedStylesAlignWith: start_of_line, relative_to_receiver
|
|
111
19
|
Layout/IndentationWidth:
|
|
112
20
|
Exclude:
|
|
113
21
|
- 'lib/lutaml/qea/factory/class_transformer.rb'
|
|
114
|
-
- 'lib/lutaml/uml_repository/queries/class_query.rb'
|
|
115
|
-
- 'spec/lutaml/qea/verification/equivalence_integration_spec.rb'
|
|
116
22
|
|
|
117
|
-
# Offense count:
|
|
23
|
+
# Offense count: 80
|
|
118
24
|
# This cop supports safe autocorrection (--autocorrect).
|
|
119
25
|
# Configuration parameters: Max, AllowHeredoc, AllowURI, AllowQualifiedName, URISchemes, AllowRBSInlineAnnotation, AllowCopDirectives, AllowedPatterns, SplitStrings.
|
|
120
26
|
# URISchemes: http, https
|
|
121
27
|
Layout/LineLength:
|
|
122
28
|
Enabled: false
|
|
123
29
|
|
|
124
|
-
# Offense count: 22
|
|
125
|
-
# This cop supports safe autocorrection (--autocorrect).
|
|
126
|
-
# Configuration parameters: AllowInHeredoc.
|
|
127
|
-
Layout/TrailingWhitespace:
|
|
128
|
-
Exclude:
|
|
129
|
-
- 'lib/lutaml/qea/database.rb'
|
|
130
|
-
- 'spec/lutaml/qea/database_spec.rb'
|
|
131
|
-
- 'spec/lutaml/qea/factory/class_transformer_spec.rb'
|
|
132
|
-
- 'spec/lutaml/qea/factory/package_transformer_spec.rb'
|
|
133
|
-
- 'spec/lutaml/qea/verification/comprehensive_equivalence_spec.rb'
|
|
134
|
-
- 'spec/lutaml/qea/verification/equivalence_integration_spec.rb'
|
|
135
|
-
|
|
136
30
|
# Offense count: 1
|
|
137
31
|
Lint/BinaryOperatorWithIdenticalOperands:
|
|
138
32
|
Exclude:
|
|
@@ -203,13 +97,6 @@ Lint/UnusedMethodArgument:
|
|
|
203
97
|
Exclude:
|
|
204
98
|
- 'lib/lutaml/cli/uml/export_command.rb'
|
|
205
99
|
|
|
206
|
-
# Offense count: 1
|
|
207
|
-
# This cop supports safe autocorrection (--autocorrect).
|
|
208
|
-
# Configuration parameters: ContextCreatingMethods, MethodCreatingMethods.
|
|
209
|
-
Lint/UselessAccessModifier:
|
|
210
|
-
Exclude:
|
|
211
|
-
- 'lib/lutaml/uml_repository/statistics_calculator.rb'
|
|
212
|
-
|
|
213
100
|
# Offense count: 8
|
|
214
101
|
# Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes, Max.
|
|
215
102
|
Metrics/AbcSize:
|
|
@@ -324,7 +211,7 @@ RSpec/ContextWording:
|
|
|
324
211
|
RSpec/DescribeClass:
|
|
325
212
|
Enabled: false
|
|
326
213
|
|
|
327
|
-
# Offense count:
|
|
214
|
+
# Offense count: 657
|
|
328
215
|
# Configuration parameters: CountAsOne.
|
|
329
216
|
RSpec/ExampleLength:
|
|
330
217
|
Max: 108
|
|
@@ -392,7 +279,7 @@ RSpec/MessageSpies:
|
|
|
392
279
|
- 'spec/lutaml/uml_repository/presenters/diagram_presenter_spec.rb'
|
|
393
280
|
- 'spec/lutaml/uml_repository/repository_spec.rb'
|
|
394
281
|
|
|
395
|
-
# Offense count:
|
|
282
|
+
# Offense count: 946
|
|
396
283
|
RSpec/MultipleExpectations:
|
|
397
284
|
Max: 26
|
|
398
285
|
|
|
@@ -465,17 +352,6 @@ Security/MarshalLoad:
|
|
|
465
352
|
- 'lib/lutaml/uml_repository/package_loader.rb'
|
|
466
353
|
- 'spec/lutaml/uml_repository/package_exporter_spec.rb'
|
|
467
354
|
|
|
468
|
-
# Offense count: 1
|
|
469
|
-
# This cop supports safe autocorrection (--autocorrect).
|
|
470
|
-
# Configuration parameters: EnforcedStyle, ProceduralMethods, FunctionalMethods, AllowedMethods, AllowedPatterns, AllowBracesOnProceduralOneLiners, BracesRequiredMethods.
|
|
471
|
-
# SupportedStyles: line_count_based, semantic, braces_for_chaining, always_braces
|
|
472
|
-
# ProceduralMethods: benchmark, bm, bmbm, create, each_with_object, measure, new, realtime, tap, with_object
|
|
473
|
-
# FunctionalMethods: let, let!, subject, watch
|
|
474
|
-
# AllowedMethods: lambda, proc, it
|
|
475
|
-
Style/BlockDelimiters:
|
|
476
|
-
Exclude:
|
|
477
|
-
- 'spec/lutaml/qea/verification/equivalence_integration_spec.rb'
|
|
478
|
-
|
|
479
355
|
# Offense count: 2
|
|
480
356
|
# This cop supports safe autocorrection (--autocorrect).
|
|
481
357
|
Style/ComparableClamp:
|
|
@@ -493,19 +369,6 @@ Style/EvalWithLocation:
|
|
|
493
369
|
Exclude:
|
|
494
370
|
- 'spec/lutaml/cli/uml/search_command_spec.rb'
|
|
495
371
|
|
|
496
|
-
# Offense count: 2
|
|
497
|
-
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
498
|
-
Style/IdenticalConditionalBranches:
|
|
499
|
-
Exclude:
|
|
500
|
-
- 'lib/lutaml/qea/factory/class_transformer.rb'
|
|
501
|
-
|
|
502
|
-
# Offense count: 1
|
|
503
|
-
# This cop supports safe autocorrection (--autocorrect).
|
|
504
|
-
# Configuration parameters: AllowIfModifier.
|
|
505
|
-
Style/IfInsideElse:
|
|
506
|
-
Exclude:
|
|
507
|
-
- 'lib/lutaml/uml_repository/queries/class_query.rb'
|
|
508
|
-
|
|
509
372
|
# Offense count: 1
|
|
510
373
|
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
511
374
|
Style/PartitionInsteadOfDoubleSelect:
|
|
@@ -518,11 +381,3 @@ Style/SafeNavigationChainLength:
|
|
|
518
381
|
Exclude:
|
|
519
382
|
- 'lib/lutaml/qea/validation/attribute_validator.rb'
|
|
520
383
|
- 'lib/lutaml/qea/validation/operation_validator.rb'
|
|
521
|
-
|
|
522
|
-
# Offense count: 1
|
|
523
|
-
# This cop supports safe autocorrection (--autocorrect).
|
|
524
|
-
# Configuration parameters: EnforcedStyle, MinSize.
|
|
525
|
-
# SupportedStyles: percent, brackets
|
|
526
|
-
Style/SymbolArray:
|
|
527
|
-
Exclude:
|
|
528
|
-
- 'lib/lutaml/xmi/parsers/xmi_base.rb'
|
data/CHANGELOG.md
ADDED
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## v0.10.3 (2026-04-25)
|
|
4
|
+
|
|
5
|
+
### Performance
|
|
6
|
+
|
|
7
|
+
- Replace O(n) linear scans with O(1) hash lookups in QEA transformers
|
|
8
|
+
and XMI parsers (connector, diagram, element lookups)
|
|
9
|
+
- Single-pass IndexBuilder replacing 9 separate tree traversals
|
|
10
|
+
- Memoized inheritance depth in StatisticsCalculator
|
|
11
|
+
- Set-based dedup in Repository associations_index
|
|
12
|
+
|
|
13
|
+
### Bug fixes
|
|
14
|
+
|
|
15
|
+
- Fix Windows EACCES: replace Tempfile.new with temp_lur_path helper
|
|
16
|
+
to avoid file handle conflicts with rubyzip
|
|
17
|
+
- Fix xml_spec: use include matcher for platform-varying content nodes
|
|
18
|
+
|
|
19
|
+
### Improvements
|
|
20
|
+
|
|
21
|
+
- Consistent error hierarchy: all module error classes now inherit from
|
|
22
|
+
`Lutaml::Error` (single rescue point for consumers)
|
|
23
|
+
- Fix gemspec email typo (mismatched quote)
|
|
24
|
+
- Bump required_ruby_version from >= 2.7 to >= 3.2 (matching CI)
|
|
25
|
+
- Rubocop: 0 offenses remaining
|
|
26
|
+
|
|
27
|
+
## v0.10.2 (2026-04-24)
|
|
28
|
+
|
|
29
|
+
### Bug fixes
|
|
30
|
+
|
|
31
|
+
- Fix Windows Errno::EACCES in PackageExporter: retry on file lock race
|
|
32
|
+
- Remove moxml git override (0.1.15 released)
|
|
33
|
+
|
|
34
|
+
## v0.10.1 (2026-04-23)
|
|
35
|
+
|
|
36
|
+
### Bug fixes
|
|
37
|
+
|
|
38
|
+
- Fix flaky CI tests: benchmark speedup assertion and Windows Tempfile race
|
|
39
|
+
- Fix xmi 0.5.6 compatibility: rename SparxRoot to Sparx::Root
|
|
40
|
+
- Fix nil @xmi_index in liquid drops: auto-init via xmi_index method
|
|
41
|
+
- Fix infinite loop in resolve_package_path with circular package hierarchy
|
|
42
|
+
- Fix stereotype type bugs, diagram package_id overwrite, and
|
|
43
|
+
DataTypeTransformer crash
|
|
44
|
+
- Fix 46 pending/failing spec tests across QEA, verification, and liquid specs
|
|
45
|
+
|
|
46
|
+
## v0.10.0 (2026-04-21)
|
|
47
|
+
|
|
48
|
+
### Breaking changes
|
|
49
|
+
|
|
50
|
+
- Update to lutaml-model 0.8.0, expressir 2.3, and xmi 0.5.x
|
|
51
|
+
- Migrate Lutaml::Uml models to lutaml-model serialization
|
|
52
|
+
- Unify namespace of Sysml module
|
|
53
|
+
|
|
54
|
+
### Features
|
|
55
|
+
|
|
56
|
+
- Complete QEA to UML document migration
|
|
57
|
+
- Add PackagePresenter for structured output
|
|
58
|
+
- Add option to skip queries
|
|
59
|
+
- Add function to get qualified name
|
|
60
|
+
- Add Lutaml::Uml::Fidelity class
|
|
61
|
+
- Add attributes type, weight and status to Lutaml::Uml::Constraint
|
|
62
|
+
- Add generalization into Lutaml::Uml::Class
|
|
63
|
+
- Transform option keys to symbol
|
|
64
|
+
- Output find result based on format option
|
|
65
|
+
- Implement default sorting for diff_with_score comparison
|
|
66
|
+
- find_by_name returns single object instead of array
|
|
67
|
+
|
|
68
|
+
### Bug fixes
|
|
69
|
+
|
|
70
|
+
- Fix Windows EACCES file rename issues (Tempfile handle conflicts)
|
|
71
|
+
- Fix YAML disallowed class loading error
|
|
72
|
+
- Fix attribute parsing values
|
|
73
|
+
- Fix association loading by QEA parser
|
|
74
|
+
- Fix association_generalization parsed by xmi parser
|
|
75
|
+
- Fix certificate CRL error
|
|
76
|
+
|
|
77
|
+
## v0.9.43 (2025-11-20)
|
|
78
|
+
|
|
79
|
+
- Refactor klass_hash to use KlassDrop object in upper_klass
|
|
80
|
+
|
|
81
|
+
## v0.9.42 (2025-11-18)
|
|
82
|
+
|
|
83
|
+
- Directly convert XMI into UML
|
|
84
|
+
|
|
85
|
+
## v0.9.41 (2025-11-12)
|
|
86
|
+
|
|
87
|
+
- Remove unneeded version files
|
|
88
|
+
- Fix error when imports key is nil
|
|
89
|
+
- Unify Sysml namespace
|
|
90
|
+
|
|
91
|
+
## v0.9.40 (2025-11-10)
|
|
92
|
+
|
|
93
|
+
- Convert DSL to UML
|
|
94
|
+
- Change namespace of Formatter and HasAttributes
|
|
95
|
+
- Update GraphViz and related specs
|
|
96
|
+
- Add Lutaml::Uml::Fidelity class
|
|
97
|
+
- Remove duplicated GraphViz code
|
|
98
|
+
- Create Lutaml::Uml models by Xmi hash
|
|
99
|
+
- Migrate Lutaml::Uml models to lutaml-model
|
|
100
|
+
|
|
101
|
+
## v0.9.39 (2025-11-03)
|
|
102
|
+
|
|
103
|
+
- Change selection criteria for dependencies
|
|
104
|
+
|
|
105
|
+
## v0.9.38 (2025-10-31)
|
|
106
|
+
|
|
107
|
+
- Add subtype_of to klass and enum drop models
|
|
108
|
+
- Get stereotype by type idref in owned attribute
|
|
@@ -139,8 +139,8 @@ module Lutaml
|
|
|
139
139
|
|
|
140
140
|
desc "diagram ACTION", "Diagram rendering commands"
|
|
141
141
|
Uml::DiagramCommand.add_options_to(self, :diagram)
|
|
142
|
-
def diagram(action, *
|
|
143
|
-
Uml::DiagramCommand.new(options.to_h).run(action, *
|
|
142
|
+
def diagram(action, *)
|
|
143
|
+
Uml::DiagramCommand.new(options.to_h).run(action, *)
|
|
144
144
|
end
|
|
145
145
|
|
|
146
146
|
# ===================================================================
|
data/lib/lutaml/command_line.rb
CHANGED
|
@@ -421,7 +421,7 @@ module Lutaml
|
|
|
421
421
|
end
|
|
422
422
|
|
|
423
423
|
# Custom error class for parsing failures
|
|
424
|
-
class ParseError <
|
|
424
|
+
class ParseError < Lutaml::Error
|
|
425
425
|
# @return [StandardError] Original error that caused parsing failure
|
|
426
426
|
attr_reader :original_error
|
|
427
427
|
|
|
@@ -392,7 +392,7 @@ module Lutaml
|
|
|
392
392
|
end
|
|
393
393
|
|
|
394
394
|
# Error class for unsupported file formats
|
|
395
|
-
class UnsupportedFormatError <
|
|
395
|
+
class UnsupportedFormatError < Lutaml::Error
|
|
396
396
|
# @return [String] Path to the unsupported file
|
|
397
397
|
attr_reader :file_path
|
|
398
398
|
|
|
@@ -118,8 +118,8 @@ module Lutaml
|
|
|
118
118
|
# @example
|
|
119
119
|
# repository.find_first(name: "Test")
|
|
120
120
|
# repository.find_first { |r| r.name.start_with?("Test") }
|
|
121
|
-
def find_first(conditions = nil, &
|
|
122
|
-
where(conditions, &
|
|
121
|
+
def find_first(conditions = nil, &)
|
|
122
|
+
where(conditions, &).first
|
|
123
123
|
end
|
|
124
124
|
|
|
125
125
|
# Check if any records match conditions
|
|
@@ -127,8 +127,8 @@ module Lutaml
|
|
|
127
127
|
# @param conditions [Hash, nil] Optional conditions
|
|
128
128
|
# @yield [record] Optional block for custom filtering
|
|
129
129
|
# @return [Boolean] true if any records match
|
|
130
|
-
def any?(conditions = nil, &
|
|
131
|
-
!where(conditions, &
|
|
130
|
+
def any?(conditions = nil, &)
|
|
131
|
+
!where(conditions, &).empty?
|
|
132
132
|
end
|
|
133
133
|
|
|
134
134
|
# Check if no records match conditions
|
|
@@ -136,8 +136,8 @@ module Lutaml
|
|
|
136
136
|
# @param conditions [Hash, nil] Optional conditions
|
|
137
137
|
# @yield [record] Optional block for custom filtering
|
|
138
138
|
# @return [Boolean] true if no records match
|
|
139
|
-
def none?(conditions = nil, &
|
|
140
|
-
where(conditions, &
|
|
139
|
+
def none?(conditions = nil, &)
|
|
140
|
+
where(conditions, &).empty?
|
|
141
141
|
end
|
|
142
142
|
|
|
143
143
|
# Select specific attributes from records
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
require "set"
|
|
4
3
|
require_relative "validation_result"
|
|
5
4
|
|
|
6
5
|
module Lutaml
|
|
@@ -233,8 +232,8 @@ module Lutaml
|
|
|
233
232
|
# @param entities [Array] Collection of entities to validate
|
|
234
233
|
# @yield [entity] Validation block for each entity
|
|
235
234
|
# @return [ValidationResult]
|
|
236
|
-
def validate_each(entities, &
|
|
237
|
-
entities.each(&
|
|
235
|
+
def validate_each(entities, &)
|
|
236
|
+
entities.each(&)
|
|
238
237
|
@result
|
|
239
238
|
end
|
|
240
239
|
|
data/lib/lutaml/sysml.rb
CHANGED
|
@@ -10,7 +10,7 @@ require "lutaml/converter/dsl_to_uml"
|
|
|
10
10
|
module Lutaml
|
|
11
11
|
module Uml
|
|
12
12
|
module Parsers
|
|
13
|
-
class ParsingError <
|
|
13
|
+
class ParsingError < Lutaml::Error; end
|
|
14
14
|
|
|
15
15
|
# Class for parsing LutaML dsl into Lutaml::Uml::Document
|
|
16
16
|
class Dsl < Parslet::Parser
|
data/lib/lutaml/uml.rb
CHANGED
|
@@ -625,8 +625,8 @@ module Lutaml
|
|
|
625
625
|
# results = repo.query! do |q|
|
|
626
626
|
# q.classes.where(stereotype: 'featureType')
|
|
627
627
|
# end
|
|
628
|
-
def query!(&
|
|
629
|
-
query(&
|
|
628
|
+
def query!(&)
|
|
629
|
+
query(&).execute
|
|
630
630
|
end
|
|
631
631
|
|
|
632
632
|
# Convenience methods for SPA data transformer
|
data/lib/lutaml/version.rb
CHANGED
data/lib/lutaml.rb
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
3
|
require_relative "lutaml/version"
|
|
4
|
-
require_relative "lutaml/parser"
|
|
5
4
|
|
|
6
5
|
module Lutaml
|
|
6
|
+
class Error < StandardError; end
|
|
7
7
|
end
|
|
8
8
|
|
|
9
|
+
require_relative "lutaml/parser"
|
|
10
|
+
|
|
9
11
|
require_relative "lutaml/express"
|
|
10
12
|
require_relative "lutaml/formatter"
|
|
11
13
|
require_relative "lutaml/layout"
|
data/lutaml.gemspec
CHANGED
|
@@ -4,7 +4,7 @@ Gem::Specification.new do |spec|
|
|
|
4
4
|
spec.name = "lutaml"
|
|
5
5
|
spec.version = Lutaml::VERSION
|
|
6
6
|
spec.authors = ["Ribose Inc."]
|
|
7
|
-
spec.email = ["open.source@ribose.com
|
|
7
|
+
spec.email = ["open.source@ribose.com"]
|
|
8
8
|
|
|
9
9
|
spec.summary = "LutaML: data models in textual form"
|
|
10
10
|
spec.description = "LutaML: data models in textual form"
|
|
@@ -27,7 +27,7 @@ Gem::Specification.new do |spec|
|
|
|
27
27
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
|
28
28
|
spec.require_paths = ["lib"]
|
|
29
29
|
|
|
30
|
-
spec.required_ruby_version = ">= 2.
|
|
30
|
+
spec.required_ruby_version = ">= 3.2.0"
|
|
31
31
|
|
|
32
32
|
spec.add_dependency "expressir", "~> 2.3"
|
|
33
33
|
# TODO: remove once reline declares fiddle as a dependency
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: lutaml
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.10.
|
|
4
|
+
version: 0.10.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ribose Inc.
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-04-
|
|
11
|
+
date: 2026-04-25 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: expressir
|
|
@@ -312,7 +312,7 @@ dependencies:
|
|
|
312
312
|
version: 0.5.2
|
|
313
313
|
description: 'LutaML: data models in textual form'
|
|
314
314
|
email:
|
|
315
|
-
- open.source@ribose.com
|
|
315
|
+
- open.source@ribose.com
|
|
316
316
|
executables:
|
|
317
317
|
- lutaml
|
|
318
318
|
- lutaml-sysml
|
|
@@ -330,6 +330,7 @@ files:
|
|
|
330
330
|
- ".rspec"
|
|
331
331
|
- ".rubocop.yml"
|
|
332
332
|
- ".rubocop_todo.yml"
|
|
333
|
+
- CHANGELOG.md
|
|
333
334
|
- Gemfile
|
|
334
335
|
- Makefile
|
|
335
336
|
- README.adoc
|
|
@@ -960,7 +961,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
960
961
|
requirements:
|
|
961
962
|
- - ">="
|
|
962
963
|
- !ruby/object:Gem::Version
|
|
963
|
-
version: 2.
|
|
964
|
+
version: 3.2.0
|
|
964
965
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
965
966
|
requirements:
|
|
966
967
|
- - ">="
|