metanorma-ietf 3.3.1 → 3.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/isodoc/ietf/references.rb +1 -1
- data/lib/metanorma/ietf/version.rb +1 -1
- data/lib/relaton/render/config.yml +1 -1
- data/lib/relaton/render/fields.rb +8 -0
- data/lib/relaton/render/parse.rb +16 -10
- data/metanorma-ietf.gemspec +1 -2
- metadata +4 -18
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 14265a284f4144c71da7f1e427b520cc6d0e34fe888cb368d0f05423fbbf7958
|
4
|
+
data.tar.gz: b4a6341006304c7bc49b73f12486dc54bf4e7bddee10a87ec16eff99832db7eb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4f980c68587bf34737ffe6c3117ed76ba6fc4a0b0db662dd75bf93d36ab19b82d0b1599f0179970da8e20d55afc72ad793d3f0c768a90610a90c40682f4508af
|
7
|
+
data.tar.gz: 88b4193027bbba65871acc89ea0bff8fbf06271fc6dc0888ce5f218fbebed3c74797a7edc8f65aa2c8b3d7ae63c40b3639dc17556b22ccbd486fa7dac969734c
|
@@ -54,7 +54,7 @@ module IsoDoc
|
|
54
54
|
def ietf_bibitem(list, bib, _ordinal)
|
55
55
|
uris = bib.xpath(ns("./uri"))
|
56
56
|
target = nil
|
57
|
-
uris&.each { |u| target = u.text if u["type"]
|
57
|
+
uris&.each { |u| target = u.text if %w(src HTML).include?(u["type"]) }
|
58
58
|
list.reference **attr_code(target: target,
|
59
59
|
anchor: bib["id"]) do |r|
|
60
60
|
bibitem_render(r, bib)
|
@@ -20,7 +20,7 @@ template:
|
|
20
20
|
# skip standardidentifier, it is inserted in front of formattedref within metanorma
|
21
21
|
# date is cleaned up into RFC XML formatting afterwards
|
22
22
|
# ref-included is cleaned up as referencegroup/reference in RFC XML afterwards
|
23
|
-
standard: "{% if stream %}<stream>{{stream}}</stream>{% endif %} <front> <title>{{ title }}</title> {{ creatornames }} <date_cleanme='true'>{{date}}</date> {% for k in keywords %}<keyword>{{k}}</keyword>{%endfor%} <abstract_cleanme='true'>{{abstract}}</abstract> </front> {% for u in uris %}<format_target='{{u.content}}'_type='{%if u.type%}{{u.type}}{%else%}HTML{%endif%}'/>{% endfor %} {{ series }} {%for d in doi %}<seriesInfo_value='{{ d | replace: ' ', ' ' | remove_first: 'DOI' | strip }}'_name='DOI'/>{% endfor %} {% if home_standard %}{% for j in authoritative_identifier %} <seriesInfo_value='{{ j | replace: ' ', ' ' | strip | split: ' ' | last | remove_first: 'I-D.'}}'_name='{%if j contains 'I-D.'%}Internet-Draft{% else %}{{ j | replace: ' ', ' ' | strip | split: ' ' | slice: -2 }}{%endif%}'/> {% endfor %} {% else %} <refcontent>{{authoritative_identifier | join: ', '}}</refcontent> {% endif %} {% for i in included %}<ref-included> {% if i.stream %}<stream>{{i.stream}}</stream>{% endif %} <front> <title>{% if i.title %}{{ i.title}}{%else%}[TITLE]{%endif%}</title> {% if i.creatornames %}{{ i.creatornames }}{%else%}<author></author>{%endif%} <date_cleanme='true'>{{i.date}}</date> {% for k in i.keywords %}<keyword>{{k}}</keyword>{%endfor%} <abstract_cleanme='true'>{{i.abstract}}</abstract> </front> {% for u in i.uris %}<format_target='{{u.content}}'_type='{%if u.type%}{{u.type}}{%else%}HTML{%endif%}'/>{% endfor %} {{ series }} {%for d in i.doi %}<seriesInfo_value='{{ d | replace: ' ', ' ' | remove_first: 'DOI' | strip }}'_name='DOI'/>{% endfor %} {% if home_standard %}{% for j in i.authoritative_identifier %} <seriesInfo_value='{{ j | replace: ' ', ' ' | strip | split: ' ' | last | remove_first: 'I-D.'}}'_name='{%if j contains 'I-D.'%}Internet-Draft{% else %}{{ j | replace: ' ', ' ' | strip | split: ' ' | slice: -2 }}{%endif%}'/> {% endfor %} {% else %} <refcontent>{{i.authoritative_identifier | join: ', '}}</refcontent> {% endif %}</ref-included>{% endfor %}"
|
23
|
+
standard: "{% if stream %}<stream>{{stream}}</stream>{% endif %} <front> <title>{{ title }}</title> {{ creatornames }} <date_cleanme='true'>{{date}}</date> {% for k in keywords %}<keyword>{{k}}</keyword>{%endfor%} <abstract_cleanme='true'>{{abstract}}</abstract> </front> {% for u in uris %}<format_target='{{u.content}}'_type='{%if u.type%}{{u.type}}{%else%}HTML{%endif%}'/>{% endfor %} {{ series }} {%for d in doi %}<seriesInfo_value='{{ d | replace: ' ', ' ' | remove_first: 'DOI' | strip }}'_name='DOI'/>{% endfor %} {% if home_standard %}{% for j in authoritative_identifier %} <seriesInfo_value='{{ j | replace: ' ', ' ' | strip | split: ' ' | last | remove_first: 'I-D.'}}'_name='{%if j contains 'I-D.'%}Internet-Draft{% else %}{{ j | replace: ' ', ' ' | strip | split: ' ' | slice: -2 }}{%endif%}'/> {% endfor %} {% else %} <refcontent>{{authoritative_identifier | join: ', '}}</refcontent> {% endif %} {% for i in included %}<ref-included target='{{ i.uris[0].content }}'> {% if i.stream %}<stream>{{i.stream}}</stream>{% endif %} <front> <title>{% if i.title %}{{ i.title}}{%else%}[TITLE]{%endif%}</title> {% if i.creatornames %}{{ i.creatornames }}{%else%}<author></author>{%endif%} <date_cleanme='true'>{{i.date}}</date> {% for k in i.keywords %}<keyword>{{k}}</keyword>{%endfor%} <abstract_cleanme='true'>{{i.abstract}}</abstract> </front> {% for u in i.uris %}<format_target='{{u.content}}'_type='{%if u.type%}{{u.type}}{%else%}HTML{%endif%}'/>{% endfor %} {{ series }} {%for d in i.doi %}<seriesInfo_value='{{ d | replace: ' ', ' ' | remove_first: 'DOI' | strip }}'_name='DOI'/>{% endfor %} {% if home_standard %}{% for j in i.authoritative_identifier %} <seriesInfo_value='{{ j | replace: ' ', ' ' | strip | split: ' ' | last | remove_first: 'I-D.'}}'_name='{%if j contains 'I-D.'%}Internet-Draft{% else %}{{ j | replace: ' ', ' ' | strip | split: ' ' | slice: -2 }}{%endif%}'/> {% endfor %} {% else %} <refcontent>{{i.authoritative_identifier | join: ', '}}</refcontent> {% endif %}</ref-included>{% endfor %}"
|
24
24
|
website: standard
|
25
25
|
book: standard
|
26
26
|
booklet: standard
|
data/lib/relaton/render/parse.rb
CHANGED
@@ -2,6 +2,11 @@ module Relaton
|
|
2
2
|
module Render
|
3
3
|
module Ietf
|
4
4
|
class Parse < ::Relaton::Render::Parse
|
5
|
+
def initialize(options)
|
6
|
+
super
|
7
|
+
@fieldsklass = Relaton::Render::Ietf::Fields
|
8
|
+
end
|
9
|
+
|
5
10
|
def simple_or_host_xml2hash(doc, host)
|
6
11
|
ret = super
|
7
12
|
ret.merge(home_standard: home_standard(doc, ret[:publisher_raw]),
|
@@ -88,12 +93,12 @@ module Relaton
|
|
88
93
|
super
|
89
94
|
end
|
90
95
|
|
91
|
-
# do not add BCP number, it is not included in IETF practice
|
92
96
|
def authoritative_identifier(doc)
|
93
97
|
ret = super
|
94
|
-
|
95
|
-
|
96
|
-
|
98
|
+
bcp = doc.series.detect do |s|
|
99
|
+
%w(BCP STD).include?(s.title.title.content)
|
100
|
+
end
|
101
|
+
bcp and ret.unshift("BCP #{bcp.number}")
|
97
102
|
ret.reject { |x| /^(rfc-anchor|Internet-Draft)/.match? (x) }
|
98
103
|
end
|
99
104
|
|
@@ -118,17 +123,18 @@ module Relaton
|
|
118
123
|
end
|
119
124
|
|
120
125
|
def included_xml2hash(doc)
|
121
|
-
r = doc.relation.select { |x| x.type == "includes" }
|
122
|
-
|
126
|
+
r = doc.relation.select { |x| x.type == "includes" }.map do |x|
|
127
|
+
parse_single_bibitem(x.bibitem)
|
128
|
+
end
|
123
129
|
r.empty? and return {}
|
124
130
|
{ included: r }
|
125
131
|
end
|
126
132
|
|
127
133
|
def parse_single_bibitem(doc)
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
134
|
+
data = extract(doc)
|
135
|
+
# enhance_data(data, r.template_raw)
|
136
|
+
# data_liquid = @fieldsklass.new(renderer: self)
|
137
|
+
# .compound_fields_format(data)
|
132
138
|
end
|
133
139
|
end
|
134
140
|
end
|
data/metanorma-ietf.gemspec
CHANGED
@@ -37,9 +37,8 @@ Gem::Specification.new do |spec|
|
|
37
37
|
spec.required_ruby_version = Gem::Requirement.new(">= 2.7.0")
|
38
38
|
|
39
39
|
spec.add_dependency "metanorma-ietf-data"
|
40
|
-
spec.add_dependency "metanorma-standoc", "~> 2.8.
|
40
|
+
spec.add_dependency "metanorma-standoc", "~> 2.8.2"
|
41
41
|
spec.add_dependency "relaton-render"
|
42
|
-
spec.add_dependency "vectory", "~> 0.6"
|
43
42
|
|
44
43
|
spec.add_development_dependency "debug"
|
45
44
|
spec.add_development_dependency "equivalent-xml", "~> 0.6"
|
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: 3.3.
|
4
|
+
version: 3.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: 2024-02-
|
11
|
+
date: 2024-02-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: metanorma-ietf-data
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 2.8.
|
33
|
+
version: 2.8.2
|
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: 2.8.
|
40
|
+
version: 2.8.2
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: relaton-render
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -52,20 +52,6 @@ dependencies:
|
|
52
52
|
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
|
-
- !ruby/object:Gem::Dependency
|
56
|
-
name: vectory
|
57
|
-
requirement: !ruby/object:Gem::Requirement
|
58
|
-
requirements:
|
59
|
-
- - "~>"
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
version: '0.6'
|
62
|
-
type: :runtime
|
63
|
-
prerelease: false
|
64
|
-
version_requirements: !ruby/object:Gem::Requirement
|
65
|
-
requirements:
|
66
|
-
- - "~>"
|
67
|
-
- !ruby/object:Gem::Version
|
68
|
-
version: '0.6'
|
69
55
|
- !ruby/object:Gem::Dependency
|
70
56
|
name: debug
|
71
57
|
requirement: !ruby/object:Gem::Requirement
|