relaton-cli 0.8.3 → 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/relaton/bibcollection.rb +0 -1
- data/lib/relaton/bibdata.rb +1 -1
- 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 -5
- data/relaton-cli.gemspec +6 -6
- data/templates/_document.liquid +6 -6
- data/templates/index-style.css +1 -1
- metadata +46 -46
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2b5ed5ee23cfdb909f597d54b0b79588eb229f4ec3801f77b4a5eafc9da583fb
|
4
|
+
data.tar.gz: 1410ee321bd05dfe6263e89f35835b748724dc4a209d95404b2aa7205a7f5719
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a3199375c9004358be4ebde9be0595c6aa4230e33d5f67aefb22583035d429a385c38a2e8088ddebf617d6cad7b3cf14b95c3609fddd25bd104410ce28a23f2a
|
7
|
+
data.tar.gz: f4372b8f7b815999d897d9706e77a86d86b728c0e86eef671f4c54fa4b007875a3a0ef9f96c31820814907d3b723b7b904e67f87e53e8fefdb66e6fa11118c97
|
data/lib/relaton/bibdata.rb
CHANGED
@@ -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,11 +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
|
-
|
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
|
70
79
|
end
|
71
80
|
[key.to_s, empty2nil(v)]
|
72
81
|
end.to_h
|
data/relaton-cli.gemspec
CHANGED
@@ -23,19 +23,19 @@ Gem::Specification.new do |spec|
|
|
23
23
|
spec.require_paths = ["lib"]
|
24
24
|
spec.required_ruby_version = ">= 2.4.0"
|
25
25
|
|
26
|
+
spec.add_development_dependency "byebug", "~> 10.0"
|
27
|
+
spec.add_development_dependency "debase"
|
28
|
+
spec.add_development_dependency "equivalent-xml", "~> 0.6"
|
29
|
+
spec.add_development_dependency "pry"
|
26
30
|
spec.add_development_dependency "rake", "~> 12.0"
|
27
31
|
spec.add_development_dependency "rspec", "~> 3.0"
|
28
|
-
spec.add_development_dependency "byebug", "~> 10.0"
|
29
32
|
spec.add_development_dependency "rspec-command", "~> 1.0.3"
|
30
|
-
spec.add_development_dependency "equivalent-xml", "~> 0.6"
|
31
33
|
spec.add_development_dependency "rspec-core", "~> 3.4"
|
32
|
-
spec.add_development_dependency "pry"
|
33
34
|
spec.add_development_dependency "ruby-debug-ide"
|
34
|
-
spec.add_development_dependency "debase"
|
35
35
|
spec.add_development_dependency "simplecov"
|
36
36
|
|
37
|
-
spec.add_runtime_dependency "relaton", "~> 0.10.0"
|
38
|
-
spec.add_runtime_dependency "thor"
|
39
37
|
spec.add_runtime_dependency "liquid"
|
38
|
+
spec.add_runtime_dependency "relaton", "~> 0.11.0"
|
39
|
+
spec.add_runtime_dependency "thor"
|
40
40
|
# spec.add_runtime_dependency 'byebug'
|
41
41
|
end
|
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,129 +1,129 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: relaton-cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.9.0
|
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-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: byebug
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '10.0'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '10.0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
28
|
+
name: debase
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - "
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
40
|
+
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
42
|
+
name: equivalent-xml
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
47
|
+
version: '0.6'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
54
|
+
version: '0.6'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
56
|
+
name: pry
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- - "
|
59
|
+
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version:
|
61
|
+
version: '0'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- - "
|
66
|
+
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version:
|
68
|
+
version: '0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
|
-
name:
|
70
|
+
name: rake
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
73
|
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: '0
|
75
|
+
version: '12.0'
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: '0
|
82
|
+
version: '12.0'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
|
-
name: rspec
|
84
|
+
name: rspec
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
87
|
- - "~>"
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: '3.
|
89
|
+
version: '3.0'
|
90
90
|
type: :development
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
94
|
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version: '3.
|
96
|
+
version: '3.0'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
|
-
name:
|
98
|
+
name: rspec-command
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
|
-
- - "
|
101
|
+
- - "~>"
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version:
|
103
|
+
version: 1.0.3
|
104
104
|
type: :development
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
|
-
- - "
|
108
|
+
- - "~>"
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version:
|
110
|
+
version: 1.0.3
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
|
-
name:
|
112
|
+
name: rspec-core
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
114
114
|
requirements:
|
115
|
-
- - "
|
115
|
+
- - "~>"
|
116
116
|
- !ruby/object:Gem::Version
|
117
|
-
version: '
|
117
|
+
version: '3.4'
|
118
118
|
type: :development
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
122
|
-
- - "
|
122
|
+
- - "~>"
|
123
123
|
- !ruby/object:Gem::Version
|
124
|
-
version: '
|
124
|
+
version: '3.4'
|
125
125
|
- !ruby/object:Gem::Dependency
|
126
|
-
name:
|
126
|
+
name: ruby-debug-ide
|
127
127
|
requirement: !ruby/object:Gem::Requirement
|
128
128
|
requirements:
|
129
129
|
- - ">="
|
@@ -151,35 +151,35 @@ dependencies:
|
|
151
151
|
- !ruby/object:Gem::Version
|
152
152
|
version: '0'
|
153
153
|
- !ruby/object:Gem::Dependency
|
154
|
-
name:
|
154
|
+
name: liquid
|
155
155
|
requirement: !ruby/object:Gem::Requirement
|
156
156
|
requirements:
|
157
|
-
- - "
|
157
|
+
- - ">="
|
158
158
|
- !ruby/object:Gem::Version
|
159
|
-
version: 0
|
159
|
+
version: '0'
|
160
160
|
type: :runtime
|
161
161
|
prerelease: false
|
162
162
|
version_requirements: !ruby/object:Gem::Requirement
|
163
163
|
requirements:
|
164
|
-
- - "
|
164
|
+
- - ">="
|
165
165
|
- !ruby/object:Gem::Version
|
166
|
-
version: 0
|
166
|
+
version: '0'
|
167
167
|
- !ruby/object:Gem::Dependency
|
168
|
-
name:
|
168
|
+
name: relaton
|
169
169
|
requirement: !ruby/object:Gem::Requirement
|
170
170
|
requirements:
|
171
|
-
- - "
|
171
|
+
- - "~>"
|
172
172
|
- !ruby/object:Gem::Version
|
173
|
-
version:
|
173
|
+
version: 0.11.0
|
174
174
|
type: :runtime
|
175
175
|
prerelease: false
|
176
176
|
version_requirements: !ruby/object:Gem::Requirement
|
177
177
|
requirements:
|
178
|
-
- - "
|
178
|
+
- - "~>"
|
179
179
|
- !ruby/object:Gem::Version
|
180
|
-
version:
|
180
|
+
version: 0.11.0
|
181
181
|
- !ruby/object:Gem::Dependency
|
182
|
-
name:
|
182
|
+
name: thor
|
183
183
|
requirement: !ruby/object:Gem::Requirement
|
184
184
|
requirements:
|
185
185
|
- - ">="
|