relaton-ietf 1.11.0 → 1.11.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile +0 -3
- data/lib/relaton_ietf/rfc_index_entry.rb +8 -6
- data/lib/relaton_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: 7812c81b9dd19179ee160ebc6ab9f8d8388339c63eaeb58dc7e63438bc1732e6
|
|
4
|
+
data.tar.gz: d8451d7aff8ab646b026a8a236c51980792896cb2c8892f21b7dacf061e2e8a9
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a135ae22b557666d392f7e7b29612c8338e21f844f2f484c1f8772208e5ad2e635898b3c9bc6b5fdef372a6ab6a1df710844b245c7d7835c137334f57190a877
|
|
7
|
+
data.tar.gz: 9f04a36d7c1ce3ac3f9f9867ac8739f334484d847ff6e7fded8da8015334a6dbeb691b64f866ac37c2b04060f7f3e98896e73b652f9030b30fe15b8c88f4a242
|
data/Gemfile
CHANGED
|
@@ -3,12 +3,13 @@ module RelatonIetf
|
|
|
3
3
|
#
|
|
4
4
|
# Document parser initalization
|
|
5
5
|
#
|
|
6
|
-
# @param [
|
|
6
|
+
# @param [Nokogiri::XML::Element] doc document
|
|
7
7
|
# @param [String] doc_id document id
|
|
8
8
|
# @param [Array<String>] is_also included document ids
|
|
9
9
|
#
|
|
10
|
-
def initialize(
|
|
11
|
-
@
|
|
10
|
+
def initialize(doc, doc_id, is_also)
|
|
11
|
+
@doc = doc
|
|
12
|
+
@name = doc.name.split("-").first
|
|
12
13
|
@shortnum = doc_id[-4..-1].sub(/^0+/, "")
|
|
13
14
|
@doc_id = doc_id
|
|
14
15
|
@is_also = is_also
|
|
@@ -26,8 +27,7 @@ module RelatonIetf
|
|
|
26
27
|
is_also = doc.xpath("./xmlns:is-also/xmlns:doc-id").map &:text
|
|
27
28
|
return unless doc_id && is_also.any?
|
|
28
29
|
|
|
29
|
-
|
|
30
|
-
new(name, doc_id.text, is_also).parse
|
|
30
|
+
new(doc, doc_id.text, is_also).parse
|
|
31
31
|
end
|
|
32
32
|
|
|
33
33
|
def parse
|
|
@@ -79,7 +79,9 @@ module RelatonIetf
|
|
|
79
79
|
|
|
80
80
|
def parse_relation
|
|
81
81
|
@is_also.each_with_object([]) do |ref, a|
|
|
82
|
-
bib = IetfBibliography.get ref.sub(/^(RFC)(\d+)/, '\1 \2')
|
|
82
|
+
# bib = IetfBibliography.get ref.sub(/^(RFC)(\d+)/, '\1 \2')
|
|
83
|
+
ref_doc = @doc.at "/xmlns:rfc-index/xmlns:rfc-entry[xmlns:doc-id[text()='#{ref}']]"
|
|
84
|
+
bib = RfcEntry.parse ref_doc
|
|
83
85
|
a << { type: "includes", bibitem: bib } if bib
|
|
84
86
|
end
|
|
85
87
|
end
|
data/lib/relaton_ietf/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: relaton-ietf
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.11.
|
|
4
|
+
version: 1.11.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ribose Inc.
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2022-
|
|
11
|
+
date: 2022-05-03 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: equivalent-xml
|