relaton-ietf 1.11.1 → 1.11.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/relaton_ietf/data_fetcher.rb +8 -2
- data/lib/relaton_ietf/rfc_index_entry.rb +5 -1
- data/lib/relaton_ietf/scrapper.rb +1 -1
- 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: c59dcf63b161361f93d22743447d26e76aa17ae8e418d0a7e7930809248957cf
|
4
|
+
data.tar.gz: 9a8b4e68190d11712078136ff4957ac611cb771f7c724085a1d23fab2df7aaf1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5e13facb10ad39ccfc02dbc45f362460b2d06a1e767217e34efd56e5bdb7274558c8c3805e1f0003df59a1c3e0a2d13efad83febedbfd8aa7b65f338d5f70585
|
7
|
+
data.tar.gz: '09124c9ae1f33596edcf1bb97f4c349c01626a5f328be669f8c363eba09f37340d236745e1afd63c564dcd6911d276eb5eee0aa948b6a0412b231e55cc1e33b8'
|
@@ -63,13 +63,19 @@ module RelatonIetf
|
|
63
63
|
#
|
64
64
|
# Fetches ietf-internet-drafts documents
|
65
65
|
#
|
66
|
-
def fetch_ieft_internet_drafts # rubocop:disable Metrics/MethodLength
|
66
|
+
def fetch_ieft_internet_drafts # rubocop:disable Metrics/MethodLength, Metrics/AbcSize
|
67
67
|
versions = Dir["bibxml-ids/*.xml"].each_with_object([]) do |path, vers|
|
68
68
|
file = File.basename path, ".xml"
|
69
69
|
if file.include?("D.draft-")
|
70
70
|
vers << file.sub(/^reference\.I-D\./, "")
|
71
|
+
/(?<ver>\d+)$/ =~ file
|
71
72
|
end
|
72
|
-
|
73
|
+
bib = BibXMLParser.parse(File.read(path, encoding: "UTF-8"))
|
74
|
+
if ver
|
75
|
+
version = RelatonBib::BibliographicItem::Version.new nil, [ver]
|
76
|
+
bib.instance_variable_set :@version, version
|
77
|
+
end
|
78
|
+
save_doc bib
|
73
79
|
end
|
74
80
|
update_versions(versions) if versions.any? && @format != "bibxml"
|
75
81
|
end
|
@@ -81,7 +81,11 @@ module RelatonIetf
|
|
81
81
|
@is_also.each_with_object([]) do |ref, a|
|
82
82
|
# bib = IetfBibliography.get ref.sub(/^(RFC)(\d+)/, '\1 \2')
|
83
83
|
ref_doc = @doc.at "/xmlns:rfc-index/xmlns:rfc-entry[xmlns:doc-id[text()='#{ref}']]"
|
84
|
-
bib = RfcEntry.parse ref_doc
|
84
|
+
bib = if ref_doc then RfcEntry.parse ref_doc
|
85
|
+
else
|
86
|
+
fref = RelatonBib::FormattedRef.new content: ref
|
87
|
+
IetfBibliographicItem.new formattedref: fref
|
88
|
+
end
|
85
89
|
a << { type: "includes", bibitem: bib } if bib
|
86
90
|
end
|
87
91
|
end
|
@@ -38,7 +38,7 @@ module RelatonIetf
|
|
38
38
|
# doc = Nokogiri::XML get_page(uri)
|
39
39
|
# r = doc.at("/referencegroup", "/reference")
|
40
40
|
# fetch_rfc r, is_relation: is_relation, url: uri, ver: ver
|
41
|
-
BibXMLParser.parse get_page(uri),
|
41
|
+
BibXMLParser.parse get_page(uri), is_relation: is_relation, ver: ver
|
42
42
|
end
|
43
43
|
|
44
44
|
# @param uri [String]
|
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.4
|
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-05-
|
11
|
+
date: 2022-05-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: equivalent-xml
|