pandocomatic 0.1.4.18 → 0.1.4.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 54c948376695229144be170c711bc475b0bffa5c
|
4
|
+
data.tar.gz: 4541871677bad952bd4c44b7aed1461cc981ccb6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 61a2ccb51775f8c610c4abeab3c9f410567561ea4e684bddac519cdd2520eeabcd65126cc4272c93c56eef604aad82d52a8b15ff3dbc9cebdb52d501e25dbda3
|
7
|
+
data.tar.gz: e115b839f4fbc09d3e4a747f47acba53ce6873106bd9fe7364ea04aca791b1583ba0712e3fb07e9d6813da65ce80f4e37d22ab8043a6107a818b991fa5b48f2c
|
@@ -62,6 +62,7 @@ module Pandocomatic
|
|
62
62
|
# this file
|
63
63
|
def initialize(config, src, dst, template_name = nil)
|
64
64
|
super()
|
65
|
+
|
65
66
|
@config = config
|
66
67
|
@src = src
|
67
68
|
@dst = dst
|
@@ -104,6 +105,8 @@ module Pandocomatic
|
|
104
105
|
|
105
106
|
pandoc_options = Configuration.extend_value(pandoc_options, template['pandoc'])
|
106
107
|
end
|
108
|
+
|
109
|
+
template = Configuration.extend_value(metadata.pandocomatic, template) if metadata.has_pandocomatic?
|
107
110
|
|
108
111
|
# Run setup scripts
|
109
112
|
setup template
|
@@ -48,6 +48,7 @@ module Pandocomatic
|
|
48
48
|
@src = src
|
49
49
|
|
50
50
|
metadata = PandocMetadata.load_file @src
|
51
|
+
|
51
52
|
metadata.templates.each do |template_name|
|
52
53
|
raise ConfigurationError.new(:no_such_template, nil, template_name) unless template_name.empty? or config.has_template? template_name
|
53
54
|
|
@@ -259,8 +259,9 @@ module Pandocomatic
|
|
259
259
|
def update_path(path, src_dir, check_executable = false)
|
260
260
|
updated_path = path
|
261
261
|
if path.start_with? './'
|
262
|
-
# refers to a local dir
|
263
|
-
|
262
|
+
# refers to a local dir; strip the './' before appending it to
|
263
|
+
# the source directory as to prevent /some/path/./to/path
|
264
|
+
updated_path = File.join src_dir, path[2..-1]
|
264
265
|
else
|
265
266
|
if path.start_with? '/'
|
266
267
|
updated_path = path
|
@@ -18,6 +18,7 @@
|
|
18
18
|
#++
|
19
19
|
module Pandocomatic
|
20
20
|
require 'open3'
|
21
|
+
require_relative 'error/processor_error.rb'
|
21
22
|
|
22
23
|
# Generic class for processors used to preprocess, postproces, setup, and
|
23
24
|
# cleanup with external scripts or programs during the conversion process.
|
@@ -34,7 +35,14 @@ module Pandocomatic
|
|
34
35
|
#
|
35
36
|
# @return [String] output of script.
|
36
37
|
def self.run script, input
|
37
|
-
output,
|
38
|
+
output, error, status = Open3.capture3(script, :stdin_data => input)
|
39
|
+
|
40
|
+
warn error unless error.empty?
|
41
|
+
|
42
|
+
if status.exitstatus > 0
|
43
|
+
raise ProcessorError.new(:error_processing_script, StandardError.new(error), [script, input])
|
44
|
+
end
|
45
|
+
|
38
46
|
output
|
39
47
|
end
|
40
48
|
|
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.1.4.
|
4
|
+
version: 0.1.4.19
|
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: 2017-09-
|
11
|
+
date: 2017-09-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: paru
|
@@ -19,7 +19,7 @@ dependencies:
|
|
19
19
|
version: 0.2.5
|
20
20
|
- - ">="
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: 0.2.5.
|
22
|
+
version: 0.2.5.9
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -29,7 +29,7 @@ dependencies:
|
|
29
29
|
version: 0.2.5
|
30
30
|
- - ">="
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version: 0.2.5.
|
32
|
+
version: 0.2.5.9
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: trollop
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -154,7 +154,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
154
154
|
requirements:
|
155
155
|
- pandoc, a universal document converer <http://pandoc.org>
|
156
156
|
rubyforge_project:
|
157
|
-
rubygems_version: 2.
|
157
|
+
rubygems_version: 2.5.2
|
158
158
|
signing_key:
|
159
159
|
specification_version: 4
|
160
160
|
summary: Automating the use of pandoc
|