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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e0530904a05044b494f2201804192f271cb2e74a08de8896119ae52867fee775
4
- data.tar.gz: '08817d6f72628b6503d5536f236be59c47266136767e70ed0522ef3168dd916b'
3
+ metadata.gz: 9e92b840207550a2f9a1d8f9ec25ba318961ebddcfa6e8a2a19b48ff531d9454
4
+ data.tar.gz: c137f99cd4b3c48688a2b6c53be14fd0f6496028288f97b536d296a61f0b77ea
5
5
  SHA512:
6
- metadata.gz: 84edf40ecd9cf391548640708f9c21d32628ad8c409054b30c749f0fd266ebd6d30ee707d7fd007d7516bbf2eec156982e73b898a0db531cedd5f85848f982ae
7
- data.tar.gz: d20fd413254c6b073f659fb4cce1cc4278503b7e7ac20f99a35a69f53803a543e5e9aa488d5f603175220c8e604163a4e2072eb5e243e74dadfa9db103a9865e
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.docidentifier }}
11
+ {{ document.docid.id }}
12
12
  {% else %}
13
- <a href="{{ document.html }}">{{ document.docidentifier }}</a>
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.doctype | downcase | split: " " | join: "-" }}">
20
- {{ document.doctype }}
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">
@@ -1,5 +1,5 @@
1
1
  module Relaton
2
2
  module Cli
3
- VERSION = "0.8.5".freeze
3
+ VERSION = "0.8.6".freeze
4
4
  end
5
5
  end
@@ -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
- if key == "title" && value.is_a?(Array)
66
- title = value.detect { |t| t["type"] == "main" } || value.first
67
- v = title ? title["content"] : nil
68
- elsif key == "title" && value.is_a?(Hash)
69
- v = value["content"]
70
- else
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
@@ -16,8 +16,8 @@
16
16
  </div>
17
17
 
18
18
  <div class="doc-type-wrap">
19
- <div class="doc-type {{ document.doctype | downcase | split: " " | join: "-" }}">
20
- {{ document.doctype }}
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">
@@ -757,7 +757,7 @@ body.container {
757
757
  }
758
758
 
759
759
  .doc-line {
760
- padding-top: 1em;
760
+ padding-top: 2em;
761
761
  }
762
762
 
763
763
  .doc-line:after {
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.5
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-14 00:00:00.000000000 Z
11
+ date: 2020-03-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake