sdoc 0.3.7 → 0.3.8
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/sdoc/generator.rb +15 -6
- data/sdoc.gemspec +1 -1
- metadata +3 -4
- data/VERSION.yml +0 -5
data/lib/sdoc/generator.rb
CHANGED
@@ -355,12 +355,22 @@ class RDoc::Generator::SDoc
|
|
355
355
|
end
|
356
356
|
end
|
357
357
|
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
358
|
+
### Determines index path based on @options.main_page (or lack thereof)
|
359
|
+
def index_path
|
360
|
+
# Break early to avoid a big if block when no main page is specified
|
361
|
+
default = @files.first.path
|
362
|
+
return default unless @options.main_page
|
363
|
+
|
364
|
+
# Handle attempts to hit class docs directly
|
365
|
+
if @options.main_page.include?("::")
|
366
|
+
return "%s/%s.html" % [class_dir, @options.main_page.gsub("::", "/")]
|
367
|
+
end
|
368
|
+
if file = @files.find { |f| f.full_name == @options.main_page }
|
369
|
+
return file.path
|
363
370
|
end
|
371
|
+
|
372
|
+
# Nothing else worked, so stick with the default
|
373
|
+
return default
|
364
374
|
end
|
365
375
|
|
366
376
|
### Create index.html with frameset
|
@@ -368,7 +378,6 @@ class RDoc::Generator::SDoc
|
|
368
378
|
debug_msg "Generating index file in #@outputdir"
|
369
379
|
templatefile = @template_dir + 'index.rhtml'
|
370
380
|
outfile = @outputdir + 'index.html'
|
371
|
-
index_path = index_file.path
|
372
381
|
|
373
382
|
self.render_template( templatefile, binding(), outfile )
|
374
383
|
end
|
data/sdoc.gemspec
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sdoc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 3
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 3
|
9
|
-
-
|
10
|
-
version: 0.3.
|
9
|
+
- 8
|
10
|
+
version: 0.3.8
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Vladimir Kolesnikov
|
@@ -77,7 +77,6 @@ files:
|
|
77
77
|
- LICENSE
|
78
78
|
- README.rdoc
|
79
79
|
- Rakefile
|
80
|
-
- VERSION.yml
|
81
80
|
- bin/sdoc
|
82
81
|
- bin/sdoc-merge
|
83
82
|
- lib/rdoc/discover.rb
|