relaton-cli 1.0.2 → 1.0.3

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: 4eec2ad64bffc0852186a6c9554f4afd5ed82af1c601859d9cb23074c9d8519a
4
- data.tar.gz: cc584c653dcfba62a34c37c1b3a61036f250e2ed93b74fbf8ec0837c18b39d19
3
+ metadata.gz: 16b5a3f358edc1189c465b49ab39cedd855bd56ef81fee0df6df25444220450b
4
+ data.tar.gz: e27622fd9f4ce48b65ad28961d5a4ba5cb53af156c75687998f063afa94b7d1d
5
5
  SHA512:
6
- metadata.gz: ac2cf3134f6b27ecdb5f17d895b2b25d61b568b7fc041aa0ac90cb3012612a54f7009ae87e1874b975094603c3ad8fb312cb68de7d0e950192bbddba5bc75c96
7
- data.tar.gz: dda1a006e2987834f670173c2c5cfb8c78f5673308b68a8644f4e6acfc212b74e1724aedc56310de83d86977f18657ab42d16d776b39922d33015c66e58535a8
6
+ metadata.gz: 6c2259ae711ff3bb4045a86ef0efda7466936a361e31be99ec5519c7847a75096e3c4fdede5b724d17ba8abcfc7fb30a3b2953e473b9c2a822eab8b57fa84eb0
7
+ data.tar.gz: c6196fb95511bd2c49dec98a3da7848ad3359c80d8278f9eb2a3c103e10d7256511f2fd046b7fb98173bc6deeef3bc7aa0c25f63de2f22125c336b6bb8698d05
@@ -73,16 +73,7 @@ module Relaton
73
73
  Relaton::Cli::XMLConvertor.to_html(file, style, template)
74
74
  end
75
75
 
76
- # desc "yaml2html RELATON-INDEX-YAML", "Concatenate Relaton Collection YAML into HTML"
77
- # option :stylesheet, aliases: :s, desc: "Stylesheet file path for rendering HTML index"
78
- # option :templatedir, aliases: :t, desc: "Liquid template directory for rendering Relaton items and collection"
79
- # option :overwrite, aliases: :f, type: :boolean, default: false, desc: "Overwrite the existing file"
80
-
81
- # def yaml2html(file, style = nil, template = nil)
82
- # Relaton::Cli::YAMLConvertor.to_html(file, style, template)
83
- # end
84
-
85
- desc "yaml2htmlnew RELATON-INDEX-YAML", "Concatenate Relaton Collection YAML into HTML"
76
+ desc "yaml2html RELATON-INDEX-YAML", "Concatenate Relaton Collection YAML into HTML"
86
77
  option :stylesheet, aliases: :s, desc: "Stylesheet file path for rendering HTML index"
87
78
  option :templatedir, aliases: :t, desc: "Liquid template directory for rendering Relaton items and collection"
88
79
  option :overwrite, aliases: :f, type: :boolean, default: false, desc: "Overwrite the existing file"
@@ -1,5 +1,5 @@
1
1
  module Relaton
2
2
  module Cli
3
- VERSION = "1.0.2".freeze
3
+ VERSION = "1.0.3".freeze
4
4
  end
5
5
  end
@@ -13,7 +13,7 @@ module Relaton::Cli
13
13
  def render(index_xml)
14
14
  Liquid::Template.
15
15
  parse(template).
16
- render(build_liquid_document(index_xml), { strict_variables: true })
16
+ render(build_liquid_document(index_xml))
17
17
  end
18
18
 
19
19
  def uri_for_extension(uri, extension)
data/relaton-cli.gemspec CHANGED
@@ -34,7 +34,7 @@ Gem::Specification.new do |spec|
34
34
  spec.add_development_dependency "simplecov"
35
35
 
36
36
  spec.add_runtime_dependency "liquid"
37
- spec.add_runtime_dependency "relaton", "~> 1.0.0"
37
+ spec.add_runtime_dependency "relaton", ">= 1.0.3"
38
38
  spec.add_runtime_dependency "thor"
39
39
  # spec.add_runtime_dependency 'byebug'
40
40
  end
@@ -32,12 +32,17 @@
32
32
  </h{{ depth | plus: 1 }}>
33
33
  </div>
34
34
 
35
- <div class="doc-info {{ document.docstatus.stage | downcase }}">
36
- <div class="doc-stage {{ document.docstatus.stage | downcase }}">
37
- {{ document.docstatus.stage }}
35
+ <div class="doc-info {{ document.docstatus.stage.value | downcase }}">
36
+ <div class="doc-stage {{ document.docstatus.stage.value | downcase }}">
37
+ {{ document.docstatus.stage.abbreviation }}
38
+ {% if document.docstatus.substage %}
39
+ {{ document.docstatus.stage.value }}.{{ document.docstatus.substage.value }}
40
+ {% else %}
41
+ {{ document.docstatus.stage.value }}
42
+ {% endif %}
38
43
  </div>
39
44
  <div class="doc-dates">
40
- {% unless document.docstatus.stage == "published" %}
45
+ {% unless document.docstatus.stage.value == "published" %}
41
46
  <div class="doc-updated">
42
47
  {% else %}
43
48
  <div class="doc-published">
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: 1.0.2
4
+ version: 1.0.3
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-05-15 00:00:00.000000000 Z
11
+ date: 2020-05-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: byebug
@@ -168,16 +168,16 @@ dependencies:
168
168
  name: relaton
169
169
  requirement: !ruby/object:Gem::Requirement
170
170
  requirements:
171
- - - "~>"
171
+ - - ">="
172
172
  - !ruby/object:Gem::Version
173
- version: 1.0.0
173
+ version: 1.0.3
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: 1.0.0
180
+ version: 1.0.3
181
181
  - !ruby/object:Gem::Dependency
182
182
  name: thor
183
183
  requirement: !ruby/object:Gem::Requirement
@@ -223,8 +223,6 @@ files:
223
223
  - lib/relaton/bibcollection.rb
224
224
  - lib/relaton/bibdata.rb
225
225
  - lib/relaton/cli.rb
226
- - lib/relaton/cli/_document.liquid
227
- - lib/relaton/cli/_index.liquid
228
226
  - lib/relaton/cli/base_convertor.rb
229
227
  - lib/relaton/cli/command.rb
230
228
  - lib/relaton/cli/relaton_file.rb
