metanorma-itu 1.2.14 → 1.3.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (41) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/rake.yml +3 -12
  3. data/.gitignore +2 -0
  4. data/.rubocop.yml +7 -1
  5. data/lib/asciidoctor/itu/biblio.rng +4 -6
  6. data/lib/asciidoctor/itu/cleanup.rb +9 -6
  7. data/lib/asciidoctor/itu/converter.rb +31 -27
  8. data/lib/asciidoctor/itu/front.rb +35 -23
  9. data/lib/asciidoctor/itu/isodoc.rng +327 -2
  10. data/lib/asciidoctor/itu/itu.rng +0 -30
  11. data/lib/isodoc/itu/base_convert.rb +25 -37
  12. data/lib/isodoc/itu/html/_coverpage.css +7 -0
  13. data/lib/isodoc/itu/html/header.html +8 -8
  14. data/lib/isodoc/itu/html/htmlstyle.css +14 -7
  15. data/lib/isodoc/itu/html/htmlstyle.scss +0 -9
  16. data/lib/isodoc/itu/html/itu.css +0 -7
  17. data/lib/isodoc/itu/html/itu.scss +0 -7
  18. data/lib/isodoc/itu/html_convert.rb +0 -1
  19. data/lib/isodoc/itu/i18n-ar.yaml +87 -0
  20. data/lib/isodoc/itu/i18n-de.yaml +88 -0
  21. data/lib/isodoc/itu/i18n-en.yaml +1 -0
  22. data/lib/isodoc/itu/i18n-es.yaml +88 -0
  23. data/lib/isodoc/itu/i18n-fr.yaml +88 -0
  24. data/lib/isodoc/itu/i18n-ru.yaml +88 -0
  25. data/lib/isodoc/itu/i18n-zh-Hans.yaml +81 -0
  26. data/lib/isodoc/itu/i18n.rb +14 -4
  27. data/lib/isodoc/itu/itu.implementers-guide.xsl +962 -392
  28. data/lib/isodoc/itu/itu.in-force.xsl +962 -392
  29. data/lib/isodoc/itu/itu.recommendation-annex.xsl +962 -392
  30. data/lib/isodoc/itu/itu.recommendation-supplement.xsl +962 -392
  31. data/lib/isodoc/itu/itu.recommendation.xsl +962 -392
  32. data/lib/isodoc/itu/itu.resolution.xsl +962 -392
  33. data/lib/isodoc/itu/itu.technical-paper.xsl +962 -392
  34. data/lib/isodoc/itu/itu.technical-report.xsl +962 -392
  35. data/lib/isodoc/itu/metadata.rb +3 -3
  36. data/lib/isodoc/itu/presentation_xml_convert.rb +1 -1
  37. data/lib/isodoc/itu/xref.rb +1 -2
  38. data/lib/metanorma/itu/version.rb +1 -1
  39. data/metanorma-itu.gemspec +6 -6
  40. metadata +38 -33
  41. data/lib/asciidoctor/itu/macros.rb +0 -27
@@ -74,7 +74,7 @@ module IsoDoc
74
74
  def person_attributes(authors)
75
75
  %i(affiliations addresses emails faxes phones).each { |i| set(i, []) }
76
76
  authors.each do |a|
77
- append(:affiliations,
77
+ append(:affiliations,
78
78
  a&.at(ns("./affiliation/organization/name"))&.text)
79
79
  append(:addresses, a&.at(ns("./affiliation/organization/address/"\
80
80
  "formattedAddress"))&.text)
@@ -131,7 +131,7 @@ module IsoDoc
131
131
  def doctype(isoxml, _out)
132
132
  d = isoxml&.at(ns("//bibdata/ext/doctype"))&.text
133
133
  set(:doctype_original, d)
134
- set(:doctype_abbreviated, @labels["doctype_abbrev"][d])
134
+ set(:doctype_abbreviated, @labels.dig("doctype_abbrev", d))
135
135
  if d == "recommendation-annex"
136
136
  set(:doctype, "Recommendation")
137
137
  set(:doctype_display, "Recommendation")
@@ -197,7 +197,7 @@ module IsoDoc
197
197
  set(:meeting_date, resolution ? ddMMMMYYYY(o, nil) : ddMMMYYYY(o))
198
198
  elsif f = isoxml&.at(ns("//bibdata/ext/meeting-date/from"))&.text
199
199
  t = isoxml&.at(ns("//bibdata/ext/meeting-date/to"))&.text
200
- set(:meeting_date, resolution ? ddMMMMYYYY(f, t) : "#{ddMMMYYYY(f)}/#{ddMMMYYYY(t)}")
200
+ set(:meeting_date, resolution ? ddMMMMYYYY(f, t) : "#{ddMMMYYYY(f)}/#{ddMMMYYYY(t)}")
201
201
  end
202
202
  end
203
203
  end
@@ -48,7 +48,7 @@ module IsoDoc
48
48
  return unless contents.empty?
49
49
  link = anchor_linkend(node, docid_l10n(node["target"] || node["citeas"]))
50
50
  link && !/^\[.*\]$/.match(link) and link = "[#{link}]"
51
- link += eref_localities(node.xpath(ns("./locality | ./localityStack")), link)
51
+ link += eref_localities(node.xpath(ns("./locality | ./localityStack")), link, node)
52
52
  non_locality_elems(node).each { |n| n.remove }
53
53
  node.add_child(link)
54
54
  end
@@ -51,11 +51,10 @@ module IsoDoc
51
51
  i.increment(c)
52
52
  annex_names(c, i.print.upcase)
53
53
  end
54
- i = Counter.new("@")
54
+ i = Counter.new("@", skip_i: true)
55
55
  docxml.xpath(ns("//annex[not(@obligation = 'informative')]"))
56
56
  .each do |c|
57
57
  i.increment(c)
58
- i.increment(c) if i.print == "I"
59
58
  annex_names(c, i.print)
60
59
  end
61
60
  end
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module ITU
3
- VERSION = "1.2.14"
3
+ VERSION = "1.3.2".freeze
4
4
  end
5
5
  end
@@ -1,4 +1,4 @@
1
- lib = File.expand_path("../lib", __FILE__)
1
+ lib = File.expand_path("lib", __dir__)
2
2
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
3
  require "metanorma/itu/version"
4
4
 
@@ -25,20 +25,20 @@ Gem::Specification.new do |spec|
25
25
  spec.required_ruby_version = Gem::Requirement.new(">= 2.4.0")
26
26
 
27
27
  spec.add_dependency "htmlentities", "~> 4.3.4"
28
+ spec.add_dependency "isodoc", "~> 1.6.0"
29
+ spec.add_dependency "metanorma-standoc", "~> 1.9.0"
28
30
  spec.add_dependency "ruby-jing"
29
- spec.add_dependency "metanorma-standoc", "~> 1.8.0"
30
- spec.add_dependency "isodoc", "~> 1.5.0"
31
31
  spec.add_dependency "twitter_cldr"
32
32
  spec.add_dependency "tzinfo-data" # we need this for windows only
33
33
 
34
34
  spec.add_development_dependency "byebug", "~> 9.1"
35
- spec.add_development_dependency "sassc", "2.4.0"
36
35
  spec.add_development_dependency "equivalent-xml", "~> 0.6"
37
36
  spec.add_development_dependency "guard", "~> 2.14"
38
37
  spec.add_development_dependency "guard-rspec", "~> 4.7"
39
- spec.add_development_dependency "rake", "~> 12.0"
38
+ spec.add_development_dependency "rake", "~> 13.0"
40
39
  spec.add_development_dependency "rspec", "~> 3.6"
41
- spec.add_development_dependency "rubocop", "= 0.54.0"
40
+ spec.add_development_dependency "rubocop", "~> 1.5.2"
41
+ spec.add_development_dependency "sassc", "2.4.0"
42
42
  spec.add_development_dependency "simplecov", "~> 0.15"
43
43
  spec.add_development_dependency "timecop", "~> 0.9"
44
44
  spec.add_development_dependency "vcr", "~> 5.0.0"
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: 1.2.14
4
+ version: 1.3.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: 2021-02-22 00:00:00.000000000 Z
11
+ date: 2021-05-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: htmlentities
@@ -25,47 +25,47 @@ dependencies:
25
25
  - !ruby/object:Gem::Version
26
26
  version: 4.3.4
27
27
  - !ruby/object:Gem::Dependency
28
- name: ruby-jing
28
+ name: isodoc
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ">="
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '0'
33
+ version: 1.6.0
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ">="
38
+ - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '0'
40
+ version: 1.6.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: metanorma-standoc
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: 1.8.0
47
+ version: 1.9.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: 1.8.0
54
+ version: 1.9.0
55
55
  - !ruby/object:Gem::Dependency
56
- name: isodoc
56
+ name: ruby-jing
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - "~>"
59
+ - - ">="
60
60
  - !ruby/object:Gem::Version
61
- version: 1.5.0
61
+ version: '0'
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - "~>"
66
+ - - ">="
67
67
  - !ruby/object:Gem::Version
68
- version: 1.5.0
68
+ version: '0'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: twitter_cldr
71
71
  requirement: !ruby/object:Gem::Requirement
@@ -108,20 +108,6 @@ dependencies:
108
108
  - - "~>"
109
109
  - !ruby/object:Gem::Version
110
110
  version: '9.1'
111
- - !ruby/object:Gem::Dependency
112
- name: sassc
113
- requirement: !ruby/object:Gem::Requirement
114
- requirements:
115
- - - '='
116
- - !ruby/object:Gem::Version
117
- version: 2.4.0
118
- type: :development
119
- prerelease: false
120
- version_requirements: !ruby/object:Gem::Requirement
121
- requirements:
122
- - - '='
123
- - !ruby/object:Gem::Version
124
- version: 2.4.0
125
111
  - !ruby/object:Gem::Dependency
126
112
  name: equivalent-xml
127
113
  requirement: !ruby/object:Gem::Requirement
@@ -170,14 +156,14 @@ dependencies:
170
156
  requirements:
171
157
  - - "~>"
172
158
  - !ruby/object:Gem::Version
173
- version: '12.0'
159
+ version: '13.0'
174
160
  type: :development
175
161
  prerelease: false
176
162
  version_requirements: !ruby/object:Gem::Requirement
177
163
  requirements:
178
164
  - - "~>"
179
165
  - !ruby/object:Gem::Version
180
- version: '12.0'
166
+ version: '13.0'
181
167
  - !ruby/object:Gem::Dependency
182
168
  name: rspec
183
169
  requirement: !ruby/object:Gem::Requirement
@@ -194,18 +180,32 @@ dependencies:
194
180
  version: '3.6'
195
181
  - !ruby/object:Gem::Dependency
196
182
  name: rubocop
183
+ requirement: !ruby/object:Gem::Requirement
184
+ requirements:
185
+ - - "~>"
186
+ - !ruby/object:Gem::Version
187
+ version: 1.5.2
188
+ type: :development
189
+ prerelease: false
190
+ version_requirements: !ruby/object:Gem::Requirement
191
+ requirements:
192
+ - - "~>"
193
+ - !ruby/object:Gem::Version
194
+ version: 1.5.2
195
+ - !ruby/object:Gem::Dependency
196
+ name: sassc
197
197
  requirement: !ruby/object:Gem::Requirement
198
198
  requirements:
199
199
  - - '='
200
200
  - !ruby/object:Gem::Version
201
- version: 0.54.0
201
+ version: 2.4.0
202
202
  type: :development
203
203
  prerelease: false
204
204
  version_requirements: !ruby/object:Gem::Requirement
205
205
  requirements:
206
206
  - - '='
207
207
  - !ruby/object:Gem::Version
208
- version: 0.54.0
208
+ version: 2.4.0
209
209
  - !ruby/object:Gem::Dependency
210
210
  name: simplecov
211
211
  requirement: !ruby/object:Gem::Requirement
@@ -292,7 +292,6 @@ files:
292
292
  - lib/asciidoctor/itu/front.rb
293
293
  - lib/asciidoctor/itu/isodoc.rng
294
294
  - lib/asciidoctor/itu/itu.rng
295
- - lib/asciidoctor/itu/macros.rb
296
295
  - lib/asciidoctor/itu/reqt.rng
297
296
  - lib/asciidoctor/itu/validate.rb
298
297
  - lib/isodoc/itu.rb
@@ -319,7 +318,13 @@ files:
319
318
  - lib/isodoc/itu/html/wordstyle.css
320
319
  - lib/isodoc/itu/html/wordstyle.scss
321
320
  - lib/isodoc/itu/html_convert.rb
321
+ - lib/isodoc/itu/i18n-ar.yaml
322
+ - lib/isodoc/itu/i18n-de.yaml
322
323
  - lib/isodoc/itu/i18n-en.yaml
324
+ - lib/isodoc/itu/i18n-es.yaml
325
+ - lib/isodoc/itu/i18n-fr.yaml
326
+ - lib/isodoc/itu/i18n-ru.yaml
327
+ - lib/isodoc/itu/i18n-zh-Hans.yaml
323
328
  - lib/isodoc/itu/i18n.rb
324
329
  - lib/isodoc/itu/init.rb
325
330
  - lib/isodoc/itu/itu.implementers-guide.xsl
@@ -1,27 +0,0 @@
1
- module Asciidoctor
2
- module ITU
3
- class AddMacro < Asciidoctor::Extensions::InlineMacroProcessor
4
- use_dsl
5
- named :add
6
- parse_content_as :text
7
- using_format :short
8
-
9
- def process(parent, _target, attrs)
10
- out = Asciidoctor::Inline.new(parent, :quoted, attrs["text"]).convert
11
- %{<add>#{out}</add>}
12
- end
13
- end
14
-
15
- class DelMacro < Asciidoctor::Extensions::InlineMacroProcessor
16
- use_dsl
17
- named :del
18
- parse_content_as :text
19
- using_format :short
20
-
21
- def process(parent, _target, attrs)
22
- out = Asciidoctor::Inline.new(parent, :quoted, attrs["text"]).convert
23
- %{<del>#{out}</del>}
24
- end
25
- end
26
- end
27
- end