liquidoc 0.9.3 → 0.9.4
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 +17 -26
- metadata +2 -3
- data/lib/liquid_tags.rb +0 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b37eeec640e508911c065f9e9061c3f7b699ed7a939e4e827f468bba377b54d1
|
4
|
+
data.tar.gz: 559ed408ee31cb7f3f12deb07d0da7ac6b09e79d2b3fe7b52892ad39707379bd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2a1979905f8eb82a27cc8cc1cc2b97b8ff94c610cd9e18e26c75ee7ad99ed2af0aac074675f4c1a516b0a761b2966f801275511ea879618d1f9269c401239779
|
7
|
+
data.tar.gz: 57baff39f8f07381556c67916a060cf76e97ded4975d2ada78d6101bd18a28683f61efae42cbf81002e955767f6d7e9a576215b55fc297ee3eb2d01435a975bc
|
data/lib/liquidoc/version.rb
CHANGED
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
|
-
|
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(
|
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-
|
903
|
+
@logger.debug "Final pre-Asciidoctor attributes: #{attrs.to_yaml}"
|
907
904
|
# Perform the aciidoctor convert
|
908
|
-
|
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
|
-
|
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 "
|
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.
|
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-
|
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
|