@@ -1,82 +0,0 @@
1
- {%- if document.items.size > 0 -%}
2
- <div class="doc-section">
3
- {%- else -%}
4
- <div class="document">
5
- {%- endif -%}
6
-
7
- <div class="doc-line">
8
- <div class="doc-identifier">
9
- <h{{ depth }}>
10
- {% if document.html == "" %}
11
- {{ document.docid.id }}
12
- {% else %}
13
- <a href="{{ document.html }}">{{ document.docid.id }}</a>
14
- {% endif %}
15
- </h{{ depth }}>
16
- </div>
17
-
18
- <div class="doc-type-wrap">
19
- <div class="doc-type {{ document.type | downcase | split: " " | join: "-" }}">
20
- {{ document.type }}
21
- </div>
22
- </div>
23
- </div>
24
-
25
- <div class="doc-title">
26
- <h{{ depth | plus: 1 }}>
27
- {% if document.html == blank or document.html == nil %}
28
- {{ document.title }}
29
- {% else %}
30
- <a href="{{ document.html }}">{{ document.title }}</a>
31
- {% endif %}
32
- </h{{ depth | plus: 1 }}>
33
- </div>
34
-
35
- <div class="doc-info {{ document.docstatus.stage | downcase }}">
36
- <div class="doc-stage {{ document.docstatus.stage | downcase }}">
37
- {{ document.docstatus.stage }}
38
- </div>
39
- <div class="doc-dates">
40
- {% unless document.docstatus.stage == "published" %}
41
- <div class="doc-updated">
42
- {% else %}
43
- <div class="doc-published">
44
- {% endunless %}
45
- {{ document.revdate }}
46
- </div>
47
- </div>
48
- </div>
49
-
50
- <div class="doc-bib">
51
- <div class="doc-bib-relaton">
52
- <a href="{{ document.relaton }}">Relaton XML</a>
53
- </div>
54
- </div>
55
-
56
- <div class="doc-access">
57
- {% unless document.html == blank or document.html == nil %}
58
- <div class="doc-access-button-html">
59
- <a href="{{ document.html }}">HTML</a>
60
- </div>
61
- {% endunless %}
62
- {% unless document.pdf == blank or document.pdf == nil %}
63
- <div class="doc-access-button-pdf">
64
- <a href="{{ document.pdf }}">PDF</a>
65
- </div>
66
- {% endunless %}
67
- {% unless document.doc == blank or document.doc == nil %}
68
- <div class="doc-access-button-doc">
69
- <a href="{{ document.doc }}">Word</a>
70
- </div>
71
- {% endunless %}
72
- {% unless document.xml == blank or document.xml == nil %}
73
- <div class="doc-access-button-xml">
74
- <a href="{{ document.xml }}">XML</a>
75
- </div>
76
- {% endunless %}
77
- </div>
78
- </div>
79
-
80
- {%- if document.items.size > 0 -%}
81
- {%- include 'document' for document.items -%}
82
- {%- endif -%}
@@ -1,53 +0,0 @@
1
- <!DOCTYPE HTML>
2
- <html>
3
- <head>
4
- <title>{{ title }}</title>
5
- <style>
6
- <!--
7
- {{ css }}
8
- -->
9
- </style>
10
- <meta http-equiv="Content-Type" content="text/html" charset="utf-8"/>
11
- <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js" type="text/javascript"></script>
12
- <script src="https://cdn.rawgit.com/jgallen23/toc/0.3.2/dist/toc.min.js" type="text/javascript"></script>
13
- <link href="https://fonts.googleapis.com/css?family=Open+Sans:300,300i,400,400i,600,600i|Space+Mono:400,700|Overpass:300,300i,600,900|Ek+Mukta:200" rel="stylesheet" type="text/css"/>
14
- <link href="https://use.fontawesome.com/releases/v5.0.8/css/solid.css" integrity="sha384-v2Tw72dyUXeU3y4aM2Y0tBJQkGfplr39mxZqlTBDUZAb9BGoC40+rdFCG0m10lXk" crossorigin="anonymous"/>
15
- <link href="https://use.fontawesome.com/releases/v5.0.8/css/fontawesome.css" integrity="sha384-q3jl8XQu1OpdLgGFvNRnPdj5VIlCvgsDQTQB6owSOHWlAurxul7f+JpUOVdAiJ5P" crossorigin="anonymous"/>
16
- </head>
17
- <body>
18
- <header>
19
- <div id="topbar-inner">
20
- <div id="title-bar"><span>{{ author }}</span></div>
21
- </div>
22
- <div class="title-section">
23
- <div class="coverpage">
24
- <div class="wrapper-top">
25
- <div class="coverpage-doc-identity">
26
- <div class="coverpage-title"><span class="title-first">{{ title }}</span></div>
27
- </div>
28
- </div>
29
- </div>
30
- </div>
31
- </header>
32
- <main class="main-section">
33
- {% include 'document' for documents %}
34
- </main>
35
- <footer>
36
- <div class="copyright">
37
- <p class="year">&copy; {{ author }}</p>
38
- <p class="message">All rights reserved. Unless otherwise specified, no part of this publication may be reproduced or utilized otherwise in any form or by any means, electronic or mechanical, including photocopying, or posting on the internet or an intranet, without prior written permission.</p>
39
- </div>
40
- </footer>
41
- <script>
42
- $(document).ready(function() {
43
- $('[id^=toc]').each(function () {
44
- var currentToc = $(this);
45
- var url = window.location.href;
46
- currentToc.wrap("<a href='" + url + "#" + currentToc.attr("id") + "' <\/a>");
47
- });
48
- });
49
- anchors.options = { placement: 'left' };
50
- anchors.add('h1, h2, h3, h4');
51
- </script>
52
- </body>
53
- </html>