giblish 2.1.1 → 2.1.2
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/giblish/configurator.rb +31 -0
- data/lib/giblish/gitrepos/gitsummaryprovider.rb +0 -2
- data/lib/giblish/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 22133b3cded62a83b48e863debd9f87aa046934504fa382251b96253926e7475
|
4
|
+
data.tar.gz: 59aaff1c7e7264fd3e02303dd07b8ffe736b66b41ea62af23bc5a9923cfa0de8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 01c930aa02c6cbb16325f3fb9981bd1d53396d992e7386cc189fa6c21804e872d56da7a6a343f0988c9403697bf64c3b5ea583363c9433813fcd0d65aa82f149
|
7
|
+
data.tar.gz: b1cb48faa21d4305adf4981f75148b1db995a5a23af0187f0bcd69fffb0e920b6a4c980917bfc6adf24a39b0d889b75cf071a7194163af137cf71d6628fb80e9
|
data/lib/giblish/configurator.rb
CHANGED
@@ -46,6 +46,28 @@ module Giblish
|
|
46
46
|
end
|
47
47
|
end
|
48
48
|
|
49
|
+
# A combined docattr_provider and post-processor that:
|
50
|
+
# - instructs asciidoctor-mathematical to use svg as format
|
51
|
+
# - removes svg cache files produced by asciidoctor-mathematical
|
52
|
+
class PdfMathHelper
|
53
|
+
# called by the TreeConverter during the post_build phase
|
54
|
+
def on_postbuild(src_topdir, dst_tree, converter)
|
55
|
+
dst_top = src_topdir.pathname
|
56
|
+
dst_top.each_child do |c|
|
57
|
+
if c.basename.to_s.match?(/^stem-[0-9a-f]*\.svg$/)
|
58
|
+
Giblog.logger.debug("will remove #{c}")
|
59
|
+
c.delete
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
63
|
+
|
64
|
+
def document_attributes(src_node, dst_node, dst_top)
|
65
|
+
{
|
66
|
+
"mathematical-format" => "svg"
|
67
|
+
}
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
49
71
|
class PdfLayoutConfig
|
50
72
|
attr_reader :pre_builders, :post_builders, :adoc_extensions, :adoc_api_opts, :docattr_providers
|
51
73
|
|
@@ -56,6 +78,15 @@ module Giblish
|
|
56
78
|
@adoc_extensions = {}
|
57
79
|
@docattr_providers = []
|
58
80
|
|
81
|
+
begin
|
82
|
+
require "asciidoctor-mathematical"
|
83
|
+
cc = PdfMathHelper.new
|
84
|
+
@post_builders << cc
|
85
|
+
@docattr_providers << cc
|
86
|
+
rescue LoadError
|
87
|
+
Giblog.logger.warn { "Did not find asciidoctor-mathematical. stem blocks will not be rendered correctly!" }
|
88
|
+
end
|
89
|
+
|
59
90
|
unless config_opts.resource_dir.nil?
|
60
91
|
# generate pdf using asciidoctor-pdf with custom styling
|
61
92
|
rp = ResourcePaths.new(config_opts)
|
data/lib/giblish/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: giblish
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Anders Rillbert
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-02-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: minitest
|