relaton-ietf 1.2.1 → 1.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ubuntu.yml +1 -0
- data/.rubocop.yml +2 -2
- data/lib/relaton_ietf/ietf_bibliographic_item.rb +1 -16
- data/lib/relaton_ietf/version.rb +1 -1
- data/lib/relaton_ietf/xml_parser.rb +0 -20
- data/relaton_ietf.gemspec +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6d18905deb88eed2bdd7a56b81084c7afeab12d455ab8149084e2b419ec01fab
|
4
|
+
data.tar.gz: b9a4d28b63daee03a0d64766ee840a61ab3757c31b292c68d6494bbaa89adbc9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f2c3e1f658c75e984c542d480fd390d6e4614d056ea6b6790c892e209241aaea3cab85c2df857ab25aa6f4be69ab3e76cc9aa8cd0427cc6359aa0e6be711afeb
|
7
|
+
data.tar.gz: 0e7fa6638657d7baff4e26d3d0b5ec4167ec540df92f49b2c745b3e2896358f0dec0a53eacef4949ccdb47d89dff2b6e4b2e8d4a8dd8181abb3143867cdb3359
|
data/.rubocop.yml
CHANGED
@@ -15,7 +15,6 @@ module RelatonIetf
|
|
15
15
|
warn "[relaton-ietf] WARNING: invalid doctype #{args[:doctype]}"
|
16
16
|
end
|
17
17
|
super
|
18
|
-
# @doctype = args[:doctype]
|
19
18
|
end
|
20
19
|
|
21
20
|
# @param builder
|
@@ -23,21 +22,7 @@ module RelatonIetf
|
|
23
22
|
# @option opts [Symbol, NilClass] :date_format (:short), :full
|
24
23
|
def to_xml(builder = nil, **opts)
|
25
24
|
opts[:date_format] ||= :short
|
26
|
-
super builder, **opts
|
27
|
-
if opts[:bibdata] && doctype
|
28
|
-
b.ext do
|
29
|
-
b.doctype doctype if doctype
|
30
|
-
end
|
31
|
-
end
|
32
|
-
end
|
33
|
-
end
|
34
|
-
|
35
|
-
# @return [Hash]
|
36
|
-
def to_hash
|
37
|
-
hash = super
|
38
|
-
hash["doctype"] = doctype if doctype
|
39
|
-
# hash["keyword"] = single_element_array(keyword) if keyword&.any?
|
40
|
-
hash
|
25
|
+
super builder, **opts
|
41
26
|
end
|
42
27
|
end
|
43
28
|
end
|
data/lib/relaton_ietf/version.rb
CHANGED
@@ -3,17 +3,6 @@ require "nokogiri"
|
|
3
3
|
module RelatonIetf
|
4
4
|
class XMLParser < RelatonBib::XMLParser
|
5
5
|
class << self
|
6
|
-
# def from_xml(xml)
|
7
|
-
# doc = Nokogiri::XML(xml)
|
8
|
-
# doc.remove_namespaces!
|
9
|
-
# ietfitem = doc.at("/bibitem|/bibdata")
|
10
|
-
# if ietfitem
|
11
|
-
# RelatonIetf::IetfBibliographicItem.new(item_data(ietfitem))
|
12
|
-
# elsif
|
13
|
-
# warn "[relato-ietf] can't find bibitem or bibdata element in the XML"
|
14
|
-
# end
|
15
|
-
# end
|
16
|
-
|
17
6
|
private
|
18
7
|
|
19
8
|
# override RelatonBib::BibliographicItem.bib_item method
|
@@ -22,15 +11,6 @@ module RelatonIetf
|
|
22
11
|
def bib_item(item_hash)
|
23
12
|
IetfBibliographicItem.new item_hash
|
24
13
|
end
|
25
|
-
|
26
|
-
def item_data(ietfitem)
|
27
|
-
data = super
|
28
|
-
ext = ietfitem.at "./ext"
|
29
|
-
return data unless ext
|
30
|
-
|
31
|
-
data[:doctype] = ext.at("./doctype")&.text
|
32
|
-
data
|
33
|
-
end
|
34
14
|
end
|
35
15
|
end
|
36
16
|
end
|
data/relaton_ietf.gemspec
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.
|
4
|
+
version: 1.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-08-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: debase
|
@@ -156,14 +156,14 @@ dependencies:
|
|
156
156
|
requirements:
|
157
157
|
- - "~>"
|
158
158
|
- !ruby/object:Gem::Version
|
159
|
-
version: 1.
|
159
|
+
version: 1.3.0
|
160
160
|
type: :runtime
|
161
161
|
prerelease: false
|
162
162
|
version_requirements: !ruby/object:Gem::Requirement
|
163
163
|
requirements:
|
164
164
|
- - "~>"
|
165
165
|
- !ruby/object:Gem::Version
|
166
|
-
version: 1.
|
166
|
+
version: 1.3.0
|
167
167
|
description: "RelatonIetf: retrieve IETF Standards for bibliographic use \nusing the
|
168
168
|
BibliographicItem model.\n\nFormerly known as rfcbib.\n"
|
169
169
|
email:
|