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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0e5741b3282cc4f2efc6ca3ff4d66439da7a24bf
4
- data.tar.gz: 6cbff1a777f5dc718ecba62b5db28ff839075c86
3
+ metadata.gz: 498358492168d51412ab66499322c88fc1b65ff8
4
+ data.tar.gz: 1468d4c7ece001819fb77fbd05aa6d335df9c5b5
5
5
  SHA512:
6
- metadata.gz: 396045532110d18e268077da989ed68570d7e3ec8c8d1c19eed52745d47a725a9ba83ef3807b5a099a9a4b8d5ee84bddedcb5ddbe3b8f5e0065fb26e8cc75109
7
- data.tar.gz: 141f7b0c7d6a99615f3aa2e63d816c50d9a6a3a2a566be4dd9777ce12ee62ada82cc101c70bcb9e405d4756e5bba5b43a69193ed842025e47fcab61629ec8b16
6
+ metadata.gz: 1abe5dd1c5bfe377e2ffb8808edb98e9a4c432eade5b5fad440ccddc66dbf2a32fd8dbb63a3eef0e726f72f6da499a8d83eca08879342184450023286e99fab8
7
+ data.tar.gz: c95583bdd31014ac405a080c4a5ed678d85fe13808c0a3df67aeb4f5e6fbfaf68cb93bccdb0f27fcc9f863231b9e090b0687432106daf8ec1d83e0892e5fd9b4
@@ -1,14 +1,14 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- relaton-ietf (0.6.3)
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.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)
@@ -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 (3.1.1)
35
+ public_suffix (4.0.1)
36
36
  rake (10.5.0)
37
- relaton-bib (0.3.5)
37
+ relaton-bib (0.3.6)
38
38
  addressable
39
- nokogiri (~> 1.10)
39
+ nokogiri
40
40
  rspec (3.8.0)
41
41
  rspec-core (~> 3.8.0)
42
42
  rspec-expectations (~> 3.8.0)
@@ -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
- require_relative "relaton/processor"
11
- Relaton::Registry.instance.register(Relaton::RelatonIetf::Processor)
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
@@ -1,3 +1,3 @@
1
1
  module RelatonIetf
2
- VERSION = "0.6.3".freeze
2
+ VERSION = "0.6.4".freeze
3
3
  end
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.3
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-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,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
@@ -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