lutaml-uml 0.2.9 → 0.2.10

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: 7e25b300c9a636999a7861a78ea5c677d1c0c6767180a81f8b63cc6f9af2f8aa
4
- data.tar.gz: b78902b23e27ec296913e2943c5fb966d17268f6c28e2b1c50409450e0310ed8
3
+ metadata.gz: 2a4318a33ee0facc590ee478a533551314aa96290ff3f9beb2a8506518f107fb
4
+ data.tar.gz: 18164bb8e957223dc1f1fdeacd7603f61705482d3299de01edcd6c96bb1860a4
5
5
  SHA512:
6
- metadata.gz: 287de7e6b28b6ff2c1dffab0db3a4503257c3b75c00409cd56184629875f3196e9a91dee7acb21a8cf1d1e484a59a9d5188836d33002599d8a4407da4a51f68c
7
- data.tar.gz: 14f5782e4d85885c3fca50f486cf8107648fac50e50acdeb2d931dc6a68c4e0e8fe1c9b9927dfd4449a02186ea36a969d1591fd55712334dca72cb49d7fba103
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
- import Relationship, Element
11
- render_option typed_as_associations
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) { name.as(: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 >>
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Lutaml
4
4
  module Uml
5
- VERSION = "0.2.9"
5
+ VERSION = "0.2.10"
6
6
  end
7
7
  end
@@ -15,5 +15,7 @@ diagram MyView {
15
15
  ~friendlyAttributeProfile: <<Type>> "CharacterString" [1..*]
16
16
  ~friendlyAttributeProfile1: <<Type>> "CharacterString"
17
17
  #protectedAttributeProfile: CharacterString
18
+ type/text: String
19
+ slashType: slash/type
18
20
  }
19
21
  }
@@ -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(7)
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.9
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-10 00:00:00.000000000 Z
11
+ date: 2021-03-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: hashie