relaton-iec 1.7.7 → 1.7.8
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 +4 -4
- data/README.adoc +13 -0
- data/lib/relaton_iec/iec_bibliographic_item.rb +7 -0
- data/lib/relaton_iec/processor.rb +1 -2
- data/lib/relaton_iec/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: fbb0f0c060c611ed09b0bfb72313ebc933dce55cd7ea5063e55e4329e683d4ea
|
4
|
+
data.tar.gz: 05b97bda3a0f1815beda4437248434b26e539e52905b53e724d1dbbeedb1e890
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 637d0b99821d7a2ec94b853064cb7958028e79a3855524707677ebc711879713f3d4ef34d6df699d5f3c9b1b3644f11edf342b6e9baaaa90deea6be53478e183
|
7
|
+
data.tar.gz: d3e445689acae837e55f7b92fb95cb52a97afa23813d908d3bf41b8e82a77077e55d67bf51b181590d9b2c883e958ccdf07047cff6436404aa735537ffa78ce2
|
data/README.adoc
CHANGED
@@ -184,6 +184,19 @@ item.to_xml note: [{ text: "Note", type: "note" }]
|
|
184
184
|
</bibitem>"
|
185
185
|
----
|
186
186
|
|
187
|
+
=== Create bibliography item from hash
|
188
|
+
|
189
|
+
[source,ruby]
|
190
|
+
----
|
191
|
+
hash = YAML.load_file "spec/examples/hit.yaml"
|
192
|
+
=> {"id"=>"IEC61058-2-4-1995+AMD1-2003CSV",
|
193
|
+
...
|
194
|
+
|
195
|
+
RelatonIec::IecBibliographicItem.from_hash hash
|
196
|
+
=> #<RelatonIec::IecBibliographicItem:0x00007fe16f032d40
|
197
|
+
...
|
198
|
+
----
|
199
|
+
|
187
200
|
=== Converting reference to URN
|
188
201
|
|
189
202
|
URN is document a identifier format. It has fields delimited by colon. If any field is absent then it's place is empty. All values are in lower-case.
|
@@ -5,5 +5,12 @@ module RelatonIec
|
|
5
5
|
publicly-available-specification international-workshop-agreement
|
6
6
|
guide
|
7
7
|
].freeze
|
8
|
+
|
9
|
+
# @param hash [Hash]
|
10
|
+
# @return [RelatonIsoBib::IecBibliographicItem]
|
11
|
+
def self.from_hash(hash)
|
12
|
+
item_hash = ::RelatonIec::HashConverter.hash_to_bib(hash)
|
13
|
+
new **item_hash
|
14
|
+
end
|
8
15
|
end
|
9
16
|
end
|
@@ -26,8 +26,7 @@ module RelatonIec
|
|
26
26
|
# @param hash [Hash]
|
27
27
|
# @return [RelatonIsoBib::IecBibliographicItem]
|
28
28
|
def hash_to_bib(hash)
|
29
|
-
|
30
|
-
::RelatonIec::IecBibliographicItem.new item_hash
|
29
|
+
::RelatonIec::IecBibliographicItem.from_hash hash
|
31
30
|
end
|
32
31
|
|
33
32
|
# Returns hash of XML grammar
|
data/lib/relaton_iec/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: relaton-iec
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.7.
|
4
|
+
version: 1.7.8
|
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
|