relaton-ietf 1.10.4 → 1.10.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: aea00f6f466ab9780b8fbb93cd69ea04e7bd099ab8793be0edd6be843143a3f6
4
- data.tar.gz: a9259ce6290b92dc98679aded761e2563d4771118f4a44434142cd26b3248c4e
3
+ metadata.gz: 2bdbf2b79c15e3a39c10694ba1ed129b825c6481f95939dfd322da43a3ea859e
4
+ data.tar.gz: da2f82d0c9ec214fbef2dd229f06d8dd9ffc0099c1eededcfbfca3e3d2cebd70
5
5
  SHA512:
6
- metadata.gz: 7d4cf8fc6b8ce6483732b0c8f350596a41cd76ac35001e0257f683ebf854646cb473f08d293e40b8fc84cee61527ab421bd6178ba5a2f14ec32a29c4c2ac97c0
7
- data.tar.gz: c8016eb29a720c92dc25c4e364a5877d31fa1aa0cffa6bb5acae164ec9a169c0022e4c6eb6cc5b3b05963ae74b5a922cb036e0c196d205fe85907cd9d22cd79c
6
+ metadata.gz: 2e435d1419778748b600048fd02881fa0cc32faa462fd50e95a1c837dcdd3c475ffd5f1cf0b143b1d20be38dae96dbdad3556d4b3d4954bc4a6de717da5cd0ec
7
+ data.tar.gz: dcf0ce8ce233f9f29073bea10b3abc4ffb9aa70f3749c88d3961fe01e6e157616237ded93e02ac664dba7c34a89da212880e2adb3d75949d176d41ff32491123
data/README.adoc CHANGED
@@ -135,7 +135,7 @@ RelatonIetf::IetfBibliographicItem.from_hash hash
135
135
 
136
136
  === Fetch data
137
137
 
138
- There is a IETF datasets what can be converted into RelatonXML/BibXML/BibYAML formats:
138
+ There are IETF datasets what can be converted into RelatonXML/BibXML/BibYAML formats:
139
139
 
140
140
  - `ietf-rfcsubseries` - https://www.rfc-editor.org/rfc-index.xml (`<bcp-entry>`, `<fyi-entry>`, `<std-entry>`)
141
141
  - `ietf-internet-drafts` - converts files from local directory `./bibxml-ids`. Use `rsync -avcizxL rsync.ietf.org::bibxml-ids ./bibxml-ids` command to fetch the files.
@@ -68,7 +68,7 @@ module RelatonIetf
68
68
  def parse_docid
69
69
  ids = [
70
70
  RelatonBib::DocumentIdentifier.new(id: pub_id, type: "IETF", primary: true),
71
- RelatonBib::DocumentIdentifier.new(id: code, type: "IETF", scope: "anchor"),
71
+ RelatonBib::DocumentIdentifier.new(id: anchor, type: "IETF", scope: "anchor"),
72
72
  ]
73
73
  doi = @doc.at("./xmlns:doi").text
74
74
  ids << RelatonBib::DocumentIdentifier.new(id: doi, type: "DOI")
@@ -112,14 +112,22 @@ module RelatonIetf
112
112
  @doc.at("./xmlns:doc-id").text
113
113
  end
114
114
 
115
+ #
116
+ # Create acnhor
117
+ #
118
+ # @return [String] anchor
119
+ #
120
+ def anchor
121
+ "RFC#{docnum}"
122
+ end
123
+
115
124
  #
116
125
  # Create link
117
126
  #
118
127
  # @return [Array<RelatonBib::TypedUri>]
119
128
  #
120
129
  def parse_link
121
- num = code[-4..-1].sub(/^0+/, "")
122
- url = "https://www.rfc-editor.org/info/rfc#{num}"
130
+ url = "https://www.rfc-editor.org/info/rfc#{docnum}"
123
131
  [RelatonBib::TypedUri.new(content: url, type: "src")]
124
132
  end
125
133
 
@@ -19,7 +19,7 @@ module RelatonIetf
19
19
  #
20
20
  # @param [Nokogiri::XML::Element] doc document
21
21
  #
22
- # @return [RelatonIetf:IetfBibliographicItem, nil]
22
+ # @return [RelatonIetf::IetfBibliographicItem, nil]
23
23
  #
24
24
  def self.parse(doc)
25
25
  doc_id = doc.at("./xmlns:doc-id")
@@ -55,7 +55,7 @@ module RelatonIetf
55
55
  def parse_docid
56
56
  [
57
57
  RelatonBib::DocumentIdentifier.new(type: "IETF", id: pub_id, primary: true),
58
- RelatonBib::DocumentIdentifier.new(type: "IETF", scope: "anchor", id: @doc_id),
58
+ RelatonBib::DocumentIdentifier.new(type: "IETF", scope: "anchor", id: anchor),
59
59
  ]
60
60
  end
61
61
 
@@ -1,3 +1,3 @@
1
1
  module RelatonIetf
2
- VERSION = "1.10.4".freeze
2
+ VERSION = "1.10.5".freeze
3
3
  end
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.10.4
4
+ version: 1.10.5
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-03-01 00:00:00.000000000 Z
11
+ date: 2022-03-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: equivalent-xml