voloko-sdoc 0.0.5 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/README +1 -1
- data/bin/sdoc +0 -1
- data/bin/sdoc-merge +12 -0
- data/lib/sdoc.rb +15 -7
- data/lib/sdoc/generator/shtml.rb +671 -0
- data/lib/sdoc/generator/template/shtml/_context.rhtml +163 -0
- data/lib/sdoc/generator/template/shtml/class.rhtml +46 -0
- data/lib/sdoc/generator/template/shtml/file.rhtml +37 -0
- data/lib/sdoc/generator/template/shtml/index.rhtml +14 -0
- data/lib/sdoc/generator/template/shtml/resources/css/main.css +191 -0
- data/lib/sdoc/{generators/template/shtml/resources/css/master-frameset.css → generator/template/shtml/resources/css/panel.css} +83 -2
- data/lib/sdoc/{generators → generator}/template/shtml/resources/css/reset.css +0 -0
- data/lib/sdoc/{generators → generator}/template/shtml/resources/i/arrows.png +0 -0
- data/lib/sdoc/{generators → generator}/template/shtml/resources/i/results_bg.png +0 -0
- data/lib/sdoc/{generators → generator}/template/shtml/resources/i/tree_bg.png +0 -0
- data/lib/sdoc/{generators → generator}/template/shtml/resources/js/jquery-1.3.2.min.js +0 -0
- data/lib/sdoc/generator/template/shtml/resources/js/main.js +34 -0
- data/lib/sdoc/generator/template/shtml/resources/js/searchdoc.js +600 -0
- data/lib/sdoc/{generators/template/shtml/resources/panel.html → generator/template/shtml/resources/panel/index.html} +6 -6
- data/lib/sdoc/github.rb +64 -0
- data/lib/sdoc/merge.rb +166 -0
- metadata +117 -19
- data/lib/sdoc/code_objects.rb +0 -17
- data/lib/sdoc/generators/shtml_generator.rb +0 -354
- data/lib/sdoc/generators/template/shtml/resources/js/searchdoc.js +0 -595
- data/lib/sdoc/generators/template/shtml/shtml.rb +0 -615
- data/lib/sdoc/options.rb +0 -61
- data/test/options_test.rb +0 -33
- data/test/sdoc_test.rb +0 -7
data/lib/sdoc/options.rb
DELETED
@@ -1,61 +0,0 @@
|
|
1
|
-
require "rdoc/options"
|
2
|
-
|
3
|
-
# Add a github_url option to rdoc options
|
4
|
-
module SDoc
|
5
|
-
class Options < Options
|
6
|
-
include Singleton
|
7
|
-
|
8
|
-
attr_accessor :github_url
|
9
|
-
|
10
|
-
def parse(argv, generators)
|
11
|
-
old_argv = ARGV.dup
|
12
|
-
begin
|
13
|
-
ARGV.replace(argv)
|
14
|
-
@github_url = nil
|
15
|
-
|
16
|
-
generator_set = false
|
17
|
-
template_set = false
|
18
|
-
|
19
|
-
go = GetoptLong.new(*OptionList.options)
|
20
|
-
go.quiet = true
|
21
|
-
|
22
|
-
go.each do |opt, arg|
|
23
|
-
case opt
|
24
|
-
when "--github_url" then @github_url = arg
|
25
|
-
when "--fmt" then generator_set = true
|
26
|
-
when "--template" then template_set = true
|
27
|
-
end
|
28
|
-
end
|
29
|
-
ensure
|
30
|
-
ARGV.replace(old_argv)
|
31
|
-
end
|
32
|
-
super(argv, generators)
|
33
|
-
|
34
|
-
unless generator_set
|
35
|
-
@generator_name = 'shtml'
|
36
|
-
setup_generator(generators)
|
37
|
-
end
|
38
|
-
|
39
|
-
unless template_set
|
40
|
-
@template = @generator_name
|
41
|
-
end
|
42
|
-
end
|
43
|
-
|
44
|
-
def setup_generator(generators)
|
45
|
-
if @generator_name == 'shtml'
|
46
|
-
@all_one_file = false
|
47
|
-
end
|
48
|
-
super(generators)
|
49
|
-
end
|
50
|
-
end
|
51
|
-
|
52
|
-
end
|
53
|
-
|
54
|
-
Options::OptionList::OPTION_LIST << ['--github_url', '-G', 'url', 'Github url prefix like http://github.com/rails/rails']
|
55
|
-
|
56
|
-
class Options
|
57
|
-
def self.instance
|
58
|
-
SDoc::Options.instance
|
59
|
-
end
|
60
|
-
end
|
61
|
-
|
data/test/options_test.rb
DELETED
@@ -1,33 +0,0 @@
|
|
1
|
-
require "test_helper"
|
2
|
-
|
3
|
-
class OptionsTest < Test::Unit::TestCase
|
4
|
-
def test_should_add_github_url_option
|
5
|
-
o = Options.instance
|
6
|
-
o.parse(%w(--github_url http://www.github.com), RDoc::RDoc::GENERATORS)
|
7
|
-
assert_not_nil(o.github_url)
|
8
|
-
end
|
9
|
-
|
10
|
-
def test_should_set_default_generator_to_shtml
|
11
|
-
o = Options.instance
|
12
|
-
o.parse(%w(--github_url http://www.github.com), RDoc::RDoc::GENERATORS)
|
13
|
-
assert_equal('shtml', o.generator.key)
|
14
|
-
end
|
15
|
-
|
16
|
-
def test_should_set_default_template_to_shtml
|
17
|
-
o = Options.instance
|
18
|
-
o.parse(%w(--github_url http://www.github.com), RDoc::RDoc::GENERATORS)
|
19
|
-
assert_equal('shtml', o.template)
|
20
|
-
end
|
21
|
-
|
22
|
-
def test_should_set_is_all_in_one_file_to_false
|
23
|
-
o = Options.instance
|
24
|
-
o.parse(%w(--one-file), RDoc::RDoc::GENERATORS)
|
25
|
-
assert(!o.all_one_file, "Should not use all in one file")
|
26
|
-
end
|
27
|
-
|
28
|
-
def test_should_set_is_all_in_one_file_to_false_if_fmt_present
|
29
|
-
o = Options.instance
|
30
|
-
o.parse(%w(--one-file --fmt shtml), RDoc::RDoc::GENERATORS)
|
31
|
-
assert(!o.all_one_file, "Should not use all in one file")
|
32
|
-
end
|
33
|
-
end
|