rfcbib 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +3 -3
- data/lib/relaton/processor.rb +1 -1
- data/lib/rfcbib/scrapper.rb +4 -3
- data/lib/rfcbib/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: ba5e03b00d32ab0dcbcdb229cbb3fe9b904de434bc26a51905995d8a1ad40839
|
4
|
+
data.tar.gz: dc4c30e94ff3f1af5242f4f9b5334397bcbdfe618ef1632331369c14646dfce3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9550cb561a1859052ed5150c976dddba240cf9339d6cd7b1572345326c3cbb9dcd6bc2c5b496287cc0897438abb2c491fe81cc3847cacfda15f0d9b18e17cd3f
|
7
|
+
data.tar.gz: 1720386b6400c1bcd6389969a52d56c2f7959b9243e5d458f777ab589f25011f90e3c5f6dcd861f5871825572bc6aff65639f55f743d58a94b7b1048677439c2
|
data/Gemfile.lock
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
rfcbib (0.
|
5
|
-
iso-bib-item (~> 0.2)
|
4
|
+
rfcbib (0.2.1)
|
5
|
+
iso-bib-item (~> 0.2.0)
|
6
6
|
|
7
7
|
GEM
|
8
8
|
remote: https://rubygems.org/
|
@@ -13,7 +13,7 @@ GEM
|
|
13
13
|
docile (1.3.1)
|
14
14
|
equivalent-xml (0.6.0)
|
15
15
|
nokogiri (>= 1.4.3)
|
16
|
-
iso-bib-item (0.2.
|
16
|
+
iso-bib-item (0.2.2)
|
17
17
|
isoics (~> 0.1.6)
|
18
18
|
nokogiri (~> 1.8.4)
|
19
19
|
ruby_deep_clone (~> 0.8.0)
|
data/lib/relaton/processor.rb
CHANGED
data/lib/rfcbib/scrapper.rb
CHANGED
@@ -33,7 +33,7 @@ module RfcBib
|
|
33
33
|
def bib_item
|
34
34
|
IsoBibItem::BibliographicItem.new(
|
35
35
|
id: @reference[:anchor],
|
36
|
-
docid: docids,
|
36
|
+
docid: docids(@reference[:anchor].sub(/^(RFC)/, "\\1 ")),
|
37
37
|
status: status,
|
38
38
|
language: [language],
|
39
39
|
link: [{ type: 'src', content: @reference[:target] }],
|
@@ -163,14 +163,15 @@ module RfcBib
|
|
163
163
|
#
|
164
164
|
# @return [Array<IsoBibItem::DocumentIdentifier>]
|
165
165
|
#
|
166
|
-
def docids
|
167
|
-
@reference.xpath('//seriesinfo').map do |si|
|
166
|
+
def docids(id)
|
167
|
+
ret = @reference.xpath('//seriesinfo').map do |si|
|
168
168
|
next unless si[:name] == 'DOI'
|
169
169
|
IsoBibItem::DocumentIdentifier.new(
|
170
170
|
id: si[:value],
|
171
171
|
type: si[:name]
|
172
172
|
)
|
173
173
|
end.compact
|
174
|
+
ret << IsoBibItem::DocumentIdentifier.new(type: "IETF", id: id)
|
174
175
|
end
|
175
176
|
|
176
177
|
#
|
data/lib/rfcbib/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rfcbib
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.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: 2018-07-
|
11
|
+
date: 2018-07-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|