pandocomatic 0.2.7.0 → 0.2.7.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: 6777ab9ccebbe75dff8b2e818b9092604517db7039035a11612f2cc93dd5ad81
4
- data.tar.gz: eae1fffb172cecd76b805cc1b59e72546a4950d2689356d36bacca0dcd67618f
3
+ metadata.gz: e46ebcd9dc218f09d7555963b4b748f76cdac4e0227da78a6beacde2b944c51c
4
+ data.tar.gz: ad48096c41b76d1a0369b8a378d573408a48638d68f47c4dcb5ce55c6a205462
5
5
  SHA512:
6
- metadata.gz: c4b1ff0b99853e723c9f8cdda7d4340e81cf2bc649864e35544a596e4d4d8370507b6a1737e64b754cc77a31f2150759734671a336543b05af07fccb86a1831a
7
- data.tar.gz: 84320c981c1100d36ac44c575358439899e612652fc82b22e1af3154d7d11e92a23bbbb97759a609c53092898bdf06932ede70a6ae6c275a460bbdf4cc121cce
6
+ metadata.gz: c771b7c25fc8611d1e22ede00920ad7090b246b09fe45db40871f979154523c2cf8e43d29dd68d0b8b8c539fffba22cc579568ead3a547ae4c623dde0e6bf2a9
7
+ data.tar.gz: 010b7580a4d6dc0577c887e2a8a69b2634646ce584d07266a6c4cc5825c919a3f47acd5b4ad8777899802c35d920bab8728a7b5e407c9cf04642003a603a2c64
@@ -125,8 +125,9 @@ module Pandocomatic
125
125
  raise CLIError.new(:no_output_given) if not multiple_inputs and File.directory? input.first
126
126
  end
127
127
 
128
+ # No check for root_path: a user can supply one that does not exists
129
+ # at this location and still work on the output location.
128
130
  if options[:root_path_given]
129
- options[:root_path] = File.absolute_path options[:root_path]
130
131
  end
131
132
 
132
133
  # Data dir, if specified, should be an existing and readable directory
@@ -851,7 +851,7 @@ module Pandocomatic
851
851
 
852
852
  path.delete_prefix! ROOT_PATH_INDICATOR if is_root_relative_path? path
853
853
 
854
- if File.realpath("#{dst_dir}").start_with? File.realpath(root) then
854
+ if File.exist? root and File.realpath("#{dst_dir}").start_with?(File.realpath(root)) then
855
855
  rel_start = ""
856
856
 
857
857
  until File.identical?(File.realpath("#{dst_dir}/#{rel_start}"), File.realpath(root)) do
@@ -868,11 +868,10 @@ module Pandocomatic
868
868
  # Because the destination is not in a subdirectory of root, a
869
869
  # relative path to that root cannot be created. Instead,
870
870
  # the path is assumed to be absolute relative to root
871
- if root.end_with? "/" or path.start_with? "/"
872
- "#{root}#{path}"
873
- else
874
- "#{root}/#{path}"
875
- end
871
+ root = root.delete_suffix "/" if root.end_with? "/"
872
+ path = path.delete_prefix "/" if path.start_with? "/"
873
+
874
+ "#{root}/#{path}"
876
875
  end
877
876
 
878
877
 
@@ -47,7 +47,7 @@ module Pandocomatic
47
47
  ERROR_STATUS = 1266 # This is the sum of the ascii values of the characters in 'pandocomatic'
48
48
 
49
49
  # Pandocomatic's current version
50
- VERSION = [0, 2, 7, 0]
50
+ VERSION = [0, 2, 7, 1]
51
51
 
52
52
  # Run pandocomatic given options
53
53
  #
@@ -1,6 +1,6 @@
1
1
  Pandocomatic version <%=@version.join('.')%>
2
2
 
3
- © 2014—2019 Huub de Beer <Huub@heerdebeer.org>
3
+ © 2014—2020 Huub de Beer <Huub@heerdebeer.org>
4
4
 
5
5
  Pandocomatic is free software; pandocomatic is released under the GPLv3.
6
6
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pandocomatic
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.7.0
4
+ version: 0.2.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Huub de Beer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-05-06 00:00:00.000000000 Z
11
+ date: 2020-05-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: paru