metanorma-plugin-lutaml 0.7.6 → 0.7.7

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: b6c78ebf2255bac8bb8ea1695ffc2091bebe2f903f4ef68e6d498644492035aa
4
- data.tar.gz: ca4452d9dd3834672104f776fa278eb5fbffd24924073e4eb9b0f1d6a2502ba6
3
+ metadata.gz: d59529d97e0b2a61af4daf695ab6e3490ccdb5e99f5a351e53ab8c822c063a17
4
+ data.tar.gz: 2a30e8db498027922dc4f848057880a13d4a240310b2c01122ed2176be4cbf2e
5
5
  SHA512:
6
- metadata.gz: 772ebe5a3b7a4dcce61a52b18ef91ad44d7f134ff9504a82ad44f5d60de279cce5cb778ac5826fa0267781986c079079080540d3f2fc4e60110598225a24c716
7
- data.tar.gz: 342532f2f3e37b1fb1578431a418c35c6cf44b2bbf81cc6cd1eb6d063029d0e1e279acb1b663794fffab70a7af66244b6f561a6e70a5ed59a44ceb8008f5ff42
6
+ metadata.gz: e5b8fffe0ec8df9e9ae6bddff29202f9c65a40b43a4790980799763cad78f950cab5c59f0b07ac6c7e774f4199f9aa5cf9c9ec2470d4d67622d3e491416de09e
7
+ data.tar.gz: c530eea53a62605af3df803eeddffdb5feee15e91856dff2541fe2b5831cd5e27ad5052fab01d101763eb9a890b0154aad28a934a40caf980111d2647eda5448
@@ -1,5 +1,5 @@
1
1
  require "coradoc"
2
- require "coradoc/reverse_adoc"
2
+ require "coradoc/input/html"
3
3
 
4
4
  module Metanorma
5
5
  module Plugin
@@ -7,7 +7,7 @@ module Metanorma
7
7
  module Liquid
8
8
  module CustomFilters
9
9
  def html2adoc(input)
10
- Coradoc::ReverseAdoc.convert(input)
10
+ Coradoc::Input::HTML.convert(input)
11
11
  end
12
12
 
13
13
  def interpolate(input)
@@ -21,7 +21,9 @@ module Metanorma
21
21
 
22
22
  def gml_dictionary_template(document, template_path)
23
23
  if template_path.nil?
24
- document.logger.warn("Template not found!")
24
+ ::Metanorma::Util.log(
25
+ "[lutaml_gml_dictionary] Error: Template not found!", :error
26
+ )
25
27
  end
26
28
 
27
29
  rel_tmpl_path = Utils.relative_file_path(
@@ -229,9 +229,12 @@ module Metanorma
229
229
  )
230
230
  end.flatten
231
231
  rescue StandardError => e
232
+ ::Metanorma::Util.log(
233
+ "[LutamlPreprocessor] Failed to parse LutaML block: #{e.message}",
234
+ :error,
235
+ )
236
+ # [] # Return empty array to avoid breaking the document
232
237
  raise e
233
- document.logger.warn("Failed to parse LutaML block: #{e.message}")
234
- []
235
238
  end
236
239
 
237
240
  def parse_options(options_string)
@@ -48,9 +48,11 @@ module Metanorma
48
48
 
49
49
  def notify_render_errors(document, errors)
50
50
  errors.each do |error_obj|
51
- document
52
- .logger
53
- .warn("Liquid render error: #{error_obj.message}")
51
+ ::Metanorma::Util.log(
52
+ "[metanorma-plugin-lutaml] Liquid render error: " \
53
+ "#{error_obj.message}",
54
+ :error,
55
+ )
54
56
  end
55
57
  end
56
58
 
@@ -87,7 +89,11 @@ module Metanorma
87
89
  force_read: true,
88
90
  )
89
91
  rescue StandardError => e
90
- document.logger.warn("Failed to load #{full_path}: #{e.message}")
92
+ ::Metanorma::Util.log(
93
+ "[metanorma-plugin-lutaml] Failed to load " \
94
+ "#{full_path}: #{e.message}",
95
+ :error,
96
+ )
91
97
  raise e
92
98
  # nil
93
99
  end
@@ -1,7 +1,7 @@
1
1
  module Metanorma
2
2
  module Plugin
3
3
  module Lutaml
4
- VERSION = "0.7.6".freeze
4
+ VERSION = "0.7.7".freeze
5
5
  end
6
6
  end
7
7
  end
@@ -26,7 +26,7 @@ Gem::Specification.new do |spec|
26
26
  spec.require_paths = ["lib"]
27
27
 
28
28
  spec.add_dependency "asciidoctor"
29
- spec.add_dependency "coradoc"
29
+ spec.add_dependency "coradoc", "~> 1.1.1"
30
30
  spec.add_dependency "expressir", "~> 1.4.0"
31
31
  spec.add_dependency "liquid"
32
32
  spec.add_dependency "lutaml", ">= 0.9.4"
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.7.6
4
+ version: 0.7.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-08-16 00:00:00.000000000 Z
11
+ date: 2024-09-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: asciidoctor
@@ -28,16 +28,16 @@ dependencies:
28
28
  name: coradoc
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ">="
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '0'
33
+ version: 1.1.1
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ">="
38
+ - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '0'
40
+ version: 1.1.1
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: expressir
43
43
  requirement: !ruby/object:Gem::Requirement