liquidoc 0.5.2 → 0.5.3
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 +4 -4
- data/lib/liquidoc/version.rb +1 -1
- data/lib/liquidoc.rb +3 -5
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 215dbf8660c2a4ed7689ce7db31e945bc15ddfe5
|
4
|
+
data.tar.gz: 6b119022ec3949db974ae0595c2d539ab6279213
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 49a70aca7fdb170ef2e5b65c3ebe50c0a0a1eb203139fb34ccd73f0080e8c0f53de3dc3d590994992d810f0965fc723db9445b1e6351b780430a48cb7e4183df
|
7
|
+
data.tar.gz: 8609f7d60cb0929ff16c6af3d07308fa0e5d6e3890cb09cd018e13de9ff97fc4144571f8c27772e0431fa67e489667d9adca37f75c620d26396d9194d21c8338
|
data/lib/liquidoc/version.rb
CHANGED
data/lib/liquidoc.rb
CHANGED
@@ -267,7 +267,6 @@ class Build
|
|
267
267
|
|
268
268
|
def set key, val
|
269
269
|
@build[key] = val
|
270
|
-
puts "#{key} => #{@build[key]}"
|
271
270
|
end
|
272
271
|
|
273
272
|
def validate
|
@@ -486,15 +485,17 @@ def liquify datasrc, template_file, output
|
|
486
485
|
output_file = output
|
487
486
|
base_path = File.dirname(output)
|
488
487
|
begin
|
489
|
-
|
488
|
+
FileUtils::mkdir_p(base_path) unless File.exists?(base_path)
|
490
489
|
File.open(output_file, 'w') { |file| file.write(rendered) } # saves file
|
491
490
|
rescue Exception => ex
|
492
491
|
@logger.error "Failed to save output.\n#{ex.class} #{ex.message}"
|
492
|
+
raise "FileNotBuilt"
|
493
493
|
end
|
494
494
|
if File.exists?(output_file)
|
495
495
|
@logger.info "File built: #{File.basename(output_file)}"
|
496
496
|
else
|
497
497
|
@logger.error "Hrmp! File not built."
|
498
|
+
raise "FileNotBuilt"
|
498
499
|
end
|
499
500
|
else # if stdout
|
500
501
|
puts "========\nOUTPUT: Rendered with template #{template_file}:\n\n#{rendered}\n"
|
@@ -558,13 +559,10 @@ def asciidocify doc, build
|
|
558
559
|
@logger.debug "Executing Asciidoctor render operation for #{build.output}."
|
559
560
|
to_file = build.output
|
560
561
|
unless doc.type == build.doctype
|
561
|
-
puts "performing..."
|
562
562
|
if build.doctype.nil?
|
563
563
|
build.set("doctype", doc.type)
|
564
564
|
end
|
565
565
|
end
|
566
|
-
puts "document doctype: #{doc.type}"
|
567
|
-
puts "build doctype: #{build.doctype}"
|
568
566
|
back = derive_backend(doc.type, build.output)
|
569
567
|
unless build.style.nil?
|
570
568
|
case back
|