relaton-omg 1.1.0 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/grammars/biblio.rng +1 -1
- data/lib/relaton_omg/omg_bibliographic_item.rb +1 -2
- data/lib/relaton_omg/version.rb +1 -1
- data/lib/relaton_omg/xml_parser.rb +12 -17
- data/relaton_omg.gemspec +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 95358cd97eb5e57d89796cd576823870ba14b90170e41c4e55049bd6f9e882e6
|
4
|
+
data.tar.gz: 303a67358ba69844fda736dbac7c9f3371fad5e628c8c96e57d6c410bbd007bd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4ead4e445761222bf23d930c847312fc1b201cbe6d6341ef46095e28c266a622da7870502662d906d02dfd43dc00902984ffd27ac9d0dc0fc48130ca9d26f139
|
7
|
+
data.tar.gz: a978285aee9841457e723ce83055b35e83b2dc1b42ae5381e709061fe6b48ecaddbdb6dd1627af5fa2a030f5cb9ccc4bc94670ad83c3e3a878e7cbd6c2f4b8e3
|
data/grammars/biblio.rng
CHANGED
@@ -532,7 +532,7 @@
|
|
532
532
|
</define>
|
533
533
|
<define name="LocalityType">
|
534
534
|
<data type="string">
|
535
|
-
<param name="pattern">section|clause|part|paragraph|chapter|page|whole|table|annex|figure|note|list|example|volume|issue|time|locality:[a-zA-Z0-9_]+</param>
|
535
|
+
<param name="pattern">section|clause|part|paragraph|chapter|page|whole|table|annex|figure|note|list|example|volume|issue|time|anchor|locality:[a-zA-Z0-9_]+</param>
|
536
536
|
</data>
|
537
537
|
</define>
|
538
538
|
<define name="referenceFrom">
|
data/lib/relaton_omg/version.rb
CHANGED
@@ -3,26 +3,21 @@ require "nokogiri"
|
|
3
3
|
module RelatonOmg
|
4
4
|
class XMLParser < RelatonBib::XMLParser
|
5
5
|
class << self
|
6
|
-
def from_xml(xml)
|
7
|
-
doc = Nokogiri::XML(xml)
|
8
|
-
doc.remove_namespaces!
|
9
|
-
item = doc.at("/bibitem|/bibdata")
|
10
|
-
if item
|
11
|
-
RelatonOmg::OmgBibliographicItem.new(item_data(item))
|
12
|
-
else
|
13
|
-
warn "[relato-omg] can't find bibitem or bibdata element in the XML"
|
14
|
-
end
|
15
|
-
end
|
16
|
-
|
17
6
|
private
|
18
7
|
|
19
|
-
def item_data(ietfitem)
|
20
|
-
|
21
|
-
|
22
|
-
|
8
|
+
# def item_data(ietfitem)
|
9
|
+
# data = super
|
10
|
+
# ext = ietfitem.at "./ext"
|
11
|
+
# return data unless ext
|
12
|
+
|
13
|
+
# data[:doctype] = ext.at("./doctype")&.text
|
14
|
+
# data
|
15
|
+
# end
|
23
16
|
|
24
|
-
|
25
|
-
|
17
|
+
# @param item_hash [Hash]
|
18
|
+
# @return [RelatonOmg::OmgBibliographicItem]
|
19
|
+
def bib_item(item_hash)
|
20
|
+
OmgBibliographicItem.new item_hash
|
26
21
|
end
|
27
22
|
end
|
28
23
|
end
|
data/relaton_omg.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: relaton-omg
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-06-
|
11
|
+
date: 2020-06-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: byebug
|
@@ -156,14 +156,14 @@ dependencies:
|
|
156
156
|
requirements:
|
157
157
|
- - "~>"
|
158
158
|
- !ruby/object:Gem::Version
|
159
|
-
version: 1.
|
159
|
+
version: 1.2.0
|
160
160
|
type: :runtime
|
161
161
|
prerelease: false
|
162
162
|
version_requirements: !ruby/object:Gem::Requirement
|
163
163
|
requirements:
|
164
164
|
- - "~>"
|
165
165
|
- !ruby/object:Gem::Version
|
166
|
-
version: 1.
|
166
|
+
version: 1.2.0
|
167
167
|
description: 'RelatonOmg: retrieve OMG Standards for bibliographic using the IsoBibliographicItem
|
168
168
|
model'
|
169
169
|
email:
|