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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1ab1010b198fb64456b71a06834ab3c1207417c16c765f6c5905cd18ff5a0dc8
4
- data.tar.gz: c92bdd8228ce983eed939cb2b38b60b7ec631d37b64ea390e26e870700f7065b
3
+ metadata.gz: 66e717f4c41d2cda0aa92bc42985e6f12d420e9bcdb2b0410fe085bca689a549
4
+ data.tar.gz: 33d5e0b9f67c9c76afcbd0feff13a81e21919c3cb48dc56524bfa34203725ae1
5
5
  SHA512:
6
- metadata.gz: de58d8b4fa0e039e153cd5a9d9637adaedf45e674cb59c113e2feb4eaa1444ca7d98badd5ac080687ec66ee19305e8b8677ea855c24b1df91ddae0c12464180a
7
- data.tar.gz: 48d297855239fec0dd80dbb6db404bf4b8c2a79ba49051d275f56f3dff579bda479f30ba71ba1931170088c7e3c0014878b92af7d91177151f625cdf359e7ef9
6
+ metadata.gz: a5249f0f6147e52c1ef81b7c32a3a431a74478a7727e8bde1842e411f20d1e56311fb41755828f93dc626e94ea14b5d661a5e4fbd6a17c41619131fe1a4d60eb
7
+ data.tar.gz: a97203b198a7e9baa2e28f5597f53c9cd60ab79cc0de989f5e3dcc7671d5199e9047abdf0eb0b02401d05d48317dbae45781475642275b4c15fa8a6aaf0f446d
@@ -21,8 +21,7 @@ module IsoDoc
21
21
  end
22
22
 
23
23
  def amd?(docxml)
24
- doctype = docxml.at(ns("//bibdata/ext/doctype"))&.text
25
- %w(amendment technical-corrigendum).include? doctype
24
+ %w(amendment technical-corrigendum).include? @doctype
26
25
  end
27
26
 
28
27
  def clausedelim
@@ -14,7 +14,7 @@ module IsoDoc
14
14
  end
15
15
 
16
16
  def pdf_stylesheet(docxml)
17
- case doctype = docxml&.at(ns("//bibdata/ext/doctype"))&.text
17
+ case @doctype
18
18
  when "amendment", "technical-corrigendum" then "iso.amendment.xsl"
19
19
  else
20
20
  "iso.international-standard.xsl"
@@ -158,8 +158,7 @@ module IsoDoc
158
158
  end
159
159
 
160
160
  def toc_title(docxml)
161
- doctype = docxml.at(ns("//bibdata/ext/doctype"))&.text
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
- return if name.nil?
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
- return if name.nil?
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 "./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"
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(xmldoc)
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
- doctype = doc&.at("//bibdata/ext/doctype")&.text
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
- doctype = doc.at("//bibdata/ext/doctype")&.text
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
- root.at("//bibdata/ext/doctype")&.text == "technical-report" or return
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
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module ISO
3
- VERSION = "2.5.1".freeze
3
+ VERSION = "2.5.2".freeze
4
4
  end
5
5
  end
@@ -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.5.1"
35
+ spec.add_dependency "metanorma-standoc", "~> 2.6.0"
36
36
  spec.add_dependency "mnconvert", "~> 1.14"
37
- spec.add_dependency "pubid-iso", "~> 0.5.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.1
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-08-28 00:00:00.000000000 Z
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.5.1
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.5.1
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.5.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.5.0
54
+ version: 0.6.0
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: ruby-jing
57
57
  requirement: !ruby/object:Gem::Requirement