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 +4 -4
- 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: 4137257679b627f458d91b4931f6de9d7956af0cb50661f17c6c7a035cb98fc8
|
4
|
+
data.tar.gz: 631a4d0c9554f357c0cb815fb0f13b0353d08451d81fb05cb26c3c99cc6f76ff
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
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.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
|
+
date: 2024-07-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: asciidoctor
|