metanorma-itu 2.6.8 → 2.6.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -120,7 +120,7 @@ module IsoDoc
120
120
  def docid(xml, _out)
121
121
  { docnumber: "ITU", recommendationnumber: "ITU-Recommendation",
122
122
  docnumber_lang: "ITU-lang", docnumber_td: "ITU-TemporaryDocument",
123
- docnumber_provisional: "ITU-provisional" }
123
+ docnumber_provisional: "ITU-provisional", docnumber_iso: "ISO" }
124
124
  .each do |k, v|
125
125
  dn = xml.at(ns("//bibdata/docidentifier[@type = '#{v}']")) and
126
126
  set(k, dn.text)
@@ -168,7 +168,7 @@ module IsoDoc
168
168
  set(:doctype_display, "Recommendation")
169
169
  else super
170
170
  end
171
- d = get[:doctype] and
171
+ d = get[:doctype_display] and
172
172
  set(:draft_new_doctype, @labels["draft_new"].sub("%", d))
173
173
  end
174
174
 
@@ -13,7 +13,6 @@ module IsoDoc
13
13
  "<p keep-with-next='true' class='supertitle'>" \
14
14
  "#{labelled_autonum(@i18n.get['section'].upcase, elem['id'],
15
15
  lbl)}</p>"
16
- # "<span element='fmt-element-name'>#{@i18n.get['section'].upcase}</span> #{autonum(elem['id'], lbl)}</p>"
17
16
  end
18
17
 
19
18
  def clause1_super?(elem)
@@ -43,7 +42,9 @@ module IsoDoc
43
42
  ins = elem.at(ns("./fmt-xref-label")) || elem.at(ns("./fmt-title"))
44
43
  p = (info ? @i18n.inform_annex : @i18n.norm_annex)
45
44
  .gsub("%", @i18n.doctype_dict[@meta.get[:doctype_original]] || "")
