lutaml 0.6.1 → 0.7.4

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: 2798d99ace6b24bd0796035c70b8a9399a9677ec062b9e88d0d45efc03b71560
4
- data.tar.gz: 904f3edd91cbaf215d3b86ec756cdfe7bcd8c5568decbe0cf363dbf743ccf796
3
+ metadata.gz: 042ab4eb8ec87f5b350bc20a6342756892a3cd4929dfbbe537464590c8278dba
4
+ data.tar.gz: 4cbadc50bdae9f93b5c882f060ac5532e491271ee455660d0dab9df0b1eaf87c
5
5
  SHA512:
6
- metadata.gz: d5ea070108ac8730d34b073fc9b44bd5696cfef511f3b61da1bd258aca4796e3647f11b1c8489ad1f5c6d89f64ebc55927ad392cd8ff33a0c095d5d404c6da23
7
- data.tar.gz: 619bf829a3c1b3939b84c083d9bfcaa43acec693d070a9ddbdc2370ea01f7427de1df8df1da23672676eae9670699aba6c6b891032f3df012b4049e83c0341ff
6
+ metadata.gz: ad3d25038abb6ff22b79f1eb27eaa1439920b4d6bc582ed055049d8ad9de41eb9a8280f169e772b005ef5a4cc6978e5e3fa916a7b48ee6ef2a97509464c0747a
7
+ data.tar.gz: 444254ebb4926068d2651f4e76c75c38c955efa514234fbfab9943e7973e473b9d4cb411f15348cfd9eb632d8a3abade0e95bfebd8ff8cb45d23ab6a3f1e7f26
@@ -70,6 +70,10 @@ module Lutaml
70
70
 
71
71
  def run(original_args)
72
72
  args = original_args.dup
73
+ if args.length.zero? || args.first.strip == "help"
74
+ print_help
75
+ exit
76
+ end
73
77
  @option_parser.parse!(args) rescue nil
74
78
  @paths = args
75
79
  @formatter.type = @type
@@ -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"] =
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.1".freeze
2
+ VERSION = "0.7.4".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.1
4
+ version: 0.7.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: 2021-03-30 00:00:00.000000000 Z
11
+ date: 2021-07-06 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: