relaton-render 0.9.0 → 0.9.1
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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 75575a57cbac1f7ce210b85d268a9823b40480a39450db3280d56f7957e61cc6
|
4
|
+
data.tar.gz: 70b154b648b4128289f6ba3756b6ab214e449616b68be983e3adb45ddb58ad70
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3895597474affcbe243087c895f2d98d75e705401b0fb686539bf11e37bc160906a8fe03f1481dd678b2378464b77493e8995bdd59b4f40ee366f12e8649e3dd
|
7
|
+
data.tar.gz: 3ab8323c45c199cb25490a7c7eadf0208d82acb0d5457f4c6df8b37dc81ebf50647745cc759110f242a2a7b683ba384954bcacdf0024be69ddb2896523cfa6b1
|
@@ -128,13 +128,15 @@ module Relaton
|
|
128
128
|
end
|
129
129
|
|
130
130
|
def extentformat(extent, hash)
|
131
|
-
extent.map do |
|
131
|
+
extent.map do |stack|
|
132
|
+
stack.map do |e|
|
132
133
|
e1 = e.transform_values { |v| v.is_a?(Hash) ? range(v) : v }
|
133
134
|
ret = e.each_with_object({}) do |(k, v), m|
|
134
135
|
extentformat1(k, v, m, e1)
|
135
136
|
m
|
136
137
|
end
|
137
138
|
@r.extenttemplate.render(hash.merge(ret))
|
139
|
+
end.join(" ")
|
138
140
|
end.join("; ")
|
139
141
|
end
|
140
142
|
|
@@ -5,6 +5,8 @@ module Relaton
|
|
5
5
|
node.nil? and return node
|
6
6
|
node.content.is_a?(Array) and return node.content.map { |x| content(x) }
|
7
7
|
node.content.strip
|
8
|
+
#node.children.map { |n| n.text? ? n.content : n.to_xml }.join
|
9
|
+
#node.text? ? node.content.strip : node.to_xml.strip
|
8
10
|
end
|
9
11
|
|
10
12
|
def extract_orgname(org)
|
@@ -141,13 +141,15 @@ module Relaton
|
|
141
141
|
doc.extent.each_with_object([]) do |e, acc|
|
142
142
|
case e
|
143
143
|
when RelatonBib::Extent, RelatonBib::LocalityStack
|
144
|
-
e.locality.
|
144
|
+
a = e.locality.each_with_object([]) do |e1, m|
|
145
145
|
if e1.is_a?(RelatonBib::LocalityStack)
|
146
|
-
|
146
|
+
m << extent1(e1.locality)
|
147
147
|
else
|
148
|
-
|
148
|
+
m.empty? and m << {}
|
149
|
+
m[-1].merge!(extent1(Array(e1)))
|
149
150
|
end
|
150
151
|
end
|
152
|
+
acc << a
|
151
153
|
when RelatonBib::Locality
|
152
154
|
acc << extent1(Array(e))
|
153
155
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: relaton-render
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-12-
|
11
|
+
date: 2024-12-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|