metanorma-itu 1.2.2 → 1.2.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/rake.yml +63 -0
- data/README.adoc +3 -4
- data/lib/asciidoctor/itu/basicdoc.rng +23 -0
- data/lib/asciidoctor/itu/cleanup.rb +1 -1
- data/lib/asciidoctor/itu/converter.rb +3 -2
- data/lib/asciidoctor/itu/front.rb +36 -12
- data/lib/asciidoctor/itu/isodoc.rng +135 -58
- data/lib/asciidoctor/itu/itu.rng +67 -0
- data/lib/isodoc/itu/base_convert.rb +1 -6
- data/lib/isodoc/itu/html/_coverpage.css +8 -1
- data/lib/isodoc/itu/html/_coverpage.scss +4 -0
- data/lib/isodoc/itu/html/header.html +8 -8
- data/lib/isodoc/itu/html/html_itu_titlepage.html +23 -0
- data/lib/isodoc/itu/html/htmlstyle.css +13 -2
- data/lib/isodoc/itu/html/itu.css +16 -4
- data/lib/isodoc/itu/html/itu.scss +19 -5
- data/lib/isodoc/itu/html/word_itu_intro.html +16 -0
- data/lib/isodoc/itu/html/word_itu_titlepage.html +136 -3
- data/lib/isodoc/itu/html_convert.rb +3 -1
- data/lib/isodoc/itu/i18n-en.yaml +2 -0
- data/lib/isodoc/itu/itu.recommendation-annex.xsl +996 -232
- data/lib/isodoc/itu/itu.recommendation.xsl +996 -232
- data/lib/isodoc/itu/itu.resolution.xsl +996 -232
- data/lib/isodoc/itu/metadata.rb +62 -3
- data/lib/isodoc/itu/presentation_xml_convert.rb +16 -0
- data/lib/isodoc/itu/terms.rb +7 -30
- data/lib/isodoc/itu/word_cleanup.rb +152 -0
- data/lib/isodoc/itu/word_convert.rb +1 -125
- data/lib/isodoc/itu/xref.rb +4 -3
- data/lib/metanorma/itu/version.rb +1 -1
- data/metanorma-itu.gemspec +3 -1
- metadata +34 -7
- data/.github/workflows/macos.yml +0 -38
- data/.github/workflows/ubuntu.yml +0 -56
- data/.github/workflows/windows.yml +0 -40
data/lib/isodoc/itu/xref.rb
CHANGED
@@ -20,7 +20,7 @@ module IsoDoc
|
|
20
20
|
@labels["appendix"] : @labels["annex"]
|
21
21
|
@anchors[clause["id"]] =
|
22
22
|
{ label: annex_name_lbl(clause, num), type: "clause",
|
23
|
-
xref: "#{lbl} #{num}", level: 1 }
|
23
|
+
xref: l10n("#{lbl} #{num}"), level: 1, value: num }
|
24
24
|
if a = single_annex_special_section(clause)
|
25
25
|
annex_names1(a, "#{num}", 1)
|
26
26
|
else
|
@@ -51,7 +51,7 @@ module IsoDoc
|
|
51
51
|
|
52
52
|
def annex_names1(clause, num, level)
|
53
53
|
@anchors[clause["id"]] =
|
54
|
-
{ label: num, xref: "#{@labels["annex_subclause"]} #{num}",
|
54
|
+
{ label: num, xref: l10n("#{@labels["annex_subclause"]} #{num}"),
|
55
55
|
level: level, type: "clause" }
|
56
56
|
clause.xpath(ns("./clause | ./references | ./terms | ./definitions"))
|
57
57
|
.each_with_index do |c, i|
|
@@ -101,7 +101,7 @@ module IsoDoc
|
|
101
101
|
j = 0
|
102
102
|
c.increment(t)
|
103
103
|
end
|
104
|
-
label = c.print + (j.zero? ? "" : "
|
104
|
+
label = c.print + (j.zero? ? "" : "#{hierfigsep}#{(96 + j).chr.to_s}")
|
105
105
|
next if t["id"].nil? || t["id"].empty?
|
106
106
|
@anchors[t["id"]] =
|
107
107
|
anchor_struct(label, nil, @labels["figure"], "figure", t["unnumbered"])
|
@@ -164,6 +164,7 @@ module IsoDoc
|
|
164
164
|
idx = notes.size == 1 ? "" : " #{c.increment(n).print}"
|
165
165
|
@anchors[n["id"]] =
|
166
166
|
{ label: termnote_label(idx).strip, type: "termnote",
|
167
|
+
value: idx,
|
167
168
|
xref: l10n("#{anchor(t['id'], :xref)}, "\
|
168
169
|
"#{@labels["note_xref"]} #{c.print}") }
|
169
170
|
|
data/metanorma-itu.gemspec
CHANGED
@@ -26,8 +26,10 @@ Gem::Specification.new do |spec|
|
|
26
26
|
|
27
27
|
spec.add_dependency "htmlentities", "~> 4.3.4"
|
28
28
|
spec.add_dependency "ruby-jing"
|
29
|
-
spec.add_dependency "metanorma-standoc", "~> 1.
|
29
|
+
spec.add_dependency "metanorma-standoc", "~> 1.6.0"
|
30
30
|
spec.add_dependency "isodoc", "~> 1.2.0"
|
31
|
+
spec.add_dependency "twitter_cldr"
|
32
|
+
spec.add_dependency "tzinfo-data" # we need this for windows only
|
31
33
|
|
32
34
|
spec.add_development_dependency "byebug", "~> 9.1"
|
33
35
|
spec.add_development_dependency "sassc", "2.4.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.
|
4
|
+
version: 1.2.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-11-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: htmlentities
|
@@ -44,14 +44,14 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 1.
|
47
|
+
version: 1.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: 1.
|
54
|
+
version: 1.6.0
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: isodoc
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -66,6 +66,34 @@ dependencies:
|
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: 1.2.0
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: twitter_cldr
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :runtime
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: tzinfo-data
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :runtime
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
69
97
|
- !ruby/object:Gem::Dependency
|
70
98
|
name: byebug
|
71
99
|
requirement: !ruby/object:Gem::Requirement
|
@@ -243,9 +271,7 @@ executables: []
|
|
243
271
|
extensions: []
|
244
272
|
extra_rdoc_files: []
|
245
273
|
files:
|
246
|
-
- ".github/workflows/
|
247
|
-
- ".github/workflows/ubuntu.yml"
|
248
|
-
- ".github/workflows/windows.yml"
|
274
|
+
- ".github/workflows/rake.yml"
|
249
275
|
- ".gitignore"
|
250
276
|
- ".hound.yml"
|
251
277
|
- ".rubocop.yml"
|
@@ -301,6 +327,7 @@ files:
|
|
301
327
|
- lib/isodoc/itu/presentation_xml_convert.rb
|
302
328
|
- lib/isodoc/itu/ref.rb
|
303
329
|
- lib/isodoc/itu/terms.rb
|
330
|
+
- lib/isodoc/itu/word_cleanup.rb
|
304
331
|
- lib/isodoc/itu/word_convert.rb
|
305
332
|
- lib/isodoc/itu/xref.rb
|
306
333
|
- lib/metanorma-itu.rb
|
data/.github/workflows/macos.yml
DELETED
@@ -1,38 +0,0 @@
|
|
1
|
-
# Auto-generated by Cimas: Do not edit it manually!
|
2
|
-
# See https://github.com/metanorma/cimas
|
3
|
-
name: macos
|
4
|
-
|
5
|
-
on:
|
6
|
-
push:
|
7
|
-
branches: [ master ]
|
8
|
-
pull_request:
|
9
|
-
paths-ignore:
|
10
|
-
- .github/workflows/ubuntu.yml
|
11
|
-
- .github/workflows/windows.yml
|
12
|
-
|
13
|
-
jobs:
|
14
|
-
test-macos:
|
15
|
-
name: Test on Ruby ${{ matrix.ruby }} macOS
|
16
|
-
runs-on: macos-latest
|
17
|
-
continue-on-error: ${{ matrix.experimental }}
|
18
|
-
strategy:
|
19
|
-
fail-fast: false
|
20
|
-
matrix:
|
21
|
-
ruby: [ '2.6', '2.5', '2.4' ]
|
22
|
-
experimental: [false]
|
23
|
-
include:
|
24
|
-
- ruby: '2.7'
|
25
|
-
experimental: true
|
26
|
-
steps:
|
27
|
-
- uses: actions/checkout@master
|
28
|
-
- name: Use Ruby
|
29
|
-
uses: actions/setup-ruby@v1
|
30
|
-
with:
|
31
|
-
ruby-version: ${{ matrix.ruby }}
|
32
|
-
- name: Update gems
|
33
|
-
run: |
|
34
|
-
sudo gem install bundler --force
|
35
|
-
bundle install --jobs 4 --retry 3
|
36
|
-
- name: Run specs
|
37
|
-
run: |
|
38
|
-
bundle exec rake
|
@@ -1,56 +0,0 @@
|
|
1
|
-
# Auto-generated by Cimas: Do not edit it manually!
|
2
|
-
# See https://github.com/metanorma/cimas
|
3
|
-
name: ubuntu
|
4
|
-
|
5
|
-
on:
|
6
|
-
push:
|
7
|
-
branches: [ master ]
|
8
|
-
tags:
|
9
|
-
- '*'
|
10
|
-
pull_request:
|
11
|
-
paths-ignore:
|
12
|
-
- .github/workflows/macos.yml
|
13
|
-
- .github/workflows/windows.yml
|
14
|
-
|
15
|
-
jobs:
|
16
|
-
test-linux:
|
17
|
-
name: Test on Ruby ${{ matrix.ruby }} Ubuntu
|
18
|
-
runs-on: ubuntu-latest
|
19
|
-
continue-on-error: ${{ matrix.experimental }}
|
20
|
-
strategy:
|
21
|
-
fail-fast: false
|
22
|
-
matrix:
|
23
|
-
ruby: [ '2.6', '2.5', '2.4' ]
|
24
|
-
experimental: [false]
|
25
|
-
include:
|
26
|
-
- ruby: '2.7'
|
27
|
-
experimental: true
|
28
|
-
steps:
|
29
|
-
- uses: actions/checkout@master
|
30
|
-
- name: Use Ruby
|
31
|
-
uses: actions/setup-ruby@v1
|
32
|
-
with:
|
33
|
-
ruby-version: ${{ matrix.ruby }}
|
34
|
-
- name: Update gems
|
35
|
-
run: |
|
36
|
-
gem install bundler
|
37
|
-
bundle install --jobs 4 --retry 3
|
38
|
-
- name: Run specs
|
39
|
-
run: |
|
40
|
-
bundle exec rake
|
41
|
-
- name: Trigger repositories
|
42
|
-
if: matrix.ruby == '2.6'
|
43
|
-
env:
|
44
|
-
GH_USERNAME: metanorma-ci
|
45
|
-
GH_ACCESS_TOKEN: ${{ secrets.METANORMA_CI_PAT_TOKEN }}
|
46
|
-
run: |
|
47
|
-
curl -LO --retry 3 https://raw.githubusercontent.com/metanorma/metanorma-build-scripts/master/trigger-gh-actions.sh
|
48
|
-
[[ -f ".github/workflows/dependent_repos.env" ]] && source .github/workflows/dependent_repos.env
|
49
|
-
CLIENT_PAYLOAD=$(cat <<EOF
|
50
|
-
"{ "ref": "${GITHUB_REF}", "repo": "${GITHUB_REPOSITORY}" }"
|
51
|
-
EOF
|
52
|
-
)
|
53
|
-
for repo in $REPOS
|
54
|
-
do
|
55
|
-
sh trigger-gh-actions.sh $ORGANISATION $repo $GH_USERNAME $GH_ACCESS_TOKEN $GITHUB_REPOSITORY "$CLIENT_PAYLOAD"
|
56
|
-
done
|
@@ -1,40 +0,0 @@
|
|
1
|
-
# Auto-generated by Cimas: Do not edit it manually!
|
2
|
-
# See https://github.com/metanorma/cimas
|
3
|
-
name: windows
|
4
|
-
|
5
|
-
on:
|
6
|
-
push:
|
7
|
-
branches: [ master ]
|
8
|
-
pull_request:
|
9
|
-
paths-ignore:
|
10
|
-
- .github/workflows/macos.yml
|
11
|
-
- .github/workflows/ubuntu.yml
|
12
|
-
|
13
|
-
jobs:
|
14
|
-
test-windows:
|
15
|
-
name: Test on Ruby ${{ matrix.ruby }} Windows
|
16
|
-
runs-on: windows-latest
|
17
|
-
continue-on-error: ${{ matrix.experimental }}
|
18
|
-
strategy:
|
19
|
-
fail-fast: false
|
20
|
-
matrix:
|
21
|
-
ruby: [ '2.6', '2.5', '2.4' ]
|
22
|
-
experimental: [false]
|
23
|
-
include:
|
24
|
-
- ruby: '2.7'
|
25
|
-
experimental: true
|
26
|
-
steps:
|
27
|
-
- uses: actions/checkout@master
|
28
|
-
- name: Use Ruby
|
29
|
-
uses: actions/setup-ruby@v1
|
30
|
-
with:
|
31
|
-
ruby-version: ${{ matrix.ruby }}
|
32
|
-
- name: Update gems
|
33
|
-
shell: pwsh
|
34
|
-
run: |
|
35
|
-
gem install bundler
|
36
|
-
bundle config --local path vendor/bundle
|
37
|
-
bundle install --jobs 4 --retry 3
|
38
|
-
- name: Run specs
|
39
|
-
run: |
|
40
|
-
bundle exec rake
|