liquidoc 0.9.3 → 0.9.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a5ca3ecd0b1c24dfa6231479baec2d113e3c6a6255392416ab75d54918f51f3b
4
- data.tar.gz: 3abde9ab8883e38c7484782afbb7c8a0bf683c45ca05e0ecc5ad62784fb3a52e
3
+ metadata.gz: b37eeec640e508911c065f9e9061c3f7b699ed7a939e4e827f468bba377b54d1
4
+ data.tar.gz: 559ed408ee31cb7f3f12deb07d0da7ac6b09e79d2b3fe7b52892ad39707379bd
5
5
  SHA512:
6
- metadata.gz: 07b617083d1467b3d485b341d0192026fce6db31632ac4fc123c8827b39202cfa9968a1e599ff07fa115c5f4878b7e105ed11586271d1d3ce1ebc88a5ee09647
7
- data.tar.gz: b25ec34f7f2e843e0fabbf5a572f133399e0716c56fe2c2c9e5ddeff93c318645552b6adcd0a4335bd5ebd0693091050b862b0e502fd8bc34442b32a1dd61946
6
+ metadata.gz: 2a1979905f8eb82a27cc8cc1cc2b97b8ff94c610cd9e18e26c75ee7ad99ed2af0aac074675f4c1a516b0a761b2966f801275511ea879618d1f9269c401239779
7
+ data.tar.gz: 57baff39f8f07381556c67916a060cf76e97ded4975d2ada78d6101bd18a28683f61efae42cbf81002e955767f6d7e9a576215b55fc297ee3eb2d01435a975bc
@@ -1,3 +1,3 @@
1
1
  module Liquidoc
2
- VERSION = "0.9.3"
2
+ VERSION = "0.9.4"
3
3
  end
data/lib/liquidoc.rb CHANGED
@@ -788,15 +788,12 @@ end
788
788
 
789
789
  # Copy images and other files into target dir
790
790
  def copy_assets src, dest, inclusive=true
791
- if File.file?(src) # for sources that are files
792
- target_dir = File.dirname(dest)
793
- else # if src is a directory
791
+ unless File.file?(src)
794
792
  unless inclusive then src = src + "/." end
795
- target_dir = dest
796
793
  end
797
794
  @logger.debug "Copying #{src} to #{dest}"
798
795
  begin
799
- FileUtils.mkdir_p(target_dir) unless File.directory?(target_dir)
796
+ FileUtils.mkdir_p(dest) unless File.directory?(dest)
800
797
  if File.directory?(src)
801
798
  FileUtils.cp_r(src, dest)
802
799
  else
@@ -903,29 +900,23 @@ def asciidocify doc, build
903
900
  # Add attributes from config file build section
904
901
  attrs.merge!(build.attributes) # Finally merge attributes from the build step
905
902
  # Add attributes from command-line -a args
906
- @logger.debug "Final pre-parse attributes: #{attrs.to_yaml}"
903
+ @logger.debug "Final pre-Asciidoctor attributes: #{attrs.to_yaml}"
907
904
  # Perform the aciidoctor convert
908
- unless build.backend == "pdf"
909
- Asciidoctor.convert_file(
910
- doc.index,
911
- to_file: to_file,
912
- attributes: attrs,
913
- require: "pdf",
914
- backend: build.backend,
915
- doctype: build.doctype,
916
- safe: "unsafe",
917
- sourcemap: true,
918
- verbose: @verbose,
919
- mkdirs: true
920
- )
921
- else # For PDFs, we're calling the asciidoctor-pdf CLI, as the main dependency doesn't seem to perform the same way
922
- attrs = '-a ' + attrs.map{|k,v| "#{k}='#{v}'"}.join(' -a ')
923
- command = "asciidoctor-pdf -o #{to_file} -b pdf -d #{build.doctype} -S unsafe #{attrs} -a no-header-footer --trace #{doc.index}"
905
+ if build.backend == "pdf"
924
906
  @logger.info "Generating PDF. This can take some time..."
925
- @logger.debug "Running #{command}"
926
- system command
927
907
  end
928
- @logger.debug "AsciiDoc attributes: #{doc.attributes}"
908
+ Asciidoctor.convert_file(
909
+ doc.index,
910
+ to_file: to_file,
911
+ attributes: attrs,
912
+ require: "pdf",
913
+ backend: build.backend,
914
+ doctype: build.doctype,
915
+ safe: "unsafe",
916
+ sourcemap: true,
917
+ verbose: @verbose,
918
+ mkdirs: true
919
+ )
929
920
  @logger.info "Rendered file #{to_file}."
930
921
  end
931
922
 
@@ -961,7 +952,7 @@ def generate_site doc, build
961
952
  end
962
953
  if command
963
954
  @logger.info "Running #{command}"
964
- @logger.debug "AsciiDoc attributes: #{doc.attributes.to_yaml} "
955
+ @logger.debug "Final pre-jekyll-asciidoc attributes: #{doc.attributes.to_yaml} "
965
956
  system command
966
957
  end
967
958
  jekyll_serve(build) if @jekyll_serve
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: liquidoc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.3
4
+ version: 0.9.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Dominick
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-09-07 00:00:00.000000000 Z
11
+ date: 2018-10-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -49,7 +49,6 @@ extensions: []
49
49
  extra_rdoc_files: []
50
50
  files:
51
51
  - bin/liquidoc
52
- - lib/liquid_tags.rb
53
52
  - lib/liquidoc.rb
54
53
  - lib/liquidoc/version.rb
55
54
  homepage: https://github.com/scalingdata/liquidoc
data/lib/liquid_tags.rb DELETED
@@ -1,12 +0,0 @@
1
- require 'liquid'
2
-
3
- module LiquidTags
4
- class IncludeTag < Liquid::Tag
5
-
6
- def initialize(tag_name, markup, tokens)
7
- super
8
- @tag_name = tag_name
9
- return "WORKING!"
10
- end
11
- end
12
- end