lib/gumdrop/build.rb in gumdrop-0.3.9 vs lib/gumdrop/build.rb in gumdrop-0.3.10
- old
+ new
@@ -54,11 +54,11 @@
def filter_tree
Gumdrop.blacklist.each do |skip_path|
Gumdrop.site.keys.each do |source_path|
if source_path.starts_with? skip_path
- Gumdrop.report " -ignoring: #{source_path}", :info
+ Gumdrop.report "-excluding: #{source_path}", :info
Gumdrop.site.delete source_path
end
end
end
end
@@ -66,13 +66,17 @@
def render
unless opts[:dry_run]
output_base_path= File.expand_path(Gumdrop.config.output_dir)
Gumdrop.report "[Compiling to #{output_base_path}]", :info
Gumdrop.site.keys.sort.each do |path|
- node= Gumdrop.site[path]
- output_path= File.join(output_base_path, node.to_s)
- FileUtils.mkdir_p File.dirname(output_path)
- node.renderTo output_path, Gumdrop.content_filters
+ unless Gumdrop.greylist.any? {|p| path.starts_with?(p) }
+ node= Gumdrop.site[path]
+ output_path= File.join(output_base_path, node.to_s)
+ FileUtils.mkdir_p File.dirname(output_path)
+ node.renderTo output_path, Gumdrop.content_filters
+ else
+ Gumdrop.report " -ignoring: #{path}", :info
+ end
end
end
end
def run
\ No newline at end of file