metanorma-ietf 2.0.6 → 2.0.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/macos.yml +10 -3
- data/.github/workflows/ubuntu.yml +10 -4
- data/.github/workflows/windows.yml +12 -8
- data/README.adoc +3 -2
- data/lib/asciidoctor/ietf/biblio.rng +2 -12
- data/lib/asciidoctor/ietf/converter.rb +1 -1
- data/lib/asciidoctor/ietf/isodoc.rng +1 -3
- data/lib/isodoc/ietf/rfc_convert.rb +5 -0
- data/lib/metanorma/ietf/processor.rb +23 -7
- data/lib/metanorma/ietf/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bb5f196390262aef0aec189526c2caf497e529e5ffbbbcc22a205ba43a85d85c
|
4
|
+
data.tar.gz: 37ec8453f4ef211f479e7553bd9cb6481f5f50f872793bb571f184654b299051
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 39f727292be5e328f32369cdfd9212037beab415e017f95f66b3dbbd3ae5a060f5594fb49341d317dd6463fca4f33df65535358da0ee12fbaf7e297c50ef1eb2
|
7
|
+
data.tar.gz: 587c593828181e860d7041d88f43bd6c7a48f09c2f7a70049f464a661480fb4f91c103706b1bb2fe5db882c23db66bf9ae2757ae441e0c449dcada0893e4d874
|
data/.github/workflows/macos.yml
CHANGED
@@ -1,12 +1,11 @@
|
|
1
|
-
# Auto-generated
|
2
|
-
#
|
1
|
+
# Auto-generated by Cimas: Do not edit it manually!
|
2
|
+
# See https://github.com/metanorma/cimas
|
3
3
|
name: macos
|
4
4
|
|
5
5
|
on:
|
6
6
|
push:
|
7
7
|
branches: [ master ]
|
8
8
|
pull_request:
|
9
|
-
branches: [ '**' ]
|
10
9
|
|
11
10
|
jobs:
|
12
11
|
test-macos:
|
@@ -18,6 +17,13 @@ jobs:
|
|
18
17
|
ruby: [ '2.6', '2.5', '2.4' ]
|
19
18
|
steps:
|
20
19
|
- uses: actions/checkout@master
|
20
|
+
- name: Cache xml2rfc
|
21
|
+
id: cache-xml2rfc
|
22
|
+
uses: actions/cache@v1
|
23
|
+
with:
|
24
|
+
path: ~/.cache/xml2rfc
|
25
|
+
key: xml2rfc
|
26
|
+
restore-key: xml2rfc
|
21
27
|
- name: Use Ruby
|
22
28
|
uses: actions/setup-ruby@v1
|
23
29
|
with:
|
@@ -38,3 +44,4 @@ jobs:
|
|
38
44
|
- name: Run specs
|
39
45
|
run: |
|
40
46
|
bundle exec rake
|
47
|
+
|
@@ -1,12 +1,11 @@
|
|
1
|
-
# Auto-generated
|
2
|
-
#
|
1
|
+
# Auto-generated by Cimas: Do not edit it manually!
|
2
|
+
# See https://github.com/metanorma/cimas
|
3
3
|
name: ubuntu
|
4
4
|
|
5
5
|
on:
|
6
6
|
push:
|
7
7
|
branches: [ master ]
|
8
8
|
pull_request:
|
9
|
-
branches: [ '**' ]
|
10
9
|
|
11
10
|
jobs:
|
12
11
|
test-linux:
|
@@ -18,6 +17,13 @@ jobs:
|
|
18
17
|
ruby: [ '2.6', '2.5', '2.4' ]
|
19
18
|
steps:
|
20
19
|
- uses: actions/checkout@master
|
20
|
+
- name: Cache xml2rfc
|
21
|
+
id: cache-xml2rfc
|
22
|
+
uses: actions/cache@v1
|
23
|
+
with:
|
24
|
+
path: ~/.cache/xml2rfc
|
25
|
+
key: xml2rfc
|
26
|
+
restore-key: xml2rfc
|
21
27
|
- name: Use Ruby
|
22
28
|
uses: actions/setup-ruby@v1
|
23
29
|
with:
|
@@ -25,7 +31,7 @@ jobs:
|
|
25
31
|
architecture: 'x64'
|
26
32
|
- name: Update gems
|
27
33
|
run: |
|
28
|
-
gem install bundler
|
34
|
+
gem install bundler
|
29
35
|
bundle install --jobs 4 --retry 3
|
30
36
|
- name: Use Python
|
31
37
|
uses: actions/setup-python@v1
|
@@ -1,12 +1,11 @@
|
|
1
|
-
# Auto-generated
|
2
|
-
#
|
1
|
+
# Auto-generated by Cimas: Do not edit it manually!
|
2
|
+
# See https://github.com/metanorma/cimas
|
3
3
|
name: windows
|
4
4
|
|
5
5
|
on:
|
6
6
|
push:
|
7
7
|
branches: [ master ]
|
8
8
|
pull_request:
|
9
|
-
branches: [ '**' ]
|
10
9
|
|
11
10
|
jobs:
|
12
11
|
test-windows:
|
@@ -18,6 +17,13 @@ jobs:
|
|
18
17
|
ruby: [ '2.6', '2.5', '2.4' ]
|
19
18
|
steps:
|
20
19
|
- uses: actions/checkout@master
|
20
|
+
- name: Cache xml2rfc
|
21
|
+
id: cache-xml2rfc
|
22
|
+
uses: actions/cache@v1
|
23
|
+
with:
|
24
|
+
path: ~/.cache/xml2rfc
|
25
|
+
key: xml2rfc
|
26
|
+
restore-key: xml2rfc
|
21
27
|
- name: Use Ruby
|
22
28
|
uses: actions/setup-ruby@v1
|
23
29
|
with:
|
@@ -26,18 +32,16 @@ jobs:
|
|
26
32
|
- name: Update gems
|
27
33
|
shell: pwsh
|
28
34
|
run: |
|
29
|
-
gem install bundler
|
30
|
-
bundle config --local path vendor/bundle
|
31
|
-
bundle update
|
35
|
+
gem install bundler
|
32
36
|
bundle install --jobs 4 --retry 3
|
33
37
|
- name: Use Python
|
34
38
|
uses: actions/setup-python@v1
|
35
39
|
with:
|
36
|
-
|
40
|
+
ruby-version: '2.7'
|
37
41
|
architecture: 'x64'
|
38
42
|
- name: Install xml2rfc
|
39
43
|
run: |
|
40
44
|
pip install xml2rfc
|
41
45
|
- name: Run specs
|
42
46
|
run: |
|
43
|
-
bundle exec rake
|
47
|
+
bundle exec rake
|
data/README.adoc
CHANGED
@@ -6,8 +6,9 @@
|
|
6
6
|
"`http://asciidoctor.org/[asciidoctor]-way`".
|
7
7
|
|
8
8
|
image:https://img.shields.io/gem/v/metanorma-ietf.svg["Gem Version", link="https://rubygems.org/gems/metanorma-ietf"]
|
9
|
-
image:https://
|
10
|
-
image:https://
|
9
|
+
image:https://github.com/metanorma/metanorma-ietf/workflows/macos/badge.svg["Build Status (macOS)", link="https://github.com/metanorma/metanorma-ietf/actions?workflow=macos"]
|
10
|
+
image:https://github.com/metanorma/metanorma-ietf/workflows/ubuntu/badge.svg["Build Status (ubuntu)", link="https://github.com/metanorma/metanorma-ietf/actions?workflow=ubuntu"]
|
11
|
+
image:https://github.com/metanorma/metanorma-ietf/workflows/windows/badge.svg["Build Status (Windows)", link="https://github.com/metanorma/metanorma-ietf/actions?workflow=windows"]
|
11
12
|
image:https://codeclimate.com/github/metanorma/metanorma-ietf/badges/gpa.svg["Code Climate", link="https://codeclimate.com/github/metanorma/metanorma-ietf"]
|
12
13
|
image:https://img.shields.io/github/issues-pr-raw/metanorma/metanorma-ietf.svg["Pull Requests", link="https://github.com/metanorma/metanorma-ietf/pulls"]
|
13
14
|
image:https://img.shields.io/github/commits-since/metanorma/metanorma-ietf/latest.svg["Commits since latest",link="https://github.com/metanorma/metanorma-ietf/releases"]
|
@@ -703,21 +703,11 @@
|
|
703
703
|
</define>
|
704
704
|
<define name="TypedTitleString">
|
705
705
|
<optional>
|
706
|
-
<attribute name="type"
|
707
|
-
<ref name="TitleType"/>
|
708
|
-
</attribute>
|
706
|
+
<attribute name="type"/>
|
709
707
|
</optional>
|
710
708
|
<ref name="FormattedString"/>
|
711
709
|
</define>
|
712
|
-
|
713
|
-
<choice>
|
714
|
-
<value>alternative</value>
|
715
|
-
<value>original</value>
|
716
|
-
<value>unofficial</value>
|
717
|
-
<value>subtitle</value>
|
718
|
-
<value>main</value>
|
719
|
-
</choice>
|
720
|
-
</define>
|
710
|
+
<!-- TitleType = ( "alternative" | "original" | "unofficial" | "subtitle" | "main" ) -->
|
721
711
|
<define name="TypedUri">
|
722
712
|
<optional>
|
723
713
|
<attribute name="type"/>
|
@@ -35,7 +35,7 @@ module Asciidoctor
|
|
35
35
|
File.open(filename, "w") { |f| f.write(ret) }
|
36
36
|
rfc_converter(node).convert filename unless node.attr("nodoc")
|
37
37
|
end
|
38
|
-
@log.write(@filename + ".err") unless @novalid
|
38
|
+
@log.write(@localdir + @filename + ".err") unless @novalid
|
39
39
|
@files_to_delete.each { |f| FileUtils.rm f }
|
40
40
|
ret
|
41
41
|
end
|
@@ -56,5 +56,10 @@ module IsoDoc::Ietf
|
|
56
56
|
File.open("#{filename}.rfc.xml", "w:UTF-8") { |f| f.write(result) }
|
57
57
|
@files_to_delete.each { |f| FileUtils.rm_rf f }
|
58
58
|
end
|
59
|
+
|
60
|
+
def init_file(filename, debug)
|
61
|
+
filename = filename.sub(/\.rfc\.xml$/, ".rfc")
|
62
|
+
super
|
63
|
+
end
|
59
64
|
end
|
60
65
|
end
|
@@ -47,22 +47,38 @@ module Metanorma
|
|
47
47
|
nil
|
48
48
|
end
|
49
49
|
|
50
|
+
def xml2rfc_present?
|
51
|
+
!which("xml2rfc").nil?
|
52
|
+
end
|
53
|
+
|
50
54
|
def output(isodoc_node, outname, format, options={})
|
51
55
|
case format
|
52
56
|
when :rfc
|
53
|
-
IsoDoc::Ietf::RfcConvert.new(options).convert(outname
|
57
|
+
IsoDoc::Ietf::RfcConvert.new(options).convert(outname, isodoc_node)
|
54
58
|
@done_rfc = true
|
55
59
|
|
56
|
-
when :txt
|
57
|
-
|
60
|
+
when :txt
|
61
|
+
unless xml2rfc_present?
|
62
|
+
warn "[metanorma-ietf] Error: unable to generate #{format}, the command `xml2rfc` is not found in path."
|
63
|
+
return
|
64
|
+
end
|
65
|
+
|
66
|
+
rfcname = outname.sub(/\.txt$/, ".rfc.xml")
|
58
67
|
output(isodoc_node, outname, :rfc, options) unless @done_rfc
|
59
|
-
|
68
|
+
|
69
|
+
system("xml2rfc --text #{rfcname} -o #{outname}")
|
70
|
+
|
71
|
+
when :html
|
72
|
+
unless xml2rfc_present?
|
60
73
|
warn "[metanorma-ietf] Error: unable to generate #{format}, the command `xml2rfc` is not found in path."
|
61
74
|
return
|
62
75
|
end
|
63
|
-
|
64
|
-
|
65
|
-
|
76
|
+
|
77
|
+
rfcname = outname.sub(/\.html$/, ".rfc.xml")
|
78
|
+
output(isodoc_node, outname, :rfc, options) unless @done_rfc
|
79
|
+
|
80
|
+
system("xml2rfc --html #{rfcname} -o #{outname}")
|
81
|
+
|
66
82
|
else
|
67
83
|
super
|
68
84
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metanorma-ietf
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.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-03
|
11
|
+
date: 2020-04-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: metanorma-standoc
|