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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 820bc4f9fe1209cee121d59246fda58457c7beb0
4
- data.tar.gz: 7518c02daf38f7258bd43711279a271db699a909
3
+ metadata.gz: 215dbf8660c2a4ed7689ce7db31e945bc15ddfe5
4
+ data.tar.gz: 6b119022ec3949db974ae0595c2d539ab6279213
5
5
  SHA512:
6
- metadata.gz: c4ef8b04a8a83d1126cccae72bf2e5246196b47b27ee461827472632d9a855dc9f5e66b0a00cbb5d10cf4e42fc7746877015b20c7f57446af9c7564557ee4f09
7
- data.tar.gz: 877a09b84cf7a3ddecb653a20cbc48a650e7ab513d6b6be37ae00e7796021b8f3bee99f86a4c893b4b2362b24e61a47fbb9fc6d4d7582f957cd3303d729bb92c
6
+ metadata.gz: 49a70aca7fdb170ef2e5b65c3ebe50c0a0a1eb203139fb34ccd73f0080e8c0f53de3dc3d590994992d810f0965fc723db9445b1e6351b780430a48cb7e4183df
7
+ data.tar.gz: 8609f7d60cb0929ff16c6af3d07308fa0e5d6e3890cb09cd018e13de9ff97fc4144571f8c27772e0431fa67e489667d9adca37f75c620d26396d9194d21c8338
@@ -1,3 +1,3 @@
1
1
  module Liquidoc
2
- VERSION = "0.5.2"
2
+ VERSION = "0.5.3"
3
3
  end
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
- Dir.mkdir(base_path) unless File.exists?(base_path)
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: liquidoc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.2
4
+ version: 0.5.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Dominick