relaton-ietf 0.6.3 → 0.6.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +6 -6
- data/lib/relaton_ietf.rb +4 -4
- data/lib/relaton_ietf/processor.rb +34 -0
- data/lib/relaton_ietf/version.rb +1 -1
- metadata +3 -3
- data/lib/relaton/processor.rb +0 -23
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 498358492168d51412ab66499322c88fc1b65ff8
|
4
|
+
data.tar.gz: 1468d4c7ece001819fb77fbd05aa6d335df9c5b5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1abe5dd1c5bfe377e2ffb8808edb98e9a4c432eade5b5fad440ccddc66dbf2a32fd8dbb63a3eef0e726f72f6da499a8d83eca08879342184450023286e99fab8
|
7
|
+
data.tar.gz: c95583bdd31014ac405a080c4a5ed678d85fe13808c0a3df67aeb4f5e6fbfaf68cb93bccdb0f27fcc9f863231b9e090b0687432106daf8ec1d83e0892e5fd9b4
|
data/Gemfile.lock
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
relaton-ietf (0.6.
|
4
|
+
relaton-ietf (0.6.4)
|
5
5
|
relaton-bib (~> 0.3.0)
|
6
6
|
|
7
7
|
GEM
|
8
8
|
remote: https://rubygems.org/
|
9
9
|
specs:
|
10
|
-
addressable (2.
|
11
|
-
public_suffix (>= 2.0.2, <
|
10
|
+
addressable (2.7.0)
|
11
|
+
public_suffix (>= 2.0.2, < 5.0)
|
12
12
|
byebug (11.0.1)
|
13
13
|
coderay (1.1.2)
|
14
14
|
crack (0.4.3)
|
@@ -32,11 +32,11 @@ GEM
|
|
32
32
|
pry-byebug (3.7.0)
|
33
33
|
byebug (~> 11.0)
|
34
34
|
pry (~> 0.10)
|
35
|
-
public_suffix (
|
35
|
+
public_suffix (4.0.1)
|
36
36
|
rake (10.5.0)
|
37
|
-
relaton-bib (0.3.
|
37
|
+
relaton-bib (0.3.6)
|
38
38
|
addressable
|
39
|
-
nokogiri
|
39
|
+
nokogiri
|
40
40
|
rspec (3.8.0)
|
41
41
|
rspec-core (~> 3.8.0)
|
42
42
|
rspec-expectations (~> 3.8.0)
|
data/lib/relaton_ietf.rb
CHANGED
@@ -6,9 +6,9 @@ require "relaton_ietf/ietf_bibliographic_item"
|
|
6
6
|
require "relaton_ietf/xml_parser"
|
7
7
|
require "relaton_ietf/hash_converter"
|
8
8
|
|
9
|
-
if defined? Relaton
|
10
|
-
|
11
|
-
|
12
|
-
end
|
9
|
+
# if defined? Relaton
|
10
|
+
# require_relative "relaton_ietf/processor"
|
11
|
+
# Relaton::Registry.instance.register(RelatonIetf::Processor)
|
12
|
+
# end
|
13
13
|
|
14
14
|
require "relaton/provider_ietf"
|
@@ -0,0 +1,34 @@
|
|
1
|
+
require "relaton/processor"
|
2
|
+
require "relaton_ietf/xml_parser"
|
3
|
+
|
4
|
+
module RelatonIetf
|
5
|
+
class Processor < Relaton::Processor
|
6
|
+
def initialize
|
7
|
+
@short = :relaton_ietf
|
8
|
+
@prefix = "IETF"
|
9
|
+
@defaultprefix = /^RFC /
|
10
|
+
@idtype = "IETF"
|
11
|
+
end
|
12
|
+
|
13
|
+
# @param code [String]
|
14
|
+
# @param date [String, NilClass] year
|
15
|
+
# @param opts [Hash]
|
16
|
+
# @return [RelatonIetf::IetfBibliographicItem]
|
17
|
+
def get(code, date, opts)
|
18
|
+
::RelatonIetf::IetfBibliography.get(code, date, opts)
|
19
|
+
end
|
20
|
+
|
21
|
+
# @param xml [String]
|
22
|
+
# @return [RelatonIetf::IetfBibliographicItem]
|
23
|
+
def from_xml(xml)
|
24
|
+
::RelatonIetf::XMLParser.from_xml xml
|
25
|
+
end
|
26
|
+
|
27
|
+
# @param hash [Hash]
|
28
|
+
# @return [RelatonIetf::IetfBibliographicItem]
|
29
|
+
def hash_to_bib(hash)
|
30
|
+
item_hash = ::RelatonIetf::HashConverter.hash_to_bib(hash)
|
31
|
+
::RelatonIetf::IetfBibliographicItem.new item_hash
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
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: 0.6.
|
4
|
+
version: 0.6.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: 2019-
|
11
|
+
date: 2019-09-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -185,12 +185,12 @@ files:
|
|
185
185
|
- appveyor.yml
|
186
186
|
- bin/console
|
187
187
|
- bin/setup
|
188
|
-
- lib/relaton/processor.rb
|
189
188
|
- lib/relaton/provider_ietf.rb
|
190
189
|
- lib/relaton_ietf.rb
|
191
190
|
- lib/relaton_ietf/hash_converter.rb
|
192
191
|
- lib/relaton_ietf/ietf_bibliographic_item.rb
|
193
192
|
- lib/relaton_ietf/ietf_bibliography.rb
|
193
|
+
- lib/relaton_ietf/processor.rb
|
194
194
|
- lib/relaton_ietf/scrapper.rb
|
195
195
|
- lib/relaton_ietf/version.rb
|
196
196
|
- lib/relaton_ietf/xml_parser.rb
|
data/lib/relaton/processor.rb
DELETED
@@ -1,23 +0,0 @@
|
|
1
|
-
require "relaton/processor"
|
2
|
-
require "relaton_ietf/xml_parser"
|
3
|
-
|
4
|
-
module Relaton
|
5
|
-
module RelatonIetf
|
6
|
-
class Processor < Relaton::Processor
|
7
|
-
def initialize
|
8
|
-
@short = :relaton_ietf
|
9
|
-
@prefix = "IETF"
|
10
|
-
@defaultprefix = /^RFC /
|
11
|
-
@idtype = "IETF"
|
12
|
-
end
|
13
|
-
|
14
|
-
def get(code, date, opts)
|
15
|
-
::RelatonIetf::IetfBibliography.get(code, date, opts)
|
16
|
-
end
|
17
|
-
|
18
|
-
def from_xml(xml)
|
19
|
-
::RelatonIetf::XMLParser.from_xml xml
|
20
|
-
end
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|