relaton-iana 1.13.1 → 1.14.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/rake.yml +0 -1
- data/README.adoc +23 -35
- data/grammars/basicdoc.rng +3 -27
- data/grammars/biblio-standoc.rng +164 -0
- data/grammars/biblio.rng +82 -19
- data/grammars/relaton-iana-compile.rng +11 -0
- data/grammars/relaton-iana.rng +4 -0
- data/lib/relaton_iana/data_fetcher.rb +3 -2
- data/lib/relaton_iana/hash_converter.rb +9 -0
- data/lib/relaton_iana/iana_bibliographic_item.rb +8 -0
- data/lib/relaton_iana/iana_bibliography.rb +4 -3
- data/lib/relaton_iana/parser.rb +3 -3
- data/lib/relaton_iana/processor.rb +6 -6
- data/lib/relaton_iana/version.rb +1 -1
- data/lib/relaton_iana/xml_parser.rb +9 -0
- data/lib/relaton_iana.rb +4 -0
- data/relaton_iana.gemspec +2 -1
- metadata +27 -10
- data/grammars/isodoc.rng +0 -2807
- data/grammars/reqt.rng +0 -223
@@ -15,7 +15,7 @@ module RelatonIana
|
|
15
15
|
# @param code [String]
|
16
16
|
# @param date [String, NilClass] year
|
17
17
|
# @param opts [Hash]
|
18
|
-
# @return [
|
18
|
+
# @return [RelatonIana::IanaBibliographicItem]
|
19
19
|
def get(code, date, opts)
|
20
20
|
::RelatonIana::IanaBibliography.get(code, date, opts)
|
21
21
|
end
|
@@ -33,16 +33,16 @@ module RelatonIana
|
|
33
33
|
end
|
34
34
|
|
35
35
|
# @param xml [String]
|
36
|
-
# @return [
|
36
|
+
# @return [RelatonIana::IanaBibliographicItem]
|
37
37
|
def from_xml(xml)
|
38
|
-
::
|
38
|
+
::RelatonIana::XMLParser.from_xml xml
|
39
39
|
end
|
40
40
|
|
41
41
|
# @param hash [Hash]
|
42
|
-
# @return [RelatonIana::
|
42
|
+
# @return [RelatonIana::IanaBibliographicItem]
|
43
43
|
def hash_to_bib(hash)
|
44
|
-
item_hash = ::
|
45
|
-
::
|
44
|
+
item_hash = ::RelatonIana::HashConverter.hash_to_bib(hash)
|
45
|
+
::RelatonIana::IanaBibliographicItem.new(**item_hash)
|
46
46
|
end
|
47
47
|
|
48
48
|
# Returns hash of XML grammar
|
data/lib/relaton_iana/version.rb
CHANGED
data/lib/relaton_iana.rb
CHANGED
@@ -1,8 +1,12 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require "faraday"
|
4
|
+
require "jing"
|
4
5
|
require "relaton_bib"
|
5
6
|
require_relative "relaton_iana/version"
|
7
|
+
require_relative "relaton_iana/iana_bibliographic_item"
|
8
|
+
require_relative "relaton_iana/xml_parser"
|
9
|
+
require_relative "relaton_iana/hash_converter"
|
6
10
|
require_relative "relaton_iana/iana_bibliography"
|
7
11
|
require_relative "relaton_iana/parser"
|
8
12
|
require_relative "relaton_iana/data_fetcher"
|
data/relaton_iana.gemspec
CHANGED
@@ -39,7 +39,8 @@ Gem::Specification.new do |spec|
|
|
39
39
|
spec.add_development_dependency "webmock"
|
40
40
|
|
41
41
|
spec.add_dependency "faraday", "~> 1.0"
|
42
|
-
spec.add_dependency "relaton-bib", "~> 1.
|
42
|
+
spec.add_dependency "relaton-bib", "~> 1.14.0"
|
43
|
+
spec.add_dependency "ruby-jing"
|
43
44
|
|
44
45
|
# Uncomment to register a new dependency of your gem
|
45
46
|
# spec.add_dependency "example-gem", "~> 1.0"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: relaton-iana
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.14.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-12-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: equivalent-xml
|
@@ -142,14 +142,28 @@ dependencies:
|
|
142
142
|
requirements:
|
143
143
|
- - "~>"
|
144
144
|
- !ruby/object:Gem::Version
|
145
|
-
version: 1.
|
145
|
+
version: 1.14.0
|
146
146
|
type: :runtime
|
147
147
|
prerelease: false
|
148
148
|
version_requirements: !ruby/object:Gem::Requirement
|
149
149
|
requirements:
|
150
150
|
- - "~>"
|
151
151
|
- !ruby/object:Gem::Version
|
152
|
-
version: 1.
|
152
|
+
version: 1.14.0
|
153
|
+
- !ruby/object:Gem::Dependency
|
154
|
+
name: ruby-jing
|
155
|
+
requirement: !ruby/object:Gem::Requirement
|
156
|
+
requirements:
|
157
|
+
- - ">="
|
158
|
+
- !ruby/object:Gem::Version
|
159
|
+
version: '0'
|
160
|
+
type: :runtime
|
161
|
+
prerelease: false
|
162
|
+
version_requirements: !ruby/object:Gem::Requirement
|
163
|
+
requirements:
|
164
|
+
- - ">="
|
165
|
+
- !ruby/object:Gem::Version
|
166
|
+
version: '0'
|
153
167
|
description: 'RelatonIana: Ruby XMLDOC impementation.'
|
154
168
|
email:
|
155
169
|
- open.source@ribose.com
|
@@ -170,23 +184,26 @@ files:
|
|
170
184
|
- bin/rspec
|
171
185
|
- bin/setup
|
172
186
|
- grammars/basicdoc.rng
|
187
|
+
- grammars/biblio-standoc.rng
|
173
188
|
- grammars/biblio.rng
|
174
|
-
- grammars/
|
175
|
-
- grammars/
|
189
|
+
- grammars/relaton-iana-compile.rng
|
190
|
+
- grammars/relaton-iana.rng
|
176
191
|
- lib/relaton_iana.rb
|
177
192
|
- lib/relaton_iana/data_fetcher.rb
|
193
|
+
- lib/relaton_iana/hash_converter.rb
|
178
194
|
- lib/relaton_iana/iana_bibliographic_item.rb
|
179
195
|
- lib/relaton_iana/iana_bibliography.rb
|
180
196
|
- lib/relaton_iana/parser.rb
|
181
197
|
- lib/relaton_iana/processor.rb
|
182
198
|
- lib/relaton_iana/version.rb
|
199
|
+
- lib/relaton_iana/xml_parser.rb
|
183
200
|
- relaton_iana.gemspec
|
184
201
|
homepage: https://github.com/relaton/relaton-iana
|
185
202
|
licenses:
|
186
203
|
- BSD-2-Clause
|
187
204
|
metadata:
|
188
205
|
homepage_uri: https://github.com/relaton/relaton-iana
|
189
|
-
post_install_message:
|
206
|
+
post_install_message:
|
190
207
|
rdoc_options: []
|
191
208
|
require_paths:
|
192
209
|
- lib
|
@@ -201,8 +218,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
201
218
|
- !ruby/object:Gem::Version
|
202
219
|
version: '0'
|
203
220
|
requirements: []
|
204
|
-
rubygems_version: 3.
|
205
|
-
signing_key:
|
221
|
+
rubygems_version: 3.1.6
|
222
|
+
signing_key:
|
206
223
|
specification_version: 4
|
207
224
|
summary: 'RelatonIana: Ruby XMLDOC impementation.'
|
208
225
|
test_files: []
|