metanorma-m3aawg 1.5.5 → 1.6.3
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 +2 -4
- data/lib/asciidoctor/m3aawg/basicdoc.rng +50 -3
- data/lib/asciidoctor/m3aawg/converter.rb +4 -49
- data/lib/asciidoctor/m3aawg/isodoc.rng +36 -43
- data/lib/isodoc/m3aawg/base_convert.rb +2 -12
- data/lib/isodoc/m3aawg/html/htmlstyle.css +7 -3
- data/lib/isodoc/m3aawg/html/htmlstyle.scss +2 -2
- data/lib/isodoc/m3aawg/html/m3d.css +41 -41
- data/lib/isodoc/m3aawg/html/m3d.scss +41 -41
- data/lib/isodoc/m3aawg/html/wordstyle.css +31 -31
- data/lib/isodoc/m3aawg/html/wordstyle.scss +31 -31
- data/lib/isodoc/m3aawg/html_convert.rb +7 -31
- data/lib/isodoc/m3aawg/i18n.rb +3 -4
- data/lib/isodoc/m3aawg/init.rb +2 -5
- data/lib/isodoc/m3aawg/m3d.report.xsl +371 -111
- data/lib/isodoc/m3aawg/metadata.rb +5 -17
- data/lib/isodoc/m3aawg/presentation_xml_convert.rb +11 -6
- data/lib/isodoc/m3aawg/word_convert.rb +4 -35
- data/lib/isodoc/m3aawg/xref.rb +5 -0
- data/lib/metanorma/m3aawg.rb +28 -2
- data/lib/metanorma/m3aawg/processor.rb +16 -9
- data/lib/metanorma/m3aawg/version.rb +1 -1
- data/metanorma-m3d.gemspec +1 -2
- data/metanorma.yml +51 -0
- metadata +7 -23
- data/.github/workflows/macos.yml +0 -38
- data/.github/workflows/ubuntu.yml +0 -56
- data/.github/workflows/windows.yml +0 -40
- data/lib/asciidoctor/m3aawg/validate.rb +0 -22
@@ -2,9 +2,11 @@ require "isodoc"
|
|
2
2
|
|
3
3
|
module IsoDoc
|
4
4
|
module M3AAWG
|
5
|
-
|
6
|
-
|
7
|
-
|
5
|
+
class Metadata < IsoDoc::Generic::Metadata
|
6
|
+
def configuration
|
7
|
+
Metanorma::M3AAWG.configuration
|
8
|
+
end
|
9
|
+
|
8
10
|
def initialize(lang, script, labels)
|
9
11
|
super
|
10
12
|
here = File.dirname(__FILE__)
|
@@ -34,20 +36,6 @@ module IsoDoc
|
|
34
36
|
docnumber = isoxml.at(ns("//bibdata/docidentifier"))
|
35
37
|
set(:docnumber, docnumber&.text)
|
36
38
|
end
|
37
|
-
|
38
|
-
def stage_abbr(status)
|
39
|
-
case status
|
40
|
-
when "working-draft" then "wd"
|
41
|
-
when "committee-draft" then "cd"
|
42
|
-
when "draft-standard" then "d"
|
43
|
-
else
|
44
|
-
""
|
45
|
-
end
|
46
|
-
end
|
47
|
-
|
48
|
-
def unpublished(status)
|
49
|
-
!%w(published withdrawn).include? status.downcase
|
50
|
-
end
|
51
39
|
end
|
52
40
|
end
|
53
41
|
end
|
@@ -1,16 +1,21 @@
|
|
1
1
|
require_relative "init"
|
2
|
+
require "metanorma-generic"
|
2
3
|
require "isodoc"
|
3
4
|
|
4
5
|
module IsoDoc
|
5
6
|
module M3AAWG
|
6
|
-
class PresentationXMLConvert < IsoDoc::PresentationXMLConvert
|
7
|
+
class PresentationXMLConvert < IsoDoc::Generic::PresentationXMLConvert
|
8
|
+
def configuration
|
9
|
+
Metanorma::M3AAWG.configuration
|
10
|
+
end
|
11
|
+
|
7
12
|
def annex1(f)
|
8
|
-
|
9
|
-
|
10
|
-
|
13
|
+
lbl = @xrefs.anchor(f['id'], :label)
|
14
|
+
if t = f.at(ns("./title"))
|
15
|
+
t.children = "<strong>#{t.children.to_xml}</strong>"
|
16
|
+
end
|
17
|
+
prefix_name(f, "<br/>", lbl, "title")
|
11
18
|
end
|
12
|
-
prefix_name(f, "<br/>", lbl, "title")
|
13
|
-
end
|
14
19
|
|
15
20
|
include Init
|
16
21
|
end
|
@@ -1,39 +1,13 @@
|
|
1
1
|
require "isodoc"
|
2
2
|
require_relative "base_convert"
|
3
|
+
require "isodoc/generic/word_convert"
|
3
4
|
require_relative "init"
|
4
5
|
|
5
6
|
module IsoDoc
|
6
7
|
module M3AAWG
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
class WordConvert < IsoDoc::WordConvert
|
11
|
-
def initialize(options)
|
12
|
-
@libdir = File.dirname(__FILE__)
|
13
|
-
super
|
14
|
-
end
|
15
|
-
|
16
|
-
def default_fonts(options)
|
17
|
-
{
|
18
|
-
bodyfont: (options[:script] == "Hans" ? '"SimSun",serif' : '"Garamond",serif'),
|
19
|
-
headerfont: (options[:script] == "Hans" ? '"SimHei",sans-serif' : '"Garamond",serif'),
|
20
|
-
monospacefont: '"Courier New",monospace'
|
21
|
-
}
|
22
|
-
end
|
23
|
-
|
24
|
-
def default_file_locations(_options)
|
25
|
-
{
|
26
|
-
htmlstylesheet: html_doc_path("htmlstyle.scss"),
|
27
|
-
htmlcoverpage: html_doc_path("html_m3d_titlepage.html"),
|
28
|
-
htmlintropage: html_doc_path("html_m3d_intro.html"),
|
29
|
-
scripts: html_doc_path("scripts.html"),
|
30
|
-
wordstylesheet: html_doc_path("wordstyle.scss"),
|
31
|
-
standardstylesheet: html_doc_path("m3d.scss"),
|
32
|
-
header: html_doc_path("header.html"),
|
33
|
-
wordintropage: html_doc_path("word_m3d_intro.html"),
|
34
|
-
ulstyle: "l3",
|
35
|
-
olstyle: "l2",
|
36
|
-
}
|
8
|
+
class WordConvert < IsoDoc::Generic::WordConvert
|
9
|
+
def configuration
|
10
|
+
Metanorma::M3AAWG.configuration
|
37
11
|
end
|
38
12
|
|
39
13
|
def colophon(body, docxml)
|
@@ -51,11 +25,6 @@ module IsoDoc
|
|
51
25
|
end
|
52
26
|
end
|
53
27
|
|
54
|
-
def title(isoxml, _out)
|
55
|
-
main = isoxml&.at(ns("//title[@language='en']"))&.text
|
56
|
-
set_metadata(:doctitle, main)
|
57
|
-
end
|
58
|
-
|
59
28
|
include BaseRender
|
60
29
|
include Init
|
61
30
|
end
|
data/lib/isodoc/m3aawg/xref.rb
CHANGED
data/lib/metanorma/m3aawg.rb
CHANGED
@@ -1,7 +1,33 @@
|
|
1
|
-
|
1
|
+
require "metanorma"
|
2
|
+
require "metanorma-generic"
|
3
|
+
require "metanorma/m3aawg/processor"
|
2
4
|
|
3
5
|
module Metanorma
|
4
|
-
module
|
6
|
+
module M3AAWG
|
5
7
|
|
8
|
+
class Configuration < Metanorma::Generic::Configuration
|
9
|
+
def initialize(*args)
|
10
|
+
super
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
class << self
|
15
|
+
extend Forwardable
|
16
|
+
|
17
|
+
attr_accessor :configuration
|
18
|
+
|
19
|
+
Configuration::CONFIG_ATTRS.each do |attr_name|
|
20
|
+
def_delegator :@configuration, attr_name
|
21
|
+
end
|
22
|
+
|
23
|
+
def configure
|
24
|
+
self.configuration ||= Configuration.new
|
25
|
+
yield(configuration)
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
configure {}
|
6
30
|
end
|
7
31
|
end
|
32
|
+
Metanorma::Registry.instance.register(Metanorma::M3AAWG::Processor)
|
33
|
+
|
@@ -2,15 +2,10 @@ require "metanorma/processor"
|
|
2
2
|
|
3
3
|
module Metanorma
|
4
4
|
module M3AAWG
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
pdf: ["Garamond", "Courier New"]
|
10
|
-
}
|
11
|
-
end
|
12
|
-
|
13
|
-
class Processor < Metanorma::Processor
|
5
|
+
class Processor < Metanorma::Generic::Processor
|
6
|
+
def configuration
|
7
|
+
Metanorma::Ribose.configuration
|
8
|
+
end
|
14
9
|
|
15
10
|
def initialize
|
16
11
|
@short = [:m3d, :m3aawg]
|
@@ -26,6 +21,18 @@ module Metanorma
|
|
26
21
|
)
|
27
22
|
end
|
28
23
|
|
24
|
+
def fonts_manifest
|
25
|
+
{
|
26
|
+
"Arial" => nil,
|
27
|
+
"Cambria Math" => nil,
|
28
|
+
"Courier" => nil,
|
29
|
+
"Courier New" => nil,
|
30
|
+
"Garamond" => nil,
|
31
|
+
"Overpass" => nil,
|
32
|
+
"Space Mono" => nil,
|
33
|
+
}
|
34
|
+
end
|
35
|
+
|
29
36
|
def version
|
30
37
|
"Metanorma::M3AAWG #{Metanorma::M3AAWG::VERSION}"
|
31
38
|
end
|
data/metanorma-m3d.gemspec
CHANGED
@@ -31,8 +31,7 @@ Gem::Specification.new do |spec|
|
|
31
31
|
spec.add_dependency "htmlentities", "~> 4.3.4"
|
32
32
|
spec.add_dependency "thread_safe"
|
33
33
|
|
34
|
-
spec.add_dependency "metanorma-
|
35
|
-
spec.add_dependency "isodoc", "~> 1.2.0"
|
34
|
+
spec.add_dependency "metanorma-generic", "~> 1.8.1"
|
36
35
|
|
37
36
|
spec.add_development_dependency "byebug", "~> 9.1"
|
38
37
|
spec.add_development_dependency "sassc", "~> 2.4.0"
|
data/metanorma.yml
ADDED
@@ -0,0 +1,51 @@
|
|
1
|
+
metanorma_name: m3aawg
|
2
|
+
organization_name_short: M3AAWG
|
3
|
+
organization_name_long: Messaging Malware and Mobile Anti-Abuse Working Group
|
4
|
+
document_namespace: https://www.metanorma.org/ns/m3d
|
5
|
+
xml_root_tag: m3d-standard
|
6
|
+
html_bodyfont: '"Overpass",sans-serif'
|
7
|
+
html_headerfont: '"Overpass",sans-serif'
|
8
|
+
html_monospacefont: '"Space Mono",monospace'
|
9
|
+
html_normalfontsize: "15px"
|
10
|
+
html_footnotefontsize: "0.9em"
|
11
|
+
i18nyaml: lib/isodoc/m3aawg/i18n-en.yaml
|
12
|
+
validate_rng_file: lib/asciidoctor/m3aawg/m3d.rng
|
13
|
+
htmlcoverpage: lib/isodoc/m3aawg/html/html_m3d_titlepage.html
|
14
|
+
htmlintropage: lib/isodoc/m3aawg/html/html_m3d_intro.html
|
15
|
+
htmlstylesheet: lib/isodoc/m3aawg/html/htmlstyle.scss
|
16
|
+
scripts: lib/isodoc/m3aawg/html/scripts.html
|
17
|
+
word_bodyfont: '"Garamond",serif'
|
18
|
+
word_headerfont: '"Garamond",serif'
|
19
|
+
word_monospacefont: '"Courier New",monospace'
|
20
|
+
word_normalfontsize: "11.0pt"
|
21
|
+
word_monospacefontsize: "9.0pt"
|
22
|
+
word_smallerfontsize: "10.0pt"
|
23
|
+
word_footnotefontsize: "10.0pt"
|
24
|
+
standardstylesheet: lib/isodoc/m3aawg/html/m3d.scss
|
25
|
+
header: lib/isodoc/m3aawg/html/header.html
|
26
|
+
wordcoverpage: ""
|
27
|
+
wordintropage: lib/isodoc/m3aawg/html/word_m3d_intro.html
|
28
|
+
wordstylesheet: lib/isodoc/m3aawg/html/wordstyle.scss
|
29
|
+
webfont:
|
30
|
+
- "https://fonts.googleapis.com/css?family=Overpass:300,300i,600,900"
|
31
|
+
- "https://fonts.googleapis.com/css?family=Open+Sans:300,300i,400,400i,600,600i|Space+Mono:400,700"
|
32
|
+
docid_template: "{{ docnumeric }}{% if stageabbr %}({{ stageabbr }}){%endif%}{% if docyear %}:{{docyear}}{%endif%}"
|
33
|
+
doctypes:
|
34
|
+
- policy
|
35
|
+
- best-practices
|
36
|
+
- supporting-document
|
37
|
+
- report
|
38
|
+
default_doctype: report
|
39
|
+
published_stages:
|
40
|
+
- published
|
41
|
+
- withdrawn
|
42
|
+
default_stage: published
|
43
|
+
stage_abbreviations:
|
44
|
+
proposal:
|
45
|
+
working-draft: wd
|
46
|
+
committee-draft: cd
|
47
|
+
draft-standard: d
|
48
|
+
final-draft:
|
49
|
+
published:
|
50
|
+
withdrawn:
|
51
|
+
logo_path: ""
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metanorma-m3aawg
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.6.3
|
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-12-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: htmlentities
|
@@ -39,33 +39,19 @@ dependencies:
|
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
|
-
name: metanorma-
|
42
|
+
name: metanorma-generic
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 1.
|
47
|
+
version: 1.8.1
|
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.
|
55
|
-
- !ruby/object:Gem::Dependency
|
56
|
-
name: isodoc
|
57
|
-
requirement: !ruby/object:Gem::Requirement
|
58
|
-
requirements:
|
59
|
-
- - "~>"
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
version: 1.2.0
|
62
|
-
type: :runtime
|
63
|
-
prerelease: false
|
64
|
-
version_requirements: !ruby/object:Gem::Requirement
|
65
|
-
requirements:
|
66
|
-
- - "~>"
|
67
|
-
- !ruby/object:Gem::Version
|
68
|
-
version: 1.2.0
|
54
|
+
version: 1.8.1
|
69
55
|
- !ruby/object:Gem::Dependency
|
70
56
|
name: byebug
|
71
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -218,9 +204,7 @@ executables: []
|
|
218
204
|
extensions: []
|
219
205
|
extra_rdoc_files: []
|
220
206
|
files:
|
221
|
-
- ".github/workflows/
|
222
|
-
- ".github/workflows/ubuntu.yml"
|
223
|
-
- ".github/workflows/windows.yml"
|
207
|
+
- ".github/workflows/rake.yml"
|
224
208
|
- ".gitignore"
|
225
209
|
- ".hound.yml"
|
226
210
|
- ".rubocop.yml"
|
@@ -240,7 +224,6 @@ files:
|
|
240
224
|
- lib/asciidoctor/m3aawg/isodoc.rng
|
241
225
|
- lib/asciidoctor/m3aawg/m3d.rng
|
242
226
|
- lib/asciidoctor/m3aawg/reqt.rng
|
243
|
-
- lib/asciidoctor/m3aawg/validate.rb
|
244
227
|
- lib/isodoc/m3aawg/base_convert.rb
|
245
228
|
- lib/isodoc/m3aawg/html/dots-w@2x.png
|
246
229
|
- lib/isodoc/m3aawg/html/dots@2x.png
|
@@ -273,6 +256,7 @@ files:
|
|
273
256
|
- lib/metanorma/m3aawg/processor.rb
|
274
257
|
- lib/metanorma/m3aawg/version.rb
|
275
258
|
- metanorma-m3d.gemspec
|
259
|
+
- metanorma.yml
|
276
260
|
homepage: https://github.com/metanorma/metanorma-m3aawg
|
277
261
|
licenses:
|
278
262
|
- BSD-2-Clause
|
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
|