drawio_dsl 0.12.1 → 0.12.2
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/CHANGELOG.md +8 -0
- data/lib/drawio_dsl/schema/node.rb +16 -0
- data/lib/drawio_dsl/version.rb +1 -1
- data/package-lock.json +2 -2
- data/package.json +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 801691dbce6c90979b5e7a846d534cd17b0ecb47355b46ae44b7a9c22880cf00
|
4
|
+
data.tar.gz: a845f18009404add0f3dc977ccf3c849fd9ce04bf584b1b4731a1b52b98987d5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 469d4b856a22352335a4d2749220fb0be129d1a6f3b54e33306beccdfe5b19c2cbb36c0100d01f93cdfd400e4a866ebac5fd801106bb95e27eac95e473c8133c
|
7
|
+
data.tar.gz: 2e8d92433608dfe1ae1dc8d674f7ec7d823ca7fe220a83dddd0768617ee28641117883d027412a4ceae3d1d89452e98d0ad57fc8476b9e53dec61b6b58c20a46
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,11 @@
|
|
1
|
+
## [0.12.1](https://github.com/klueless-io/drawio_dsl/compare/v0.12.0...v0.12.1) (2022-10-02)
|
2
|
+
|
3
|
+
|
4
|
+
### Bug Fixes
|
5
|
+
|
6
|
+
* update gem dependancies ([c175ee8](https://github.com/klueless-io/drawio_dsl/commit/c175ee8f782efd26e56e239a53627ffe4c7eaa78))
|
7
|
+
* update gem dependancies ([80864a8](https://github.com/klueless-io/drawio_dsl/commit/80864a8c80b60ee9dfb3d7d9ea816d93fe78ac39))
|
8
|
+
|
1
9
|
# [0.12.0](https://github.com/klueless-io/drawio_dsl/compare/v0.11.8...v0.12.0) (2022-07-01)
|
2
10
|
|
3
11
|
|
@@ -5,13 +5,27 @@ module DrawioDsl
|
|
5
5
|
# Node is a base class for shapes, connections, positioners and layout rules
|
6
6
|
#
|
7
7
|
class Node
|
8
|
+
# Unique ID so that nodes can be referenced
|
8
9
|
attr_accessor :id
|
10
|
+
|
11
|
+
# What drawio page is this node on?
|
9
12
|
attr_accessor :page
|
13
|
+
|
14
|
+
# What is the parent node?
|
10
15
|
attr_accessor :parent
|
16
|
+
|
17
|
+
# What is the class of this node? [anchor, layout_rule, shape, line, ]
|
11
18
|
attr_accessor :classification
|
19
|
+
|
20
|
+
# Represents the node type as a string [circle, square, diamond, line]
|
12
21
|
attr_accessor :key
|
22
|
+
|
23
|
+
# Child nodes
|
13
24
|
attr_accessor :nodes
|
14
25
|
|
26
|
+
# Optional description of this node, this can be useful for json output
|
27
|
+
attr_accessor :description
|
28
|
+
|
15
29
|
def initialize(page, **args)
|
16
30
|
@page = page
|
17
31
|
@id = args[:id]
|
@@ -19,6 +33,7 @@ module DrawioDsl
|
|
19
33
|
@classification = args[:classification] || :unknown
|
20
34
|
@key = args[:key] || :unknown
|
21
35
|
@nodes = NodeList.new
|
36
|
+
@description = args[:description]
|
22
37
|
end
|
23
38
|
|
24
39
|
def to_h
|
@@ -28,6 +43,7 @@ module DrawioDsl
|
|
28
43
|
classification: classification,
|
29
44
|
key: key
|
30
45
|
}
|
46
|
+
result[:description] = description unless description.nil?
|
31
47
|
result[:nodes] = nodes.to_h if nodes.any?
|
32
48
|
result
|
33
49
|
end
|
data/lib/drawio_dsl/version.rb
CHANGED
data/package-lock.json
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
{
|
2
2
|
"name": "drawio_dsl",
|
3
|
-
"version": "0.12.
|
3
|
+
"version": "0.12.2",
|
4
4
|
"lockfileVersion": 2,
|
5
5
|
"requires": true,
|
6
6
|
"packages": {
|
7
7
|
"": {
|
8
8
|
"name": "drawio_dsl",
|
9
|
-
"version": "0.12.
|
9
|
+
"version": "0.12.2",
|
10
10
|
"devDependencies": {
|
11
11
|
"@klueless-js/semantic-release-rubygem": "github:klueless-js/semantic-release-rubygem",
|
12
12
|
"@semantic-release/changelog": "^6.0.1",
|
data/package.json
CHANGED