asciibuild 0.2.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/asciibuild/extensions.rb +13 -4
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 922338459b20622c2db13aa5385780ab9e7bbdf4
4
- data.tar.gz: ae4a575e4dae19ccd3d4b857a158d1fb4d0d93eb
3
+ metadata.gz: 1a6bfa059dad0c3bff1d25fc23bccaa19921072c
4
+ data.tar.gz: e2da6451f981f2c3efdfcc095aa0a085c0f712ec
5
5
  SHA512:
6
- metadata.gz: 67661b19371cbcb7752babe66d80315f1ccd2471f4dea93d9d0279857726850f97885c4c4439eaab936b72b29a9cf9956c0ebfe0a232716a309cd408858ae5ea
7
- data.tar.gz: 3932987a2e67af25533e95c761085d15bf9776bc06bfe980d5f7d664958b75523661dba80e00925a2804e04bc104c6604d8c5122856676f7bbe6c15d4b685f81
6
+ metadata.gz: f19b35ba2a027507e2fe0025fcbc15f07965d53e7975a1918f65704c95c949d40f5913daf0babaa670f9d30853d562850e4f006e8747d0424b8a97d938fe719d
7
+ data.tar.gz: 425b4331f57f3eb908995531d1970fa66ab01d0db7b5655004dab74a10dc5db6b4fa5cb9dca45c23ad9e6c3a0673ab12bdc3a3d200480f2ccb8e8ef99f35746c
@@ -10,14 +10,19 @@ def include_section? parent, attrs
10
10
  []
11
11
  end
12
12
 
13
+ deps = []
14
+
13
15
  incl_sect = sections.empty?
14
16
  sections.each do |s|
15
- if not incl_sect and Regexp.new(s) =~ parent.title
16
- incl_sect = true
17
+ if not incl_sect
18
+ if Regexp.new(s) =~ parent.title
19
+ incl_sect = true
20
+ deps << "Before " + parent.title << "After " + parent.title
21
+ end
17
22
  end
18
23
  end
19
24
 
20
- incl_sect or (not parent.document.attributes["error"] and (/^Before/ =~ parent.title or /^After/ =~ parent.title))
25
+ incl_sect or deps.include?(parent.title) or (not parent.document.attributes["error"])
21
26
  end
22
27
 
23
28
  def get_lang lang
@@ -182,7 +187,11 @@ module Asciibuild
182
187
  return create_open_block parent, ["[source,#{lang}]", "----"] + reader.lines + ["----"], attrs
183
188
  end
184
189
 
185
- body = Mustache.render(reader.read, parent.document.attributes)
190
+ body = if not attrs['template'] == 'false'
191
+ Mustache.render(reader.read, parent.document.attributes)
192
+ else
193
+ reader.read
194
+ end
186
195
 
187
196
  lines = []
188
197
  stderr_lines = []
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: asciibuild
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jon Brisbin