relaton-cli 0.8.5 → 0.8.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/relaton/cli/_document.liquid +8 -8
- data/lib/relaton/cli/version.rb +1 -1
- data/lib/relaton/cli/xml_to_html_renderer.rb +14 -7
- data/templates/_document.liquid +6 -6
- data/templates/index-style.css +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: 9e92b840207550a2f9a1d8f9ec25ba318961ebddcfa6e8a2a19b48ff531d9454
|
4
|
+
data.tar.gz: c137f99cd4b3c48688a2b6c53be14fd0f6496028288f97b536d296a61f0b77ea
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3fb5300b2701b4fcca6c7da00a16ca3f58fa07e22c987e1b8a0757037fbd93c0b28e294b71454f7cd722196b26056ab3c22df2da8d6c26cf4177287217f71bd7
|
7
|
+
data.tar.gz: 93735d8cf0d650eb410e65f46999f3eafcd0b3de91a2a88c44be7cfeb07a4c5d830e3e979fd42d8abd75f60b5a1371cedae21fa72885cd1767f7317e92dd6441
|
@@ -8,16 +8,16 @@
|
|
8
8
|
<div class="doc-identifier">
|
9
9
|
<h{{ depth }}>
|
10
10
|
{% if document.html == "" %}
|
11
|
-
{{ document.
|
11
|
+
{{ document.docid.id }}
|
12
12
|
{% else %}
|
13
|
-
<a href="{{ document.html }}">{{ document.
|
13
|
+
<a href="{{ document.html }}">{{ document.docid.id }}</a>
|
14
14
|
{% endif %}
|
15
15
|
</h{{ depth }}>
|
16
16
|
</div>
|
17
17
|
|
18
18
|
<div class="doc-type-wrap">
|
19
|
-
<div class="doc-type {{ document.
|
20
|
-
{{ document.
|
19
|
+
<div class="doc-type {{ document.type | downcase | split: " " | join: "-" }}">
|
20
|
+
{{ document.type }}
|
21
21
|
</div>
|
22
22
|
</div>
|
23
23
|
</div>
|
@@ -32,12 +32,12 @@
|
|
32
32
|
</h{{ depth | plus: 1 }}>
|
33
33
|
</div>
|
34
34
|
|
35
|
-
<div class="doc-info {{ document.stage | downcase }}">
|
36
|
-
<div class="doc-stage {{ document.stage | downcase }}">
|
37
|
-
{{ document.stage }}
|
35
|
+
<div class="doc-info {{ document.docstatus.stage | downcase }}">
|
36
|
+
<div class="doc-stage {{ document.docstatus.stage | downcase }}">
|
37
|
+
{{ document.docstatus.stage }}
|
38
38
|
</div>
|
39
39
|
<div class="doc-dates">
|
40
|
-
{% unless document.stage == "published" %}
|
40
|
+
{% unless document.docstatus.stage == "published" %}
|
41
41
|
<div class="doc-updated">
|
42
42
|
{% else %}
|
43
43
|
<div class="doc-published">
|
data/lib/relaton/cli/version.rb
CHANGED
@@ -62,13 +62,20 @@ module Relaton::Cli
|
|
62
62
|
# TODO: This should be recursive, but it's not
|
63
63
|
def hash_to_liquid(hash)
|
64
64
|
hash.map do |key, value|
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
v = value
|
65
|
+
case key
|
66
|
+
when "title"
|
67
|
+
if value.is_a?(Array)
|
68
|
+
title = value.detect { |t| t["type"] == "main" } || value.first
|
69
|
+
v = title ? title["content"] : nil
|
70
|
+
elsif value.is_a?(Hash) then v = value["content"]
|
71
|
+
else v = value
|
72
|
+
end
|
73
|
+
when "docid"
|
74
|
+
if value.is_a?(Array)
|
75
|
+
v = value.detect { |did| did["id"] !~ /^(http|https):\/\// } || value.first
|
76
|
+
else v = value
|
77
|
+
end
|
78
|
+
else v = value
|
72
79
|
end
|
73
80
|
[key.to_s, empty2nil(v)]
|
74
81
|
end.to_h
|
data/templates/_document.liquid
CHANGED
@@ -16,8 +16,8 @@
|
|
16
16
|
</div>
|
17
17
|
|
18
18
|
<div class="doc-type-wrap">
|
19
|
-
<div class="doc-type {{ document.
|
20
|
-
{{ document.
|
19
|
+
<div class="doc-type {{ document.type | downcase | split: " " | join: "-" }}">
|
20
|
+
{{ document.type }}
|
21
21
|
</div>
|
22
22
|
</div>
|
23
23
|
</div>
|
@@ -32,12 +32,12 @@
|
|
32
32
|
</h{{ depth | plus: 1 }}>
|
33
33
|
</div>
|
34
34
|
|
35
|
-
<div class="doc-info {{ document.stage | downcase }}">
|
36
|
-
<div class="doc-stage {{ document.stage | downcase }}">
|
37
|
-
{{ document.stage }}
|
35
|
+
<div class="doc-info {{ document.docstatus.stage | downcase }}">
|
36
|
+
<div class="doc-stage {{ document.docstatus.stage | downcase }}">
|
37
|
+
{{ document.docstatus.stage }}
|
38
38
|
</div>
|
39
39
|
<div class="doc-dates">
|
40
|
-
{% unless document.stage == "published" %}
|
40
|
+
{% unless document.docstatus.stage == "published" %}
|
41
41
|
<div class="doc-updated">
|
42
42
|
{% else %}
|
43
43
|
<div class="doc-published">
|
data/templates/index-style.css
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: relaton-cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.6
|
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-03-
|
11
|
+
date: 2020-03-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|