metanorma-ogc 1.2.3 → 1.2.8
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 +62 -0
- data/README.adoc +3 -4
- data/lib/asciidoctor/ogc/basicdoc.rng +4 -11
- data/lib/asciidoctor/ogc/boilerplate.xml +2 -2
- data/lib/asciidoctor/ogc/converter.rb +25 -1
- data/lib/asciidoctor/ogc/isodoc.rng +27 -50
- data/lib/asciidoctor/ogc/ogc.rng +8 -1
- data/lib/asciidoctor/ogc/validate.rb +1 -1
- data/lib/isodoc/ogc/base_convert.rb +0 -1
- data/lib/isodoc/ogc/biblio.rb +1 -0
- data/lib/isodoc/ogc/html/_coverpage.css +6 -0
- data/lib/isodoc/ogc/html/_coverpage.scss +8 -0
- data/lib/isodoc/ogc/html/html_ogc_titlepage.html +3 -3
- data/lib/isodoc/ogc/html/htmlstyle.css +211 -201
- data/lib/isodoc/ogc/html/htmlstyle.scss +4 -4
- data/lib/isodoc/ogc/html/ogc.css +21 -21
- data/lib/isodoc/ogc/html/ogc.scss +21 -21
- data/lib/isodoc/ogc/html/ogc_wp.css +35 -35
- data/lib/isodoc/ogc/html/ogc_wp.scss +35 -35
- data/lib/isodoc/ogc/html/word_ogc_titlepage.html +1 -1
- data/lib/isodoc/ogc/html/wordstyle.css +19 -19
- data/lib/isodoc/ogc/html/wordstyle.scss +19 -19
- data/lib/isodoc/ogc/html/wordstyle_wp.css +23 -23
- data/lib/isodoc/ogc/html/wordstyle_wp.scss +23 -23
- data/lib/isodoc/ogc/html_convert.rb +5 -1
- data/lib/isodoc/ogc/i18n-en.yaml +10 -0
- data/lib/isodoc/ogc/init.rb +1 -1
- data/lib/isodoc/ogc/metadata.rb +1 -1
- data/lib/isodoc/ogc/ogc.abstract-specification-topic.xsl +671 -138
- data/lib/isodoc/ogc/ogc.best-practice.xsl +671 -138
- data/lib/isodoc/ogc/ogc.change-request-supporting-document.xsl +671 -138
- data/lib/isodoc/ogc/ogc.community-practice.xsl +671 -138
- data/lib/isodoc/ogc/ogc.community-standard.xsl +671 -138
- data/lib/isodoc/ogc/ogc.discussion-paper.xsl +671 -138
- data/lib/isodoc/ogc/ogc.engineering-report.xsl +671 -138
- data/lib/isodoc/ogc/ogc.other.xsl +671 -138
- data/lib/isodoc/ogc/ogc.policy.xsl +671 -138
- data/lib/isodoc/ogc/ogc.reference-model.xsl +671 -138
- data/lib/isodoc/ogc/ogc.release-notes.xsl +671 -138
- data/lib/isodoc/ogc/ogc.standard.xsl +671 -138
- data/lib/isodoc/ogc/ogc.test-suite.xsl +671 -138
- data/lib/isodoc/ogc/ogc.user-guide.xsl +671 -138
- data/lib/isodoc/ogc/ogc.white-paper.xsl +584 -89
- data/lib/isodoc/ogc/presentation_xml_convert.rb +25 -0
- data/lib/isodoc/ogc/sections.rb +6 -1
- data/lib/isodoc/ogc/word_convert.rb +8 -1
- data/lib/isodoc/ogc/xref.rb +30 -5
- data/lib/metanorma/ogc.rb +7 -0
- data/lib/metanorma/ogc/fonts_manifest.yaml +6 -0
- data/lib/metanorma/ogc/processor.rb +0 -8
- data/lib/metanorma/ogc/version.rb +1 -1
- data/metanorma-ogc.gemspec +2 -2
- metadata +8 -9
- data/.github/workflows/macos.yml +0 -38
- data/.github/workflows/ubuntu.yml +0 -56
- data/.github/workflows/windows.yml +0 -40
@@ -15,6 +15,7 @@ module IsoDoc
|
|
15
15
|
def insert_preface_sections(docxml)
|
16
16
|
insert_keywords(docxml)
|
17
17
|
insert_submitting_orgs(docxml)
|
18
|
+
insert_security(docxml)
|
18
19
|
end
|
19
20
|
|
20
21
|
def preface_init_insert_pt(docxml)
|
@@ -30,6 +31,17 @@ module IsoDoc
|
|
30
31
|
docxml.at(ns("//preface/abstract"))
|
31
32
|
end
|
32
33
|
|
34
|
+
def insert_security(docxml)
|
35
|
+
s = docxml&.at(ns("//preface/clause[@type = 'security']"))&.remove or
|
36
|
+
return
|
37
|
+
if a = submit_orgs_append_pt(docxml)
|
38
|
+
a.next = s
|
39
|
+
else
|
40
|
+
preface_init_insert_pt(docxml)&.children&.first&.
|
41
|
+
add_previous_sibling(s)
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
33
45
|
def insert_submitting_orgs(docxml)
|
34
46
|
orgs = []
|
35
47
|
docxml.xpath(ns(submittingorgs_path)).each { |org| orgs << org.text }
|
@@ -136,6 +148,19 @@ module IsoDoc
|
|
136
148
|
recommendation_to_table(docxml)
|
137
149
|
end
|
138
150
|
|
151
|
+
def section(docxml)
|
152
|
+
super
|
153
|
+
references(docxml)
|
154
|
+
end
|
155
|
+
|
156
|
+
def references(docxml)
|
157
|
+
docxml.xpath(ns("//bibitem/date")).each do |d|
|
158
|
+
d.xpath(ns("./on | ./from | ./to")).each do |d1|
|
159
|
+
d1.children = d1.text.sub(/^(\d\d\d\d).*$/, "\\1")
|
160
|
+
end
|
161
|
+
end
|
162
|
+
end
|
163
|
+
|
139
164
|
include Init
|
140
165
|
end
|
141
166
|
end
|
data/lib/isodoc/ogc/sections.rb
CHANGED
@@ -18,6 +18,11 @@ module IsoDoc
|
|
18
18
|
intro_clause(f, out)
|
19
19
|
end
|
20
20
|
|
21
|
+
def security(docxml, out)
|
22
|
+
f = docxml.at(ns("//preface/clause[@type = 'security']")) || return
|
23
|
+
intro_clause(f, out)
|
24
|
+
end
|
25
|
+
|
21
26
|
def submitters(docxml, out)
|
22
27
|
f = docxml.at(ns("//submitters")) || return
|
23
28
|
intro_clause(f, out)
|
@@ -25,7 +30,7 @@ module IsoDoc
|
|
25
30
|
|
26
31
|
def preface(isoxml, out)
|
27
32
|
isoxml.xpath(ns("//preface/clause[not(@type = 'keywords' or "\
|
28
|
-
"@type = 'submitting_orgs')]")).each do |f|
|
33
|
+
"@type = 'submitting_orgs' or @type = 'security')]")).each do |f|
|
29
34
|
intro_clause(f, out)
|
30
35
|
end
|
31
36
|
end
|
@@ -21,7 +21,11 @@ module IsoDoc
|
|
21
21
|
'"Times New Roman",serif'),
|
22
22
|
headerfont: (options[:script] == "Hans" ? '"SimHei",sans-serif' :
|
23
23
|
'"Times New Roman",serif'),
|
24
|
-
monospacefont: '"Courier New",monospace'
|
24
|
+
monospacefont: '"Courier New",monospace',
|
25
|
+
normalfontsize: "10.5pt",
|
26
|
+
monospacefontsize: "10.0pt",
|
27
|
+
footnotefontsize: "10.0pt",
|
28
|
+
smallerfontsize: "10.0pt",
|
25
29
|
}
|
26
30
|
end
|
27
31
|
|
@@ -47,6 +51,8 @@ module IsoDoc
|
|
47
51
|
@doctype = "white-paper"
|
48
52
|
options[:bodyfont] = '"Arial",sans-serif'
|
49
53
|
options[:headerfont] = '"Lato",sans-serif'
|
54
|
+
options[:normalfontsize] = "11.0pt"
|
55
|
+
options[:footnotefontsize] = "11.0pt"
|
50
56
|
end
|
51
57
|
super
|
52
58
|
end
|
@@ -144,6 +150,7 @@ module IsoDoc
|
|
144
150
|
keywords docxml, div2
|
145
151
|
foreword docxml, div2
|
146
152
|
introduction docxml, div2
|
153
|
+
security docxml, div2
|
147
154
|
submittingorgs docxml, div2
|
148
155
|
submitters docxml, div2
|
149
156
|
preface docxml, div2
|
data/lib/isodoc/ogc/xref.rb
CHANGED
@@ -107,11 +107,12 @@ module IsoDoc
|
|
107
107
|
preface_names_numbered(d.at(ns("//preface/clause[@type = 'keywords']")))
|
108
108
|
preface_names_numbered(d.at(ns("//foreword")))
|
109
109
|
preface_names_numbered(d.at(ns("//introduction")))
|
110
|
+
preface_names_numbered(d.at(ns("//preface/clause[@type = 'security']")))
|
110
111
|
preface_names_numbered(d.at(ns("//preface/clause"\
|
111
112
|
"[@type = 'submitting_orgs']")))
|
112
113
|
preface_names_numbered(d.at(ns("//submitters")))
|
113
114
|
d.xpath(ns("//preface/clause[not(@type = 'keywords' or "\
|
114
|
-
"@type = 'submitting_orgs')]")).each do |c|
|
115
|
+
"@type = 'submitting_orgs' or @type = 'security')]")).each do |c|
|
115
116
|
preface_names_numbered(c)
|
116
117
|
end
|
117
118
|
preface_names_numbered(d.at(ns("//acknowledgements")))
|
@@ -143,13 +144,37 @@ module IsoDoc
|
|
143
144
|
def preface_names_numbered(clause)
|
144
145
|
return if clause.nil?
|
145
146
|
@prefacenum += 1
|
146
|
-
pref =
|
147
|
+
pref = preface_number(@prefacenum, 1)
|
147
148
|
@anchors[clause["id"]] =
|
148
149
|
{ label: pref,
|
149
150
|
level: 1, xref: preface_clause_name(clause), type: "clause" }
|
150
|
-
clause.xpath(ns(
|
151
|
-
|
152
|
-
|
151
|
+
clause.xpath(ns(SUBCLAUSES)).each_with_index do |c, i|
|
152
|
+
preface_names_numbered1(c, "#{pref}.#{preface_number(i + 1, 2)}", 2)
|
153
|
+
end
|
154
|
+
end
|
155
|
+
|
156
|
+
def preface_names_numbered1(clause, num, level)
|
157
|
+
@anchors[clause["id"]] =
|
158
|
+
{ label: num, level: level, xref: l10n("#{@labels["clause"]} #{num}"),
|
159
|
+
type: "clause" }
|
160
|
+
clause.xpath(ns(SUBCLAUSES)).each_with_index do |c, i|
|
161
|
+
lbl = "#{num}.#{preface_number(i + 1, level + 1)}"
|
162
|
+
preface_names_numbered1(c, lbl, level + 1)
|
163
|
+
end
|
164
|
+
end
|
165
|
+
|
166
|
+
def preface_number(num, level)
|
167
|
+
case level
|
168
|
+
when 1 then RomanNumerals.to_roman(num).upcase
|
169
|
+
when 2 then (64 + num).chr.to_s
|
170
|
+
when 3 then num.to_s
|
171
|
+
when 4 then (96 + num).chr.to_s
|
172
|
+
when 5 then RomanNumerals.to_roman(num).downcase
|
173
|
+
when 6 then "(#{num.to_s})"
|
174
|
+
when 7 then "(#{(96 + num).chr.to_s})"
|
175
|
+
when 8 then "(#{RomanNumerals.to_roman(num).downcase})"
|
176
|
+
else
|
177
|
+
num.to_s
|
153
178
|
end
|
154
179
|
end
|
155
180
|
|
data/lib/metanorma/ogc.rb
CHANGED
@@ -3,6 +3,13 @@ require "metanorma/ogc/processor"
|
|
3
3
|
|
4
4
|
module Metanorma
|
5
5
|
module Ogc
|
6
|
+
def self.fonts_used
|
7
|
+
{
|
8
|
+
html: ["Overpass", "SpaceMono"],
|
9
|
+
doc: ["Times New Roman", "Cambria Math", "HanSans", "Courier New"],
|
10
|
+
pdf: ["Lato", "Arial"],
|
11
|
+
}
|
12
|
+
end
|
6
13
|
|
7
14
|
ORGANIZATION_NAME_SHORT = "OGC"
|
8
15
|
ORGANIZATION_NAME_LONG = "Open Geospatial Consortium"
|
@@ -2,14 +2,6 @@ require "metanorma/processor"
|
|
2
2
|
|
3
3
|
module Metanorma
|
4
4
|
module Ogc
|
5
|
-
def self.fonts_used
|
6
|
-
{
|
7
|
-
doc: ["Arial", "Courier New", "Times New Roman"],
|
8
|
-
pdf: ["Arial", "Courier New", "Times New Roman"],
|
9
|
-
html: ["Overpass", "Space Mono"]
|
10
|
-
}
|
11
|
-
end
|
12
|
-
|
13
5
|
class Processor < Metanorma::Processor
|
14
6
|
|
15
7
|
def initialize
|
data/metanorma-ogc.gemspec
CHANGED
@@ -24,8 +24,8 @@ Gem::Specification.new do |spec|
|
|
24
24
|
spec.require_paths = ["lib"]
|
25
25
|
spec.required_ruby_version = Gem::Requirement.new(">= 2.4.0")
|
26
26
|
|
27
|
-
spec.add_dependency "metanorma-standoc", "~> 1.
|
28
|
-
spec.add_dependency "isodoc", "~> 1.
|
27
|
+
spec.add_dependency "metanorma-standoc", "~> 1.6.0"
|
28
|
+
spec.add_dependency "isodoc", "~> 1.3.0"
|
29
29
|
spec.add_dependency "iso-639"
|
30
30
|
|
31
31
|
spec.add_development_dependency "byebug", "~> 9.1"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metanorma-ogc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.8
|
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-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: metanorma-standoc
|
@@ -16,28 +16,28 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 1.
|
19
|
+
version: 1.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: 1.
|
26
|
+
version: 1.6.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: isodoc
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 1.
|
33
|
+
version: 1.3.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: 1.
|
40
|
+
version: 1.3.0
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: iso-639
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -201,9 +201,7 @@ executables: []
|
|
201
201
|
extensions: []
|
202
202
|
extra_rdoc_files: []
|
203
203
|
files:
|
204
|
-
- ".github/workflows/
|
205
|
-
- ".github/workflows/ubuntu.yml"
|
206
|
-
- ".github/workflows/windows.yml"
|
204
|
+
- ".github/workflows/rake.yml"
|
207
205
|
- ".gitignore"
|
208
206
|
- ".hound.yml"
|
209
207
|
- ".rubocop.yml"
|
@@ -279,6 +277,7 @@ files:
|
|
279
277
|
- lib/isodoc/ogc/xref.rb
|
280
278
|
- lib/metanorma-ogc.rb
|
281
279
|
- lib/metanorma/ogc.rb
|
280
|
+
- lib/metanorma/ogc/fonts_manifest.yaml
|
282
281
|
- lib/metanorma/ogc/processor.rb
|
283
282
|
- lib/metanorma/ogc/version.rb
|
284
283
|
- metanorma-ogc.gemspec
|
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
|