46
- ins.next = %(<p class="annex_obligation"><span class='fmt-obligation'>#{p}</span></p>)
45
+ ins.next = <<~XML
46
+ <p class="annex_obligation"><span class='fmt-obligation'>#{p}</span></p>
47
+ XML
47
48
  end
48
49
 
49
50
  def annex1_supertitle(elem)
@@ -86,16 +87,31 @@ module IsoDoc
86
87
 
87
88
  def middle_title_recommendation(isoxml, out)
88
89
  ret = ""
89
- type = @meta.get[:doctype]
90
+ id = @meta.get[:docnumber_iso] and ret += <<~XML
91
+ <p class='zzSTDTitle1'>#{@i18n.international_standard} #{id}</p>
92
+ XML
93
+ ret += middle_title_recommendation_first_line
94
+ ret += middle_title_recommendation_second_line(isoxml)
95
+ s = @meta.get[:docsubtitle] and ret += "<p class='zzSTDTitle3'>#{s}</p>"
96
+ out.previous = ret
97
+ end
98
+
99
+ def middle_title_recommendation_first_line
100
+ ret = ""
101
+ type = @meta.get[:doctype_display]
90
102
  @meta.get[:unpublished] && @meta.get[:draft_new_doctype] and
91
103
  type = @meta.get[:draft_new_doctype]
92
104
  id = @meta.get[:docnumber] and
93
- ret += "<<p class='zzSTDTitle1'>#{type} #{id}</p>"
94
- t = @meta.get[:doctitle] and
95
- ret += "<p class='zzSTDTitle2'>#{t}"
105
+ ret += "<p class='zzSTDTitle1'>#{type} #{id}</p>"
106
+ ret
107
+ end
108
+
109
+ def middle_title_recommendation_second_line(isoxml)
110
+ ret = ""
111
+ t = @meta.get[:doctitle] or return ret
112
+ ret += "<p class='zzSTDTitle2'>#{t}"
96
113
  ret += "#{title_footnotes(isoxml)}</p>"
97
- s = @meta.get[:docsubtitle] and ret += "<p class='zzSTDTitle3'>#{s}</p>"
98
- out.previous = ret
114
+ ret
99
115
  end
100
116
 
101
117
  def title_footnotes(isoxml)
@@ -12,7 +12,7 @@ All rights reserved. No part of this publication may be reproduced, by any means
12
12
 
13
13
  ITU draws attention to the possibility that the practice or implementation of this Recommendation may involve the use of a claimed Intellectual Property Right. ITU takes no position concerning the evidence, validity or applicability of claimed Intellectual Property Rights, whether asserted by ITU members or others outside of the Recommendation development process.
14
14
 
15
- As of the date of approval of this Recommendation, ITU had {% if ip_notice_received %}{% else %}not{% endif %} received notice of intellectual property, protected by patents, which may be required to implement this Recommendation. However, implementers are cautioned that this may not represent the latest information and are therefore strongly urged to consult the TSB patent database at http://www.itu.int/ITU-T/ipr/[].
15
+ As of the date of approval of this Recommendation, ITU had {% if ip_notice_received != 'false' %}{% else %}not{% endif %} received notice of intellectual property, protected by patents, which may be required to implement this Recommendation. However, implementers are cautioned that this may not represent the latest information and are therefore strongly urged to consult the TSB patent database at http://www.itu.int/ITU-T/ipr/[].
16
16
  {% endif %}
17
17
 
18
18
  == legal-statement
@@ -45,9 +45,9 @@ and it is not to be used outside of ITU.
45
45
  {% else %}
46
46
  {% if unpublished and docnumber_provisional == nil %}
47
47
  [[draft-warning]]
48
- === CAUTION! PREPUBLISHED {{ doctype | upcase }}
48
+ === CAUTION! PREPUBLISHED {{ doctype_display | upcase }}
49
49
 
50
- This prepublication is an unedited version of a recently approved {{doctype}}.
50
+ This prepublication is an unedited version of a recently approved {{doctype_display}}.
51
51
  It will be replaced by the published version after editing. Therefore,
52
52
  there will be differences between this prepublication and the published
53
53
  version.
@@ -27,11 +27,6 @@ module Metanorma
27
27
  File.join(@libdir, "boilerplate.adoc")
28
28
  end
29
29
 
30
- def makexml(node)
31
- @draft = node.attributes.has_key?("draft")
32
- super
33
- end
34
-
35
30
  def init_misc(node)
36
31
  super
37
32
  @default_doctype = "recommendation"
@@ -6,6 +6,7 @@ module Metanorma
6
6
  td_id(node, xml)
7
7
  itu_id(node, xml)
8
8
  recommendation_id(node, xml)
9
+ iso_id(node, xml)
9
10
  end
10
11
 
11
12
  def provisional_id(node, xml)
@@ -22,6 +23,11 @@ module Metanorma
22
23
  end
23
24
  end
24
25
 
26
+ def iso_id(node, xml)
27
+ a = node.attr("common-text-docnumber") and
28
+ xml.docidentifier a, type: "ISO"
29
+ end
30
+
25
31
  ITULANG = { "en" => "E", "fr" => "F", "ar" => "A", "es" => "S",
26
32
  "zh" => "C", "ru" => "R" }.freeze
27
33
 
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module Itu
3
- VERSION = "2.6.8".freeze
3
+ VERSION = "2.6.9".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(">= 3.1.0")
27
27
 
28
- spec.add_dependency "metanorma-standoc", "~> 3.0.0"
28
+ spec.add_dependency "metanorma-standoc", "~> 3.1.0"
29
29
  spec.add_dependency "pubid"
30
30
  spec.add_dependency "twitter_cldr", ">= 3.0.0"
31
31
  spec.add_dependency "tzinfo-data" # we need this for windows only
@@ -41,7 +41,6 @@ spec.add_development_dependency "rubocop-performance"
41
41
  spec.add_development_dependency "sassc-embedded", "~> 1"
42
42
  spec.add_development_dependency "simplecov", "~> 0.15"
43
43
  spec.add_development_dependency "timecop", "~> 0.9"
44
- spec.add_development_dependency "vcr", "~> 6.1.0"
45
44
  spec.add_development_dependency "webmock"
46
45
  spec.add_development_dependency "xml-c14n"
47
46
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-itu
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.6.8
4
+ version: 2.6.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2025-06-09 00:00:00.000000000 Z
11
+ date: 2025-06-23 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: 3.0.0
19
+ version: 3.1.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: 3.0.0
26
+ version: 3.1.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: pubid
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -220,20 +220,6 @@ dependencies:
220
220
  - - "~>"
221
221
  - !ruby/object:Gem::Version
222
222
  version: '0.9'
223
- - !ruby/object:Gem::Dependency
224
- name: vcr
225
- requirement: !ruby/object:Gem::Requirement
226
- requirements:
227
- - - "~>"
228
- - !ruby/object:Gem::Version
229
- version: 6.1.0
230
- type: :development
231
- prerelease: false
232
- version_requirements: !ruby/object:Gem::Requirement
233
- requirements:
234
- - - "~>"
235
- - !ruby/object:Gem::Version
236
- version: 6.1.0
237
223
  - !ruby/object:Gem::Dependency
238
224
  name: webmock
239
225
  requirement: !ruby/object:Gem::Requirement