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 +4 -4
- data/lib/utils/hash_transform_keys.rb +1 -2
- data/lib/utils/log.rb +5 -4
- data/lib/utils/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c4941f1b2ce404a56da0e5c3ae8d1a3e9867cf938a6cb5e0cab243a9ebbe8b14
|
4
|
+
data.tar.gz: 1ba1f75ac3da74bb847795aed139e9e1c011f107b8d0e44c59248cd4cdfe37ff
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a1168eb36b3d478709bd0e542ded060e8721b4f89f70013fe115145b184eaa638f9fcccb3278d5feb7155db809b23d478cb20a1d4894d89c80bf774ab6fccd20
|
7
|
+
data.tar.gz: 4a1d3b8a28f075b78e6b162af9c9c391d71d2372852481d48499597e6851c9f1eb829a1b011b2a0e56a94f0b6c173869714cbae7867b79891e498158dbc47497
|
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
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.
|
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
|
+
date: 2024-07-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: asciidoctor
|