relaton-itu 0.3.2 → 0.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 84374f1f75d8a8644490ca1377f2788fc05414bc
4
- data.tar.gz: 9ccbae6c1244b6fdb053f97f5544c12949304a72
3
+ metadata.gz: aed1a29fdb7ec20a5c4adead69d87901fb309f9b
4
+ data.tar.gz: 5b4458c33e9a694577c0ecb4e1370b5f02acc8c9
5
5
  SHA512:
6
- metadata.gz: 4fd1f6fb580ad51c5f9d2b6b9f38a674c80b75f57f7befbb0e99e4dbcb7b8d3bda246d3f997ce87e94a5b36cb59809c9288ae76b350095a00f692fba75f8253c
7
- data.tar.gz: 9e7c0ee638ea68a1a6e9d1d461f832510ff3fdc4f383aa4965a45cc2644080ab26949ae5d5f0506c810445df6cbb621957eda261d63e9e60b4d34d5027aa162f
6
+ metadata.gz: fe747eb5f52a9179c15a69340c23a8e5f6c04cc7eb97543bfc47112ca46b256aa1c98c43a1c99677c6c452d2f31422ac4849fc5e24ba68fbc41ce48280f126fc
7
+ data.tar.gz: 3c60dd852dec4e77683acf836358a60feb1dd51d7f86598faf83faede04e2c57a03eb4d99aad0b644ead2f5909f32eec728a844ed65eda1501417af759bda19a
@@ -1,14 +1,14 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- relaton-itu (0.3.2)
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.6.0)
11
- public_suffix (>= 2.0.2, < 4.0)
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 (3.1.1)
36
+ public_suffix (4.0.1)
37
37
  rake (10.5.0)
38
- relaton-bib (0.3.5)
38
+ relaton-bib (0.3.6)
39
39
  addressable
40
- nokogiri (~> 1.10)
41
- relaton-iso-bib (0.3.4)
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)
@@ -1,10 +1,10 @@
1
1
  require "relaton_itu/version"
2
2
  require "relaton_itu/itu_bibliography"
3
3
 
4
- if defined? Relaton
5
- require_relative "relaton/processor"
6
- Relaton::Registry.instance.register(Relaton::RelatonItu::Processor)
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
@@ -1,3 +1,3 @@
1
1
  module RelatonItu
2
- VERSION = "0.3.2".freeze
2
+ VERSION = "0.3.3".freeze
3
3
  end
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.2
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-08-20 00:00:00.000000000 Z
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
@@ -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