lutaml 0.6.0 → 0.7.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '02909e34c428277e9b0e79733bcb3162da4a149c4880d96d0890131f8f12115c'
4
- data.tar.gz: d56d9a964b34c111493c7ffa0888dd2260d3d197e60bb92f4ee4aad1c236a87f
3
+ metadata.gz: cbe4e5553ef3d60b408138ed73e255782ff8489ef539ee2086e4c813b76ff20e
4
+ data.tar.gz: e6804f716ac877a1831739447d10da41f750385038a126ffe35bb60d94021a7c
5
5
  SHA512:
6
- metadata.gz: 869303f2d2cac53f2abe735f8fe1511f7cdf0443c57d8235f1e14520425b3ac3cbc5dd96d09d423a5c81d85a6539970010d880e518e4f3e48d4795a4737154a1
7
- data.tar.gz: 1f02d2681e529d6adef066a863b0656ceb9a4c1157d094a41f3d87db04aa4edc30c984093ed5ef4b81bbbdf9fd74f09ac95a4391c039b63c72397f53e3758415
6
+ metadata.gz: 06af7559b899bb92b0fe08874c90af384647b4b5a9c12214804a54df88222dbb8dda06ccf55ea6b003974eb37a27c2c87efb06fabb3be40407cbd6da0fe18c69
7
+ data.tar.gz: 9bdf7c6e82d5dc09ddc17f86af02479dafd14c71377f3c5d757110a69d390a7f05d87d5668032e16f1ae74099c0b291911bde69967614e33fa95a7deae520c7f
@@ -9,7 +9,7 @@ module Lutaml
9
9
 
10
10
  def serialize_document(repository)
11
11
  repository
12
- .to_hash(formatter: Formatter)
12
+ .to_hash(formatter: Formatter, include_empty: true)
13
13
  end
14
14
  end
15
15
  end
@@ -1,13 +1,13 @@
1
- require "expressir/express_exp/formatter"
2
- require "expressir/express_exp/schema_head_formatter"
3
- require "expressir/express_exp/hyperlink_formatter"
1
+ require "expressir/express/formatter"
2
+ require "expressir/express/schema_head_formatter"
3
+ require "expressir/express/hyperlink_formatter"
4
4
 
5
5
  module Lutaml
6
6
  module Express
7
7
  module LutamlPath
8
- class Formatter < Expressir::ExpressExp::Formatter
9
- include Expressir::ExpressExp::SchemaHeadFormatter
10
- include Expressir::ExpressExp::HyperlinkFormatter
8
+ class Formatter < Expressir::Express::Formatter
9
+ include Expressir::Express::SchemaHeadFormatter
10
+ include Expressir::Express::HyperlinkFormatter
11
11
  end
12
12
  end
13
13
  end
@@ -97,7 +97,7 @@ module Lutaml
97
97
  result += " : #{keyword}#{node.type}"
98
98
  end
99
99
  if node.cardinality
100
- result += "[#{node.cardinality[:min]}..#{node.cardinality[:max]}]"
100
+ result += "[#{node.cardinality['min']}..#{node.cardinality['max']}]"
101
101
  end
102
102
  result = escape_html_chars(result)
103
103
  result = "<U>#{result}</U>" if node.static
@@ -179,7 +179,7 @@ module Lutaml
179
179
  "onormal"
180
180
  end
181
181
  # swap labels and arrows if `dir` eq to `back`
182
- if attributes["dir"] == "back"
182
+ if attributes["dir"] == "back" && attributes["arrowtail"] != "vee"
183
183
  attributes["arrowhead"], attributes["arrowtail"] =
184
184
  [attributes["arrowtail"], attributes["arrowhead"]]
185
185
  attributes["headlabel"], attributes["taillabel"] =
@@ -288,6 +288,7 @@ module Lutaml
288
288
  associations = associations
289
289
  .lines.map { |line| " #{line}" }.join.chomp
290
290
 
291
+ require 'byebug'; byebug
291
292
  <<~HEREDOC
292
293
  digraph G {
293
294
  graph [#{@graph}]
data/lib/lutaml/parser.rb CHANGED
@@ -3,7 +3,7 @@ require "lutaml/uml"
3
3
  require "lutaml/xmi"
4
4
  require "lutaml/uml/lutaml_path/document_wrapper"
5
5
  require "lutaml/express/lutaml_path/document_wrapper"
6
- require "expressir/express_exp/cache"
6
+ require "expressir/express/cache"
7
7
 
8
8
  module Lutaml
9
9
  class Parser
@@ -38,9 +38,9 @@ module Lutaml
38
38
  def parse_into_document
39
39
  case parse_type
40
40
  when "exp"
41
- Expressir::ExpressExp::Parser.from_files(file_list.map(&:path))
41
+ Expressir::Express::Parser.from_files(file_list.map(&:path))
42
42
  when EXPRESS_CACHE_PARSE_TYPE
43
- Expressir::ExpressExp::Cache.from_file(file_list.first.path)
43
+ Expressir::Express::Cache.from_file(file_list.first.path)
44
44
  when 'xmi'
45
45
  file_list.map { |file| Lutaml::XMI::Parsers::XML.parse(file) }
46
46
  when "lutaml"
@@ -1,3 +1,3 @@
1
1
  module Lutaml
2
- VERSION = "0.6.0".freeze
2
+ VERSION = "0.7.3".freeze
3
3
  end
data/lutaml.gemspec CHANGED
@@ -31,7 +31,7 @@ Gem::Specification.new do |spec|
31
31
  spec.add_runtime_dependency "lutaml-uml"
32
32
  spec.add_runtime_dependency "lutaml-xmi"
33
33
  spec.add_runtime_dependency "thor", "~> 1.0"
34
- spec.add_development_dependency "nokogiri", "~> 1.10"
34
+ spec.add_runtime_dependency "nokogiri", "~> 1.10"
35
35
 
36
36
  spec.add_development_dependency "bundler", "~> 2.0"
37
37
  spec.add_development_dependency "byebug"
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.6.0
4
+ version: 0.7.3
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-28 00:00:00.000000000 Z
11
+ date: 2021-06-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: lutaml-express
@@ -73,7 +73,7 @@ dependencies:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
75
  version: '1.10'
76
- type: :development
76
+ type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
@@ -221,7 +221,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
221
221
  - !ruby/object:Gem::Version
222
222
  version: '0'
223
223
  requirements: []
224
- rubygems_version: 3.0.3
224
+ rubygems_version: 3.1.6
225
225
  signing_key:
226
226
  specification_version: 4
227
227
  summary: 'LutaML: data models in textual form'