docubot 0.7.0 → 0.7.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 = '0.7.0'
23
+ VERSION = '0.7.1'
24
24
  DIR = File.expand_path( File.dirname( __FILE__ ) )
25
25
 
26
26
  TEMPLATE_DIR = DIR / 'docubot/templates'
@@ -32,8 +32,8 @@ class DocuBot::Bundle
32
32
 
33
33
  # All files in the _templates directory should be ignored
34
34
  files_and_folders.reject!{ |f| f =~ /(?:^|\/)_/ }
35
- files_and_folders.concat Dir[ '_static/**/*' ]
36
- files_and_folders.concat Dir[ '_glossary/**/*' ]
35
+ files_and_folders.concat Dir[ '_static/**/*' ].reject{ |f| File.directory?(f) }
36
+ files_and_folders.concat Dir[ '_glossary/**/*' ].reject{ |f| File.directory?(f) }
37
37
 
38
38
  @global.ignore.as_list.each do |glob|
39
39
  files_and_folders = files_and_folders - Dir[glob]
@@ -219,6 +219,31 @@ describe "Bundle with Extra Files" do
219
219
  end
220
220
  end
221
221
 
222
+ describe "Bundle with Skipped Files" do
223
+ before do
224
+ @out, @err = capture_io do
225
+ @bundle = DocuBot::Bundle.new( SAMPLES/'underscores' )
226
+ end
227
+ end
228
+
229
+ it "should not include files that start with an underscore" do
230
+ titles = @bundle.pages.map(&:title)
231
+ titles.wont_include "ignoreme"
232
+ titles.wont_include "andignoreme"
233
+ titles.wont_include " ignoreme"
234
+ titles.wont_include " andignoreme"
235
+ end
236
+
237
+ it "should not include folders inside _static" do
238
+ titles = @bundle.pages.map(&:title)
239
+ titles.wont_include "Foo"
240
+ titles.wont_include " Foo"
241
+ titles.wont_include "Bar"
242
+ titles.wont_include " Bar"
243
+ end
244
+
245
+ end
246
+
222
247
  describe "Pages in bundles" do
223
248
  before do
224
249
  @titles = [ 'First One', 'Second One', 'Third One', 'Fourth One', 'Fifth One', '911' ]
@@ -0,0 +1 @@
1
+ _Hello_, **World!**
@@ -0,0 +1 @@
1
+ _Hello_, **World!**
@@ -0,0 +1 @@
1
+ _Hello_, **World!**
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: 0.7.0
4
+ version: 0.7.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,12 +10,11 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2012-05-24 00:00:00.000000000 -06:00
14
- default_executable:
13
+ date: 2012-05-24 00:00:00.000000000 Z
15
14
  dependencies:
16
15
  - !ruby/object:Gem::Dependency
17
16
  name: haml
18
- requirement: &20956680 !ruby/object:Gem::Requirement
17
+ requirement: !ruby/object:Gem::Requirement
19
18
  none: false
20
19
  requirements:
21
20
  - - ! '>='
@@ -23,10 +22,15 @@ dependencies:
23
22
  version: '0'
24
23
  type: :runtime
25
24
  prerelease: false
26
- version_requirements: *20956680
25
+ version_requirements: !ruby/object:Gem::Requirement
26
+ none: false
27
+ requirements:
28
+ - - ! '>='
29
+ - !ruby/object:Gem::Version
30
+ version: '0'
27
31
  - !ruby/object:Gem::Dependency
28
32
  name: nokogiri
29
- requirement: &20955252 !ruby/object:Gem::Requirement
33
+ requirement: !ruby/object:Gem::Requirement
30
34
  none: false
31
35
  requirements:
32
36
  - - ! '>='
@@ -34,10 +38,15 @@ dependencies:
34
38
  version: '0'
35
39
  type: :runtime
36
40
  prerelease: false
37
- version_requirements: *20955252
41
+ version_requirements: !ruby/object:Gem::Requirement
42
+ none: false
43
+ requirements:
44
+ - - ! '>='
45
+ - !ruby/object:Gem::Version
46
+ version: '0'
38
47
  - !ruby/object:Gem::Dependency
39
48
  name: kramdown
40
- requirement: &20954544 !ruby/object:Gem::Requirement
49
+ requirement: !ruby/object:Gem::Requirement
41
50
  none: false
42
51
  requirements:
43
52
  - - ! '>='
@@ -45,10 +54,15 @@ dependencies:
45
54
  version: '0'
46
55
  type: :runtime
47
56
  prerelease: false
48
- version_requirements: *20954544
57
+ version_requirements: !ruby/object:Gem::Requirement
58
+ none: false
59
+ requirements:
60
+ - - ! '>='
61
+ - !ruby/object:Gem::Version
62
+ version: '0'
49
63
  - !ruby/object:Gem::Dependency
50
64
  name: RedCloth
51
- requirement: &20953872 !ruby/object:Gem::Requirement
65
+ requirement: !ruby/object:Gem::Requirement
52
66
  none: false
53
67
  requirements:
54
68
  - - ! '>='
@@ -56,10 +70,15 @@ dependencies:
56
70
  version: '0'
57
71
  type: :runtime
58
72
  prerelease: false
59
- version_requirements: *20953872
73
+ version_requirements: !ruby/object:Gem::Requirement
74
+ none: false
75
+ requirements:
76
+ - - ! '>='
77
+ - !ruby/object:Gem::Version
78
+ version: '0'
60
79
  - !ruby/object:Gem::Dependency
61
80
  name: minitest
62
- requirement: &20953128 !ruby/object:Gem::Requirement
81
+ requirement: !ruby/object:Gem::Requirement
63
82
  none: false
64
83
  requirements:
65
84
  - - ! '>='
@@ -67,7 +86,12 @@ dependencies:
67
86
  version: '0'
68
87
  type: :runtime
69
88
  prerelease: false
70
- version_requirements: *20953128
89
+ version_requirements: !ruby/object:Gem::Requirement
90
+ none: false
91
+ requirements:
92
+ - - ! '>='
93
+ - !ruby/object:Gem::Version
94
+ version: '0'
71
95
  description: DocuBot creates HTML or CHM documentation from a hierarchy of files,
72
96
  supporting markups like Markdown, Textile, and Haml.
73
97
  email: gavin@phrogz.net
@@ -218,13 +242,15 @@ files:
218
242
  - spec/samples/titles/6.1 More.md
219
243
  - spec/samples/titles/911.txt
220
244
  - spec/samples/titles/index.txt
245
+ - spec/samples/underscores/Home.md
246
+ - spec/samples/underscores/subsection/_andignoreme.md
247
+ - spec/samples/underscores/_ignoreme.md
221
248
  - spec/templates.rb
222
249
  - spec/toc.rb
223
250
  - spec/writer/chm.rb
224
251
  - spec/writer/html.rb
225
252
  - spec/_all.rb
226
253
  - spec/_helper.rb
227
- has_rdoc: true
228
254
  homepage: http://github.com/Phrogz/docubot
229
255
  licenses: []
230
256
  post_install_message:
@@ -251,7 +277,7 @@ requirements:
251
277
  - RedCloth gem for Textile conversion.
252
278
  - MiniTest gem for running specifications.
253
279
  rubyforge_project:
254
- rubygems_version: 1.5.2
280
+ rubygems_version: 1.8.23
255
281
  signing_key:
256
282
  specification_version: 3
257
283
  summary: Create documentation from a hierarchy of text files.