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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e46ebcd9dc218f09d7555963b4b748f76cdac4e0227da78a6beacde2b944c51c
|
4
|
+
data.tar.gz: ad48096c41b76d1a0369b8a378d573408a48638d68f47c4dcb5ce55c6a205462
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c771b7c25fc8611d1e22ede00920ad7090b246b09fe45db40871f979154523c2cf8e43d29dd68d0b8b8c539fffba22cc579568ead3a547ae4c623dde0e6bf2a9
|
7
|
+
data.tar.gz: 010b7580a4d6dc0577c887e2a8a69b2634646ce584d07266a6c4cc5825c919a3f47acd5b4ad8777899802c35d920bab8728a7b5e407c9cf04642003a603a2c64
|
data/lib/pandocomatic/cli.rb
CHANGED
@@ -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?
|
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
|
-
|
872
|
-
|
873
|
-
|
874
|
-
|
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
|
|
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.
|
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-
|
11
|
+
date: 2020-05-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: paru
|