metanorma-utils 1.8.1 → 1.8.2

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: 3641e3026c18fb0b8b8c8633f25be116510f79d34fe735a3453d45bba006a877
4
- data.tar.gz: 834725d985d97af9aa1aca65213f1c9515187c978f3f5b87e06aca866d375702
3
+ metadata.gz: 4137257679b627f458d91b4931f6de9d7956af0cb50661f17c6c7a035cb98fc8
4
+ data.tar.gz: 631a4d0c9554f357c0cb815fb0f13b0353d08451d81fb05cb26c3c99cc6f76ff
5
5
  SHA512:
6
- metadata.gz: fcc0a8eda513f8a8990180a081aabe8651579f719b2ff4b13e5880d421d5374117b872df13cea1948f35c510b625cb583b06e4fabe88b1b760a032a95285d0bc
7
- data.tar.gz: e16f7a8fa041f690045de853465daf068fef217979d7d2b2ef3a78e9efadb9624546c4d805fd3eea10f542f5e40533a3e78ca04d1c70153a0edd3f2312515ddb
6
+ metadata.gz: 3d5fd0bcd6479a83094f17c748e67815cf044ba183c61c9344dfb2d54fdd49c6cda283aff42bfc25f0ad9bc8df7e87dc18c96ba67f9e2c3dc1ab1fa924b45de7
7
+ data.tar.gz: 3af52dc1dcec7a36d0c9e4abd6605f0a99af743e8cf1e67466a6cf5f9d2df03b7c01775293843c3df180098285c767b8348080df5e473ef5c8fb40f4b0057228
data/lib/utils/log.rb CHANGED
@@ -20,13 +20,13 @@ module Metanorma
20
20
  end
21
21
 
22
22
  # severity: 0: abort; 1: serious; 2: not serious; 3: info only
23
- def add(category, loc, msg, severity: 2)
23
+ def add(category, loc, msg, severity: 2, display: true)
24
24
  @novalid and return
25
25
  @log[category] ||= []
26
26
  item = create_entry(loc, msg, severity)
27
27
  @log[category] << item
28
28
  loc = loc.nil? ? "" : "(#{current_location(loc)}): "
29
- suppress_display?(category, loc, msg) or
29
+ suppress_display?(category, loc, msg, display) or
30
30
  warn "#{category}: #{loc}#{msg}"
31
31
  end
32
32
 
@@ -38,8 +38,9 @@ module Metanorma
38
38
  end
39
39
  end
40
40
 
41
- def suppress_display?(category, _loc, _msg)
42
- ["Metanorma XML Syntax"].include?(category)
41
+ def suppress_display?(category, _loc, _msg, display)
42
+ ["Metanorma XML Syntax", "Relaton"].include?(category) ||
43
+ !display
43
44
  end
44
45
 
45
46
  def create_entry(loc, msg, severity)
data/lib/utils/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module Utils
3
- VERSION = "1.8.1".freeze
3
+ VERSION = "1.8.2".freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-utils
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.1
4
+ version: 1.8.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-07-11 00:00:00.000000000 Z
11
+ date: 2024-07-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: asciidoctor