asciibuild 0.7.0 → 0.8.0
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/bin/asciibuild +6 -3
- data/lib/asciibuild/extensions.rb +12 -2
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2f074e7c7526f2b071d6809b80d239bd3d280350
|
|
4
|
+
data.tar.gz: f984087cb0c58d830201cc1f9e7184b1bd986df6
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a43def929086de1f35e8e031a2035c4f24a7c23d6c8ed2a83bf9f5a11616e904b205a66f03d7ff26192511260cdfa023302d0f8777c47f5c4dff2baa57ef9801
|
|
7
|
+
data.tar.gz: 290ba347414cfbb7da3360d88daa176a9016132ed09967fab54deb153e116f865ced022366be9cf72867e022c5261e790b96a0573c7dd1060c43c5570951b999
|
data/bin/asciibuild
CHANGED
|
@@ -9,6 +9,7 @@ end
|
|
|
9
9
|
attrs = {
|
|
10
10
|
"pwd" => Dir.pwd,
|
|
11
11
|
"toc" => "left",
|
|
12
|
+
"toclevels" => "4",
|
|
12
13
|
"sectlinks" => true,
|
|
13
14
|
"icons" => "font",
|
|
14
15
|
"stylesheet" => find_stylesheet("colony"),
|
|
@@ -29,9 +30,6 @@ OptionParser.new do |opts|
|
|
|
29
30
|
opts.on('-d', '--outdir DIR', 'Directory to output processed documents to') do |d|
|
|
30
31
|
options[:to_dir] = d
|
|
31
32
|
end
|
|
32
|
-
opts.on('-e', '--enabled ENABLED', 'Enable or disable asciibuild entirely') do |e|
|
|
33
|
-
attrs["enabled"] = e
|
|
34
|
-
end
|
|
35
33
|
opts.on('-s', '--stylesheet NAME', 'Stylesheet name') do |v|
|
|
36
34
|
attrs["stylesheet"] = find_stylesheet(v)
|
|
37
35
|
end
|
|
@@ -66,4 +64,9 @@ ARGV.each do |f|
|
|
|
66
64
|
options[:to_file] = outfile
|
|
67
65
|
|
|
68
66
|
Asciidoctor.convert_file f, options
|
|
67
|
+
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
if Asciibuild::Extensions.failed
|
|
71
|
+
exit 1
|
|
69
72
|
end
|
|
@@ -77,6 +77,16 @@ end
|
|
|
77
77
|
|
|
78
78
|
module Asciibuild
|
|
79
79
|
module Extensions
|
|
80
|
+
@failed = false
|
|
81
|
+
|
|
82
|
+
def self.failed
|
|
83
|
+
@failed
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
def self.failed=(f)
|
|
87
|
+
@failed = f
|
|
88
|
+
end
|
|
89
|
+
|
|
80
90
|
class ConcatBlock < Asciidoctor::Extensions::BlockProcessor
|
|
81
91
|
# BlockProcessor to concatenate content into a single file.
|
|
82
92
|
# It allows you to break up sections of a file into separate listing blocks and aggregate them together
|
|
@@ -189,7 +199,7 @@ module Asciibuild
|
|
|
189
199
|
if status == 0
|
|
190
200
|
parent.document.attributes["#{name} container"] = rout.chomp
|
|
191
201
|
else
|
|
192
|
-
|
|
202
|
+
Asciibuild::Extensions.failed = true
|
|
193
203
|
end
|
|
194
204
|
lines << "----" << "> #{docker_run}" << rout << rerr << "----"
|
|
195
205
|
end
|
|
@@ -302,7 +312,7 @@ module Asciibuild
|
|
|
302
312
|
|
|
303
313
|
if status != 0
|
|
304
314
|
lines << "IMPORTANT: #{cmd} failed with #{status}"
|
|
305
|
-
|
|
315
|
+
Asciibuild::Extensions.failed = true
|
|
306
316
|
attrs['title'] = 'icon:exclamation-circle[role=red] ' + attrs['title']
|
|
307
317
|
else
|
|
308
318
|
attrs['title'] = 'icon:check-circle[role=green] ' + attrs['title']
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: asciibuild
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.8.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Jon Brisbin
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2016-09-
|
|
11
|
+
date: 2016-09-27 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: asciidoctor
|