metanorma-ieee 1.1.1 → 1.1.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: 1a6256a1c2f7a1bc9b09f325c6f0405efb2697524e23511ceafbae690a3eb98b
4
- data.tar.gz: 5af212c12b8c7cdba8f222ee84f542196d92afd541df56fa4c368cc3f05710fd
3
+ metadata.gz: 01b7f9a217c2c60471f9e8673c9adfc5bc08f87fa08b316b5900cf7cbb9bced0
4
+ data.tar.gz: d1c3cb997bf64126a96e933cfac339c4e937590f805621380adb5aaf9b669d16
5
5
  SHA512:
6
- metadata.gz: e85a872ea89629b68849d43ecd9236b7470964893e4d2f7658436b0f61fb84eb9d9f186a3ca19bc4a5b6ee94b272bfeaada0fb48cbc27f12c2303be8827669c9
7
- data.tar.gz: 2d8911d33ddb39b3ac6f748d78cb6712e98dc945e7175b6b0bf218b1fa667739c1be7c3beba7cafed9e870fc05f2c500ade54a7a7a383d1cc1b60e70f166473c
6
+ metadata.gz: 1a940872271a0bbfbb1ebdb11e8f243359ec423e0bfb01bf8be0fe6f4563bafbad9bdf45f37bdffdba5338e363432c2ca837252014fd4c3bb1695af3bbfa0c3f
7
+ data.tar.gz: 13d688bed41ce16c4e148027cfb4b638871573e14c5a43f6ead7a488a530477e7a39f32fa04240eaf6fada1b2ab33bb2bede460def967463f82ed3b1a9ccb1cd
@@ -13,8 +13,7 @@ module IsoDoc
13
13
  end
14
14
 
15
15
  def convert1(docxml, filename, dir)
16
- doctype = docxml.at(ns("//bibdata/ext/doctype"))
17
- if %w(amendment corrigendum).include?(doctype&.text)
16
+ if %w(amendment corrigendum).include?(@doctype)
18
17
  @header = html_doc_path("header_amd.html")
19
18
  end
20
19
  super
@@ -28,12 +28,11 @@ module Metanorma
28
28
  end
29
29
 
30
30
  def doctype_validate(xmldoc)
31
- doctype = xmldoc&.at("//bibdata/ext/doctype")&.text
32
31
  %w(standard recommended-practice guide whitepaper redline other)
33
- .include? doctype or
32
+ .include?(@doctype) or
34
33
  @log.add("Document Attributes", nil,
35
- "#{doctype} is not a recognised document type")
36
- docsubtype = xmldoc&.at("//bibdata/ext/subdoctype")&.text or return
34
+ "#{@doctype} is not a recognised document type")
35
+ docsubtype = xmldoc.at("//bibdata/ext/subdoctype")&.text or return
37
36
  %w(amendment corrigendum erratum document).include? docsubtype or
38
37
  @log.add("Document Attributes", nil,
39
38
  "#{docsubtype} is not a recognised document subtype")
@@ -2,8 +2,7 @@ module Metanorma
2
2
  module IEEE
3
3
  class Converter < Standoc::Converter
4
4
  def section_validate(doc)
5
- doctype = doc&.at("//bibdata/ext/doctype")&.text
6
- unless %w(amendment technical-corrigendum).include? doctype
5
+ unless %w(amendment technical-corrigendum).include? @doctype
7
6
  sections_presence_validate(doc.root)
8
7
  sections_sequence_validate(doc.root)
9
8
  end
@@ -117,11 +117,10 @@ module Metanorma
117
117
  def title_validate_type(xml)
118
118
  title = xml.at("//bibdata/title") or return
119
119
  draft = xml.at("//bibdata//draft")
120
- type = xml.at("//bibdata/ext/doctype")
121
120
  trial = xml.at("//bibdata/ext/trial-use[text() = 'true']")
122
121
  target = draft ? "Draft " : ""
123
122
  target += trial ? "Trial-Use " : ""
124
- target += type ? "#{strict_capitalize_phrase(type.text)} " : ""
123
+ target += @doctype ? "#{strict_capitalize_phrase(@doctype)} " : ""
125
124
  /^#{target}/.match?(title.text) or
126
125
  @log.add("Style", title,
127
126
  "Expected title to start as: #{target}")
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module IEEE
3
- VERSION = "1.1.1".freeze
3
+ VERSION = "1.1.2".freeze
4
4
  end
5
5
  end
@@ -25,7 +25,7 @@ Gem::Specification.new do |spec|
25
25
  spec.require_paths = ["lib"]
26
26
  spec.required_ruby_version = Gem::Requirement.new(">= 2.7.0")
27
27
 
28
- spec.add_dependency "metanorma-standoc", "~> 2.5.4"
28
+ spec.add_dependency "metanorma-standoc", "~> 2.6.0"
29
29
  spec.add_dependency "mnconvert", "~> 1.20"
30
30
  #spec.add_dependency "pubid-ieee", "~> 0.1.1"
31
31
  #spec.add_dependency "pubid-iso", "~> 0.5.3"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-ieee
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
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.4
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.4
26
+ version: 2.6.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: mnconvert
29
29
  requirement: !ruby/object:Gem::Requirement