docubot 1.0.2 → 1.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -20,7 +20,7 @@ module FileUtils
20
20
  end
21
21
 
22
22
  module DocuBot
23
- VERSION = '1.0.2'
23
+ VERSION = '1.1'
24
24
  DIR = File.expand_path( File.dirname( __FILE__ ) )
25
25
 
26
26
  TEMPLATE_DIR = DIR / 'docubot/templates'
@@ -69,6 +69,7 @@ class DocuBot::Bundle
69
69
  @extras << path
70
70
  else
71
71
  page = DocuBot::Page.new( self, path )
72
+ next if page.skip
72
73
 
73
74
  if path =~ %r{^_glossary/}
74
75
  @glossary << page
@@ -248,7 +248,7 @@ describe "Pages in bundles" do
248
248
  before do
249
249
  @titles = [ 'First One', 'Second One', 'Third One', 'Fourth One', 'Fifth One', '911' ]
250
250
  Dir.chdir SAMPLES/'links' do
251
- @files = Dir['**/*'] - %w[ index.txt sub2/bozo.bin ]
251
+ @files = Dir['**/*'] - %w[ index.txt sub2/bozo.bin pending.md ]
252
252
  @htmls = @files.map{ |path|
253
253
  path[/\.[^.]+$/] ? path.gsub(/\.[^.]+$/,'.html') : path/'index.html'
254
254
  }
@@ -312,6 +312,15 @@ describe "Pages in bundles" do
312
312
  it "should not include raw files in the html paths" do
313
313
  @links_bundle.page_by_html_path['sub2/bozo.bin'].must_be_nil
314
314
  end
315
+
316
+ it "should not include raw files in the html paths" do
317
+ @links_bundle.page_by_html_path['sub2/bozo.bin'].must_be_nil
318
+ end
319
+
320
+ it "should not include pages marked as ready:false" do
321
+ @links_bundle.page_by_file_path["pending.md"].must_be_nil
322
+ end
323
+
315
324
  end
316
325
 
317
326
  describe "Global bundle attributes" do
@@ -0,0 +1,4 @@
1
+ title : It's gonna be awesome
2
+ skip : true
3
+ +++
4
+ THIS SHOULD NOT BE INCLUDED
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: docubot
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: '1.1'
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -266,6 +266,7 @@ files:
266
266
  - spec/samples/hierarchy/toc.md
267
267
  - spec/samples/links/index.txt
268
268
  - spec/samples/links/one two three.textile
269
+ - spec/samples/links/pending.md
269
270
  - spec/samples/links/root.md
270
271
  - spec/samples/links/sub1/inner1.md
271
272
  - spec/samples/links/sub2/bozo.bin