relaton-gb 1.7.1 → 1.7.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.adoc +1 -5
- data/lib/relaton_gb/gb_bibliographic_item.rb +7 -0
- data/lib/relaton_gb/processor.rb +1 -2
- data/lib/relaton_gb/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7ac8b9933487805e76e9a8f6b6665bb9676d20a2db80ea40ccca2c5e2adda200
|
4
|
+
data.tar.gz: fbafee3ab69c7f5f39eb902e6378d185b80aa187c8a737f87b38d280db77da3d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d3f8fc4e6f4b4bd50c8c4f6f744e2b48b7b26d13855135a3198254c245fe1d7004932e3d77edb00a7c67a80a2bc058d256cbb6694c55caf79bbe815488568e8e
|
7
|
+
data.tar.gz: d55ce1c07766a9a1d80b116aeff2c0efedbf161afbc8ae47bcafc47f3db0a2ec68660239b8449aba15157a5eecb3f4ed3a94364a30c636aaf000b26319b64d09
|
data/README.adoc
CHANGED
@@ -100,11 +100,7 @@ hash = YAML.load_file 'spec/examples/gb_bib_item.yml'
|
|
100
100
|
=> {"id"=>"JB/T13368",
|
101
101
|
...
|
102
102
|
|
103
|
-
|
104
|
-
=> {:id=>"JB/T13368",
|
105
|
-
...
|
106
|
-
|
107
|
-
RelatonGb::GbBibliographicItem.new bib_hash
|
103
|
+
RelatonGb::GbBibliographicItem.from_hash hash
|
108
104
|
=> <RelatonGb::GbBibliographicItem:0x007fc680802700>
|
109
105
|
----
|
110
106
|
|
@@ -38,6 +38,13 @@ module RelatonGb
|
|
38
38
|
structuredidentifier&.project_number
|
39
39
|
end
|
40
40
|
|
41
|
+
# @param hash [Hash]
|
42
|
+
# @return [RelatonGb::GbBibliographicItem]
|
43
|
+
def self.from_hash(hash)
|
44
|
+
item_hash = ::RelatonGb::HashConverter.hash_to_bib(hash)
|
45
|
+
new **item_hash
|
46
|
+
end
|
47
|
+
|
41
48
|
# @param opts [Hash]
|
42
49
|
# @option opts [Nokogiri::XML::Builder] :builder XML builder
|
43
50
|
# @option opts [Boolean] :bibdata
|
data/lib/relaton_gb/processor.rb
CHANGED
@@ -28,8 +28,7 @@ module RelatonGb
|
|
28
28
|
# @param hash [Hash]
|
29
29
|
# @return [RelatonGb::GbBibliographicItem]
|
30
30
|
def hash_to_bib(hash)
|
31
|
-
|
32
|
-
::RelatonGb::GbBibliographicItem.new item_hash
|
31
|
+
::RelatonGb::GbBibliographicItem.new hash
|
33
32
|
end
|
34
33
|
|
35
34
|
# Returns hash of XML grammar
|
data/lib/relaton_gb/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: relaton-gb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.7.
|
4
|
+
version: 1.7.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-03-
|
11
|
+
date: 2021-03-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: equivalent-xml
|