metanorma-utils 1.8.1 → 1.8.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: 3641e3026c18fb0b8b8c8633f25be116510f79d34fe735a3453d45bba006a877
4
- data.tar.gz: 834725d985d97af9aa1aca65213f1c9515187c978f3f5b87e06aca866d375702
3
+ metadata.gz: c4941f1b2ce404a56da0e5c3ae8d1a3e9867cf938a6cb5e0cab243a9ebbe8b14
4
+ data.tar.gz: 1ba1f75ac3da74bb847795aed139e9e1c011f107b8d0e44c59248cd4cdfe37ff
5
5
  SHA512:
6
- metadata.gz: fcc0a8eda513f8a8990180a081aabe8651579f719b2ff4b13e5880d421d5374117b872df13cea1948f35c510b625cb583b06e4fabe88b1b760a032a95285d0bc
7
- data.tar.gz: e16f7a8fa041f690045de853465daf068fef217979d7d2b2ef3a78e9efadb9624546c4d805fd3eea10f542f5e40533a3e78ca04d1c70153a0edd3f2312515ddb
6
+ metadata.gz: a1168eb36b3d478709bd0e542ded060e8721b4f89f70013fe115145b184eaa638f9fcccb3278d5feb7155db809b23d478cb20a1d4894d89c80bf774ab6fccd20
7
+ data.tar.gz: 4a1d3b8a28f075b78e6b162af9c9c391d71d2372852481d48499597e6851c9f1eb829a1b011b2a0e56a94f0b6c173869714cbae7867b79891e498158dbc47497
@@ -61,8 +61,7 @@ module Metanorma
61
61
  v1.merge(v2, &merger)
62
62
  elsif ::Array === v1 && ::Array === v2
63
63
  v1 | v2
64
- elsif [:undefined, nil,
65
- :nil].include?(v2)
64
+ elsif [:undefined].include?(v2)
66
65
  v1
67
66
  else
68
67
  v2
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.3".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.3
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-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: asciidoctor