relaton-ietf 1.13.1 → 1.13.2
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 +0 -1
- data/.github/workflows/release.yml +22 -0
- data/lib/relaton_ietf/bibxml_parser.rb +1 -1
- data/lib/relaton_ietf/data_fetcher.rb +1 -1
- data/lib/relaton_ietf/rfc_entry.rb +19 -13
- data/lib/relaton_ietf/rfc_index_entry.rb +0 -1
- data/lib/relaton_ietf/scrapper.rb +5 -1
- data/lib/relaton_ietf/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 51e29fcf1299a480c0bcd58c49940fa5dff19d860aa433844ae369334df0b53f
|
4
|
+
data.tar.gz: dc12d995d535935ec257ae70ba81b5af0e611f4c22a5af02351938e522ead598
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 967aa4beef15be80301646b2abe549218f2a827bec2bda14d0da7abf24787f0ce91733884d247549a53a623b7f74370724652f6c891b6f55c1a6c865295a2b60
|
7
|
+
data.tar.gz: 7e36eaedb2c2e9a2b087156010b0c0097c46f24ba8b4454d9832a42aca004483ce556e3246aaae69cb0560305ac15da0d935669600025ead70c526f8c8ed4a76
|
data/.github/workflows/rake.yml
CHANGED
@@ -0,0 +1,22 @@
|
|
1
|
+
# Auto-generated by Cimas: Do not edit it manually!
|
2
|
+
# See https://github.com/metanorma/cimas
|
3
|
+
name: release
|
4
|
+
|
5
|
+
on:
|
6
|
+
workflow_dispatch:
|
7
|
+
inputs:
|
8
|
+
next_version:
|
9
|
+
description: |
|
10
|
+
Next release version. Possible values: x.y.z, major, minor, patch or pre|rc|etc
|
11
|
+
required: true
|
12
|
+
default: 'skip'
|
13
|
+
push:
|
14
|
+
tags: [ v* ]
|
15
|
+
|
16
|
+
jobs:
|
17
|
+
release:
|
18
|
+
uses: relaton/support/.github/workflows/release.yml@master
|
19
|
+
with:
|
20
|
+
next_version: ${{ github.event.inputs.next_version }}
|
21
|
+
secrets:
|
22
|
+
rubygems-api-key: ${{ secrets.RELATON_CI_RUBYGEMS_API_KEY }}
|
@@ -7,7 +7,7 @@ module RelatonIetf
|
|
7
7
|
# @return [RelatonIetf::IetfBibliographicItem]
|
8
8
|
def bib_item(**attrs)
|
9
9
|
unless attrs.delete(:is_relation)
|
10
|
-
attrs[:fetched] = Date.today.to_s
|
10
|
+
# attrs[:fetched] = Date.today.to_s
|
11
11
|
# attrs[:place] = ["Fremont, CA"]
|
12
12
|
end
|
13
13
|
RelatonIetf::IetfBibliographicItem.new(**attrs)
|
@@ -122,7 +122,7 @@ module RelatonIetf
|
|
122
122
|
last_v = HashConverter.hash_to_bib YAML.load_file("#{@output}/#{vs.last}.#{@ext}")
|
123
123
|
bib = IetfBibliographicItem.new(
|
124
124
|
title: last_v[:title], abstract: last_v[:abstract], formattedref: fref,
|
125
|
-
|
125
|
+
docid: [docid], relation: rel
|
126
126
|
)
|
127
127
|
save_doc bib
|
128
128
|
end
|
@@ -30,7 +30,6 @@ module RelatonIetf
|
|
30
30
|
type: "standard",
|
31
31
|
language: ["en"],
|
32
32
|
script: ["Latn"],
|
33
|
-
fetched: Date.today.to_s,
|
34
33
|
docid: parse_docid,
|
35
34
|
docnumber: code,
|
36
35
|
title: parse_title,
|
@@ -150,7 +149,7 @@ module RelatonIetf
|
|
150
149
|
#
|
151
150
|
# @return [Array<RelatonBib::ContributionInfo>] document contributors
|
152
151
|
#
|
153
|
-
def parse_contributor # rubocop:disable Metrics/MethodLength, Metrics/AbcSize, Metrics/CyclomaticComplexity
|
152
|
+
def parse_contributor # rubocop:disable Metrics/MethodLength, Metrics/AbcSize, Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity
|
154
153
|
@doc.xpath("./xmlns:author").map do |contrib| # rubocop:disable Metrics/BlockLength
|
155
154
|
n = contrib.at("./xmlns:name").text
|
156
155
|
case n
|
@@ -158,12 +157,16 @@ module RelatonIetf
|
|
158
157
|
entity = RelatonBib::Organization.new(abbrev: n, name: "International Organization for Standardization")
|
159
158
|
when "International Organization for Standardization"
|
160
159
|
entity = RelatonBib::Organization.new(abbrev: "ISO", name: n)
|
161
|
-
when "IAB"
|
162
|
-
|
163
|
-
when "
|
164
|
-
|
165
|
-
|
166
|
-
|
160
|
+
# when "IAB", "IESG", "Internet Architecture Board", "IAB and IESG",
|
161
|
+
# "IAB Advisory Committee", "Internet Engineering Steering Group"
|
162
|
+
when /#{RelatonBib::BibXMLParser::FULLNAMEORG.join("|")}/
|
163
|
+
abbr = n.upcase == n ? n : n.split.reduce([]) { |a, w| w == w.upcase ? break : a << w[0] }&.join
|
164
|
+
entity = RelatonBib::Organization.new(abbrev: abbr, name: n)
|
165
|
+
desc = "BibXML author"
|
166
|
+
# when "IESG"
|
167
|
+
# entity = RelatonBib::Organization.new(abbrev: n, name: "Internet Engineering Steering Group")
|
168
|
+
when "Federal Networking Council", "Internet Activities Board",
|
169
|
+
"Defense Advanced Research Projects Agency", "National Science Foundation",
|
167
170
|
"National Research Council", "National Bureau of Standards"
|
168
171
|
abbr = n.split.map { |w| w[0] if w[0] == w[0].upcase }.join
|
169
172
|
entity = RelatonBib::Organization.new(abbrev: abbr, name: n)
|
@@ -194,20 +197,23 @@ module RelatonIetf
|
|
194
197
|
)
|
195
198
|
entity = RelatonBib::Person.new(name: fname)
|
196
199
|
end
|
197
|
-
RelatonBib::ContributionInfo.new(entity: entity, role: parse_role(contrib))
|
200
|
+
RelatonBib::ContributionInfo.new(entity: entity, role: parse_role(contrib, desc))
|
198
201
|
end
|
199
202
|
end
|
200
203
|
|
201
204
|
#
|
202
205
|
# Parse contributors role
|
203
206
|
#
|
204
|
-
# @param [Nokogiri::XML::Node] contrib
|
207
|
+
# @param [Nokogiri::XML::Node] contrib contributor
|
208
|
+
# @param [String, nil] desc contributor description
|
205
209
|
#
|
206
|
-
# @return [Array<Hash>]
|
210
|
+
# @return [Array<Hash>] contributor's role
|
207
211
|
#
|
208
|
-
def parse_role(contrib)
|
212
|
+
def parse_role(contrib, desc = nil)
|
209
213
|
type = contrib.at("./xmlns:title")&.text&.downcase || "author"
|
210
|
-
|
214
|
+
role = { type: type }
|
215
|
+
role[:description] = [desc] if desc
|
216
|
+
[role]
|
211
217
|
end
|
212
218
|
|
213
219
|
#
|
@@ -39,7 +39,11 @@ module RelatonIetf
|
|
39
39
|
uri = "#{ghurl}#{ref.sub(/\s|\u00a0/, '.')}.yaml"
|
40
40
|
# BibXMLParser.parse get_page(uri), is_relation: is_relation, ver: ver
|
41
41
|
resp = get_page uri
|
42
|
-
|
42
|
+
return unless resp
|
43
|
+
|
44
|
+
hash = YAML.safe_load resp
|
45
|
+
hash["fetched"] = Date.today.to_s
|
46
|
+
IetfBibliographicItem.from_hash hash
|
43
47
|
end
|
44
48
|
|
45
49
|
# @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.13.
|
4
|
+
version: 1.13.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: 2022-
|
11
|
+
date: 2022-09-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: equivalent-xml
|
@@ -145,6 +145,7 @@ extensions: []
|
|
145
145
|
extra_rdoc_files: []
|
146
146
|
files:
|
147
147
|
- ".github/workflows/rake.yml"
|
148
|
+
- ".github/workflows/release.yml"
|
148
149
|
- ".gitignore"
|
149
150
|
- ".hound.yml"
|
150
151
|
- ".rspec"
|