metanorma-iso 2.5.1 → 2.5.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/isodoc/iso/init.rb +1 -2
- data/lib/isodoc/iso/pdf_convert.rb +1 -1
- data/lib/isodoc/iso/presentation_xml_convert.rb +1 -2
- data/lib/isodoc/iso/word_convert.rb +2 -4
- data/lib/metanorma/iso/validate.rb +10 -12
- data/lib/metanorma/iso/validate_section.rb +2 -3
- data/lib/metanorma/iso/version.rb +1 -1
- data/metanorma-iso.gemspec +2 -2
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 66e717f4c41d2cda0aa92bc42985e6f12d420e9bcdb2b0410fe085bca689a549
|
4
|
+
data.tar.gz: 33d5e0b9f67c9c76afcbd0feff13a81e21919c3cb48dc56524bfa34203725ae1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a5249f0f6147e52c1ef81b7c32a3a431a74478a7727e8bde1842e411f20d1e56311fb41755828f93dc626e94ea14b5d661a5e4fbd6a17c41619131fe1a4d60eb
|
7
|
+
data.tar.gz: a97203b198a7e9baa2e28f5597f53c9cd60ab79cc0de989f5e3dcc7671d5199e9047abdf0eb0b02401d05d48317dbae45781475642275b4c15fa8a6aaf0f446d
|
data/lib/isodoc/iso/init.rb
CHANGED
@@ -158,8 +158,7 @@ module IsoDoc
|
|
158
158
|
end
|
159
159
|
|
160
160
|
def toc_title(docxml)
|
161
|
-
|
162
|
-
%w(amendment technical-corrigendum).include?(doctype) and return
|
161
|
+
%w(amendment technical-corrigendum).include?(@doctype) and return
|
163
162
|
super
|
164
163
|
end
|
165
164
|
|
@@ -185,8 +185,7 @@ module IsoDoc
|
|
185
185
|
end
|
186
186
|
|
187
187
|
def figure_name_parse(node, div, name)
|
188
|
-
|
189
|
-
|
188
|
+
name.nil? and return
|
190
189
|
div.p **figure_name_attrs(node) do |p|
|
191
190
|
name.children.each { |n| parse(n, p) }
|
192
191
|
end
|
@@ -205,8 +204,7 @@ module IsoDoc
|
|
205
204
|
end
|
206
205
|
|
207
206
|
def annex_name(_annex, name, div)
|
208
|
-
|
209
|
-
|
207
|
+
name.nil? and return
|
210
208
|
name&.at(ns("./strong"))&.remove # supplied by CSS list numbering
|
211
209
|
div.h1 class: "Annex" do |t|
|
212
210
|
annex_name1(name, t)
|
@@ -1,10 +1,10 @@
|
|
1
1
|
require "metanorma-standoc"
|
2
|
-
require_relative "
|
3
|
-
require_relative "
|
4
|
-
require_relative "
|
5
|
-
require_relative "
|
6
|
-
require_relative "
|
7
|
-
require_relative "
|
2
|
+
require_relative "validate_style"
|
3
|
+
require_relative "validate_requirements"
|
4
|
+
require_relative "validate_section"
|
5
|
+
require_relative "validate_title"
|
6
|
+
require_relative "validate_image"
|
7
|
+
require_relative "validate_list"
|
8
8
|
require "nokogiri"
|
9
9
|
require "jing"
|
10
10
|
require "iev"
|
@@ -116,13 +116,12 @@ module Metanorma
|
|
116
116
|
end
|
117
117
|
end
|
118
118
|
|
119
|
-
def doctype_validate(
|
120
|
-
doctype = xmldoc&.at("//bibdata/ext/doctype")&.text
|
119
|
+
def doctype_validate(_xmldoc)
|
121
120
|
%w(international-standard technical-specification technical-report
|
122
121
|
publicly-available-specification international-workshop-agreement
|
123
|
-
guide amendment technical-corrigendum).include? doctype or
|
122
|
+
guide amendment technical-corrigendum).include? @doctype or
|
124
123
|
@log.add("Document Attributes", nil,
|
125
|
-
"#{doctype} is not a recognised document type")
|
124
|
+
"#{@doctype} is not a recognised document type")
|
126
125
|
end
|
127
126
|
|
128
127
|
def script_validate(xmldoc)
|
@@ -173,8 +172,7 @@ module Metanorma
|
|
173
172
|
|
174
173
|
def validate(doc)
|
175
174
|
content_validate(doc)
|
176
|
-
|
177
|
-
schema = case doctype
|
175
|
+
schema = case @doctype
|
178
176
|
when "amendment", "technical-corrigendum" # @amd
|
179
177
|
"isostandard-amd.rng"
|
180
178
|
else
|
@@ -4,8 +4,7 @@ module Metanorma
|
|
4
4
|
module ISO
|
5
5
|
class Converter < Standoc::Converter
|
6
6
|
def section_validate(doc)
|
7
|
-
|
8
|
-
unless %w(amendment technical-corrigendum).include? doctype
|
7
|
+
unless %w(amendment technical-corrigendum).include? @doctype
|
9
8
|
foreword_validate(doc.root)
|
10
9
|
normref_validate(doc.root)
|
11
10
|
symbols_validate(doc.root)
|
@@ -181,7 +180,7 @@ module Metanorma
|
|
181
180
|
end
|
182
181
|
|
183
182
|
def tech_report_style(root)
|
184
|
-
|
183
|
+
@doctype == "technical-report" or return
|
185
184
|
root.xpath("//sections/clause[not(@type = 'scope')] | //annex")
|
186
185
|
.each do |s|
|
187
186
|
r = requirement_check(extract_text(s)) and
|
data/metanorma-iso.gemspec
CHANGED
@@ -32,9 +32,9 @@ Gem::Specification.new do |spec|
|
|
32
32
|
spec.test_files = `git ls-files -- {spec}/*`.split("\n")
|
33
33
|
spec.required_ruby_version = Gem::Requirement.new(">= 2.7.0")
|
34
34
|
|
35
|
-
spec.add_dependency "metanorma-standoc", "~> 2.
|
35
|
+
spec.add_dependency "metanorma-standoc", "~> 2.6.0"
|
36
36
|
spec.add_dependency "mnconvert", "~> 1.14"
|
37
|
-
spec.add_dependency "pubid-iso", "~> 0.
|
37
|
+
spec.add_dependency "pubid-iso", "~> 0.6.0"
|
38
38
|
spec.add_dependency "ruby-jing"
|
39
39
|
spec.add_dependency "tokenizer", "~> 0.3.0"
|
40
40
|
spec.add_dependency "twitter_cldr"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metanorma-iso
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.5.
|
4
|
+
version: 2.5.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: 2023-
|
11
|
+
date: 2023-09-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: metanorma-standoc
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 2.
|
19
|
+
version: 2.6.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 2.
|
26
|
+
version: 2.6.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: mnconvert
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -44,14 +44,14 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 0.
|
47
|
+
version: 0.6.0
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 0.
|
54
|
+
version: 0.6.0
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: ruby-jing
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|