metanorma-plugin-lutaml 0.3.0 → 0.3.1

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: b289ab4f617cefd59b1fe794d256b1e903fdbbf419b2fba937fed2ef686969bc
4
- data.tar.gz: f1a0678e22c0e703b031de634a48851d76ec474403a39cf626c9df31e36d8f4f
3
+ metadata.gz: 9fb3bd82b6d23d6684bd1ca4793eb9d423dbe8132bf9e303bf5be17369fbd9e3
4
+ data.tar.gz: 9112fcf75f2cf32ac4f18e4e6dc0b7ef5385b247ca7293fafb9dd0d9185a4c0c
5
5
  SHA512:
6
- metadata.gz: 20c54f6adb3963c4db9be07adc77c0518f2d3140588a99fe68f177cdc2c927fc4996c3db0bf3a6bcd5ced2147d53ac877c3909ff025b6baa5498e1e491f8f761
7
- data.tar.gz: 4479579349a783361f97c4066fb78d3abb538fcfbc1d6250e9daf9aecc465fa0e93d1240ee1de6b01f9a8750ad89d6e20e77cdfb26aebcf002d95416937eb86b
6
+ metadata.gz: e71b2f2667ad1f77bedcdd7459ff3b4ef19889a625cd14573741e855f6b97a1910f2a35198190f397f0158a23f9a49f24daaadb2ecc86bc59e948245c5e515f9
7
+ data.tar.gz: 253186ae00898321c291cdca4f5c5f118fff2072845977540cefaeb1b55a7bc326cba50649a1481e8b90e8565ce76df129d280ccbdf045c5336b5a9a921c9254
@@ -82,11 +82,17 @@ module Metanorma
82
82
  end
83
83
  end
84
84
  if !file_paths.empty?
85
- from_files = content_from_files(document, file_paths).to_liquid
86
- from_files['schemas'] = from_files['schemas'].map do |n|
87
- n.merge('relative_path_prefix' => Utils.relative_file_path(document, File.dirname(n['file'])))
85
+ from_files = content_from_files(document, file_paths)
86
+ # TODO: decide how to handle expressir multiply file parse as one object and lutaml
87
+ if from_files.is_a?(Array)
88
+ result.push(*from_files.map(&:to_liquid))
89
+ else
90
+ from_files = from_files.to_liquid
91
+ from_files['schemas'] = from_files['schemas'].map do |n|
92
+ n.merge('relative_path_prefix' => Utils.relative_file_path(document, File.dirname(n['file'])))
93
+ end
94
+ result.push(from_files)
88
95
  end
89
- result.push(from_files)
90
96
  end
91
97
  result
92
98
  end
@@ -48,11 +48,12 @@ module Metanorma
48
48
  express_write_cache(cache_full_path, wrapper.original_document, document)
49
49
  end
50
50
  wrapper
51
+ rescue Expressir::ExpressExp::CacheLoadError
52
+ FileUtils.rm_rf(cache_full_path)
53
+ process_express_index(path, cache_path, document, true)
51
54
  rescue StandardError => e
52
55
  document.logger.warn("Failed to load #{full_path}: #{e.message}")
53
56
  nil
54
- rescue Expressir::ExpressExp::CacheLoadError
55
- process_express_index(path, cache_path, document, true)
56
57
  end
57
58
 
58
59
  def express_from_cache(path)
@@ -1,7 +1,7 @@
1
1
  module Metanorma
2
2
  module Plugin
3
3
  module Lutaml
4
- VERSION = "0.3.0".freeze
4
+ VERSION = "0.3.1".freeze
5
5
  end
6
6
  end
7
7
  end
@@ -24,8 +24,7 @@ Gem::Specification.new do |spec|
24
24
  spec.require_paths = ["lib"]
25
25
 
26
26
  spec.add_dependency "liquid"
27
- spec.add_dependency "lutaml", "~> 0.5.0"
28
- spec.add_dependency "lutaml-uml", "~> 0.2.0"
27
+ spec.add_dependency "lutaml"
29
28
  spec.add_dependency "metanorma"
30
29
  spec.add_dependency "relaton-cli"
31
30
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-plugin-lutaml
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
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-16 00:00:00.000000000 Z
11
+ date: 2021-03-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: liquid
@@ -28,30 +28,16 @@ dependencies:
28
28
  name: lutaml
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
32
- - !ruby/object:Gem::Version
33
- version: 0.5.0
34
- type: :runtime
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - "~>"
39
- - !ruby/object:Gem::Version
40
- version: 0.5.0
41
- - !ruby/object:Gem::Dependency
42
- name: lutaml-uml
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - "~>"
31
+ - - ">="
46
32
  - !ruby/object:Gem::Version
47
- version: 0.2.0
33
+ version: '0'
48
34
  type: :runtime
49
35
  prerelease: false
50
36
  version_requirements: !ruby/object:Gem::Requirement
51
37
  requirements:
52
- - - "~>"
38
+ - - ">="
53
39
  - !ruby/object:Gem::Version
54
- version: 0.2.0
40
+ version: '0'
55
41
  - !ruby/object:Gem::Dependency
56
42
  name: metanorma
57
43
  requirement: !ruby/object:Gem::Requirement