lutaml-uml 0.2.9 → 0.2.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LUTAML.adoc +8 -3
- data/lib/lutaml/uml/parsers/dsl.rb +2 -2
- data/lib/lutaml/uml/version.rb +1 -1
- data/spec/fixtures/dsl/diagram_class_fields.lutaml +2 -0
- data/spec/lutaml/uml/parsers/dsl_spec.rb +12 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2a4318a33ee0facc590ee478a533551314aa96290ff3f9beb2a8506518f107fb
|
4
|
+
data.tar.gz: 18164bb8e957223dc1f1fdeacd7603f61705482d3299de01edcd6c96bb1860a4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fcb70562cec32586375a93e1a80a575bd6dc3b7150d2867046447af6461dec4af6e0c59ed179607dc03408e285c8cb6f1c627004f36118372027c8e9b9890bc2
|
7
|
+
data.tar.gz: 304d5c7326dbe2378a431c07cb50f0f21596a18dca6e0d694b2c7de26d1726a30e3932b3b2fd52f7f404a0a0453d7d7ec098b731f9460bab8eb24dd61939cbff
|
data/LUTAML.adoc
CHANGED
@@ -7,13 +7,18 @@
|
|
7
7
|
[source,java]
|
8
8
|
----
|
9
9
|
diagram MyView {
|
10
|
-
|
11
|
-
|
12
|
-
file "my_view.png"
|
10
|
+
title "My diagram"
|
11
|
+
caption "My custom caption"
|
13
12
|
fontname "Helvetica"
|
14
13
|
}
|
15
14
|
----
|
16
15
|
|
16
|
+
where:
|
17
|
+
|
18
|
+
* `fontname` - optional, configuration option to use supplied font name
|
19
|
+
* `title` - optional, set custom title for diagram
|
20
|
+
* `caption` - optional, set custom caption for diagram
|
21
|
+
|
17
22
|
== DataTypes
|
18
23
|
|
19
24
|
Lutaml supports 3 types of data_types: `data_type`, `primitive` and `enum`. Example of data types declaration:
|
@@ -117,7 +117,7 @@ module Lutaml
|
|
117
117
|
attribute_keyword? >>
|
118
118
|
spaces? >>
|
119
119
|
match['"\''].maybe >>
|
120
|
-
match['a-zA-Z0-9_\- '].repeat(1).as(:type) >>
|
120
|
+
match['a-zA-Z0-9_\- \/'].repeat(1).as(:type) >>
|
121
121
|
match['"\''].maybe >>
|
122
122
|
spaces?
|
123
123
|
)
|
@@ -126,7 +126,7 @@ module Lutaml
|
|
126
126
|
attribute_type.maybe
|
127
127
|
end
|
128
128
|
|
129
|
-
rule(:attribute_name) {
|
129
|
+
rule(:attribute_name) { match['a-zA-Z0-9_\- \/'].repeat(1).as(:name) }
|
130
130
|
rule(:attribute_definition) do
|
131
131
|
(visibility?.as(:visibility) >>
|
132
132
|
match['"\''].maybe >>
|
data/lib/lutaml/uml/version.rb
CHANGED
@@ -68,7 +68,18 @@ RSpec.describe Lutaml::Uml::Parsers::Dsl do
|
|
68
68
|
expect(by_name(classes, "AddressClassProfile")
|
69
69
|
.attributes.length).to eq(1)
|
70
70
|
expect(by_name(classes, "AttributeProfile")
|
71
|
-
.attributes.length).to eq(
|
71
|
+
.attributes.length).to eq(9)
|
72
|
+
expect(by_name(classes, "AttributeProfile")
|
73
|
+
.attributes.map(&:name))
|
74
|
+
.to(eq(["imlicistAttributeProfile",
|
75
|
+
"attributeProfile",
|
76
|
+
"attributeProfile1",
|
77
|
+
"privateAttributeProfile",
|
78
|
+
"friendlyAttributeProfile",
|
79
|
+
"friendlyAttributeProfile1",
|
80
|
+
"protectedAttributeProfile",
|
81
|
+
"type/text",
|
82
|
+
"slashType"]))
|
72
83
|
end
|
73
84
|
|
74
85
|
it "creates the correct attributes with the correct visibility" do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lutaml-uml
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-03-
|
11
|
+
date: 2021-03-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: hashie
|