pandocomatic 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/pandocomatic/configuration.rb +21 -6
- data/lib/pandocomatic/dir_converter.rb +3 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bc3b0f46b5d3816c21b8094da1fb7eddecda65db
|
4
|
+
data.tar.gz: 5c318325fc7518da70779be34c7d8c42fcf2e68c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 92021af87c7f9811cd9c38cf3c53a78a7c6adb2c20fc4fd61d2b0e6544f07040ed50fca3566e0b0ca23bfb0a5e20006bbf8af4efd212fb5ec8ccf3d4445b8990
|
7
|
+
data.tar.gz: b4c29729de6543873bb40eb84e93f943ca9c3c54e6afe1da31a424b704633eeb9884eabbc1a2d90a05738d0d3b8e93139410f243ac0cfacaa6f292766e0f5fd2
|
@@ -153,14 +153,29 @@ module Pandocomatic
|
|
153
153
|
|
154
154
|
def reset_template name, template
|
155
155
|
if @templates.has_key? name then
|
156
|
-
|
157
|
-
|
156
|
+
fields = ['glob', 'preprocessors', 'pandoc', 'postprocessors']
|
157
|
+
fields.each do |field|
|
158
|
+
case field
|
158
159
|
when 'preprocessors', 'postprocessors', 'glob'
|
159
|
-
|
160
|
+
if @templates[name][field] then
|
161
|
+
if template[field] then
|
162
|
+
@templates[name][field].concat(template[field]).uniq!
|
163
|
+
end
|
164
|
+
else
|
165
|
+
if template[field] then
|
166
|
+
@templates[name][field] = template[field]
|
167
|
+
end
|
168
|
+
end
|
160
169
|
when 'pandoc'
|
161
|
-
|
162
|
-
|
163
|
-
|
170
|
+
if @templates[name][field] then
|
171
|
+
if template[field] then
|
172
|
+
@templates[name][field].merge! template[field]
|
173
|
+
end
|
174
|
+
else
|
175
|
+
if template[field] then
|
176
|
+
@templates[name][field] = template[field]
|
177
|
+
end
|
178
|
+
end
|
164
179
|
end
|
165
180
|
end
|
166
181
|
else
|
@@ -8,8 +8,8 @@ module Pandocomatic
|
|
8
8
|
class DirConverter
|
9
9
|
|
10
10
|
def initialize src, dst, config
|
11
|
-
@src_root =
|
12
|
-
@dst_root =
|
11
|
+
@src_root = src
|
12
|
+
@dst_root = dst
|
13
13
|
@config = config
|
14
14
|
end
|
15
15
|
|
@@ -101,7 +101,7 @@ module Pandocomatic
|
|
101
101
|
if src_target.start_with? '.' then
|
102
102
|
full_src_target = File.expand_path src_target, File.dirname(src)
|
103
103
|
dst_target = src_target
|
104
|
-
if full_src_target.start_with? @src_root
|
104
|
+
if full_src_target.start_with? File.absolute_path(@src_root)
|
105
105
|
File.symlink dst_target, dst unless File.exist? dst
|
106
106
|
else
|
107
107
|
warn "Skipping link #{src} because it points to outside the source tree"
|
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.0.
|
4
|
+
version: 0.0.7
|
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: 2015-03-
|
11
|
+
date: 2015-03-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: paru
|