relaton-itu 0.3.2 → 0.3.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +7 -7
- data/lib/relaton_itu.rb +4 -4
- data/lib/relaton_itu/processor.rb +33 -0
- data/lib/relaton_itu/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: aed1a29fdb7ec20a5c4adead69d87901fb309f9b
|
4
|
+
data.tar.gz: 5b4458c33e9a694577c0ecb4e1370b5f02acc8c9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fe747eb5f52a9179c15a69340c23a8e5f6c04cc7eb97543bfc47112ca46b256aa1c98c43a1c99677c6c452d2f31422ac4849fc5e24ba68fbc41ce48280f126fc
|
7
|
+
data.tar.gz: 3c60dd852dec4e77683acf836358a60feb1dd51d7f86598faf83faede04e2c57a03eb4d99aad0b644ead2f5909f32eec728a844ed65eda1501417af759bda19a
|
data/Gemfile.lock
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
relaton-itu (0.3.
|
4
|
+
relaton-itu (0.3.3)
|
5
5
|
relaton-iso-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)
|
@@ -33,12 +33,12 @@ GEM
|
|
33
33
|
pry-byebug (3.7.0)
|
34
34
|
byebug (~> 11.0)
|
35
35
|
pry (~> 0.10)
|
36
|
-
public_suffix (
|
36
|
+
public_suffix (4.0.1)
|
37
37
|
rake (10.5.0)
|
38
|
-
relaton-bib (0.3.
|
38
|
+
relaton-bib (0.3.6)
|
39
39
|
addressable
|
40
|
-
nokogiri
|
41
|
-
relaton-iso-bib (0.3.
|
40
|
+
nokogiri
|
41
|
+
relaton-iso-bib (0.3.5)
|
42
42
|
isoics (~> 0.1.6)
|
43
43
|
relaton-bib (~> 0.3.0)
|
44
44
|
ruby_deep_clone (~> 0.8.0)
|
data/lib/relaton_itu.rb
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
require "relaton_itu/version"
|
2
2
|
require "relaton_itu/itu_bibliography"
|
3
3
|
|
4
|
-
if defined? Relaton
|
5
|
-
|
6
|
-
|
7
|
-
end
|
4
|
+
# if defined? Relaton
|
5
|
+
# require_relative "relaton/processor"
|
6
|
+
# Relaton::Registry.instance.register(Relaton::RelatonItu::Processor)
|
7
|
+
# end
|
8
8
|
|
9
9
|
module RelatonItu
|
10
10
|
class Error < StandardError; end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
require "relaton/processor"
|
2
|
+
|
3
|
+
module RelatonItu
|
4
|
+
class Processor < Relaton::Processor
|
5
|
+
def initialize
|
6
|
+
@short = :relaton_itu
|
7
|
+
@prefix = "ITU"
|
8
|
+
@defaultprefix = %r{^(ITU)}
|
9
|
+
@idtype = "ITU"
|
10
|
+
end
|
11
|
+
|
12
|
+
# @param code [String]
|
13
|
+
# @param date [String, NilClass] year
|
14
|
+
# @param opts [Hash]
|
15
|
+
# @return [RelatonItu::ItuBibliographicItem]
|
16
|
+
def get(code, date, opts)
|
17
|
+
::RelatonItu::ItuBibliography.get(code, date, opts)
|
18
|
+
end
|
19
|
+
|
20
|
+
# @param xml [String]
|
21
|
+
# @return [RelatonItu::ItuBibliographicItem]
|
22
|
+
def from_xml(xml)
|
23
|
+
::RelatonItu::XMLParser.from_xml xml
|
24
|
+
end
|
25
|
+
|
26
|
+
# @param hash [Hash]
|
27
|
+
# @return [RelatonItu::ItuBibliographicItem]
|
28
|
+
def hash_to_bib(hash)
|
29
|
+
item_hash = ::RelatonItu::HashConverter.hash_to_bib(hash)
|
30
|
+
::RelatonItu::ItuBibliographicItem.new item_hash
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
data/lib/relaton_itu/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: relaton-itu
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.3
|
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,7 +185,6 @@ files:
|
|
185
185
|
- bin/console
|
186
186
|
- bin/setup
|
187
187
|
- itubib.gemspec
|
188
|
-
- lib/relaton/processor.rb
|
189
188
|
- lib/relaton_itu.rb
|
190
189
|
- lib/relaton_itu/editorial_group.rb
|
191
190
|
- lib/relaton_itu/hash_converter.rb
|
@@ -194,6 +193,7 @@ files:
|
|
194
193
|
- lib/relaton_itu/itu_bibliographic_item.rb
|
195
194
|
- lib/relaton_itu/itu_bibliography.rb
|
196
195
|
- lib/relaton_itu/itu_group.rb
|
196
|
+
- lib/relaton_itu/processor.rb
|
197
197
|
- lib/relaton_itu/scrapper.rb
|
198
198
|
- lib/relaton_itu/version.rb
|
199
199
|
- lib/relaton_itu/xml_parser.rb
|
data/lib/relaton/processor.rb
DELETED
@@ -1,23 +0,0 @@
|
|
1
|
-
require "relaton/processor"
|
2
|
-
|
3
|
-
module Relaton
|
4
|
-
module RelatonItu
|
5
|
-
class Processor < Relaton::Processor
|
6
|
-
|
7
|
-
def initialize
|
8
|
-
@short = :relaton_itu
|
9
|
-
@prefix = "ITU"
|
10
|
-
@defaultprefix = %r{^(ITU)}
|
11
|
-
@idtype = "ITU"
|
12
|
-
end
|
13
|
-
|
14
|
-
def get(code, date, opts)
|
15
|
-
::RelatonItu::ItuBibliography.get(code, date, opts)
|
16
|
-
end
|
17
|
-
|
18
|
-
def from_xml(xml)
|
19
|
-
::RelatonItu::XMLParser.from_xml xml
|
20
|
-
end
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|