fl-rocco 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGES.md +73 -0
- data/COPYING +18 -0
- data/README +23 -0
- data/Rakefile +115 -0
- data/bin/rocco +74 -0
- data/lib/rocco.rb +493 -0
- data/lib/rocco/comment_styles.rb +56 -0
- data/lib/rocco/layout.mustache +46 -0
- data/lib/rocco/layout.rb +64 -0
- data/lib/rocco/tasks.rb +123 -0
- data/lib/rocco/version.rb +3 -0
- data/rocco.gemspec +65 -0
- data/test/fixtures/issue10.iso-8859-1.rb +1 -0
- data/test/fixtures/issue10.utf-8.rb +1 -0
- data/test/helper.rb +25 -0
- data/test/suite.rb +5 -0
- data/test/test_basics.rb +63 -0
- data/test/test_block_comment_styles.rb +64 -0
- data/test/test_block_comments.rb +101 -0
- data/test/test_comment_normalization.rb +25 -0
- data/test/test_commentchar_detection.rb +28 -0
- data/test/test_descriptive_section_names.rb +30 -0
- data/test/test_docblock_annotations.rb +23 -0
- data/test/test_heredoc.rb +13 -0
- data/test/test_language_detection.rb +27 -0
- data/test/test_reported_issues.rb +84 -0
- data/test/test_skippable_lines.rb +64 -0
- data/test/test_source_list.rb +29 -0
- data/test/test_stylesheet.rb +23 -0
- metadata +110 -0
@@ -0,0 +1,29 @@
|
|
1
|
+
require File.expand_path('../helper', __FILE__)
|
2
|
+
|
3
|
+
class RoccoSourceListTests < Test::Unit::TestCase
|
4
|
+
def test_flat_sourcelist
|
5
|
+
r = Rocco.new( 'issue26.sh', [ 'issue26a.sh', 'issue26b.sh', 'issue26c.sh' ] ) {
|
6
|
+
"# Comment 1\n# Comment 1\nprint 'omg!'"
|
7
|
+
}
|
8
|
+
html = r.to_html
|
9
|
+
assert(
|
10
|
+
html.include?( '<a class="source" href="issue26a.html">issue26a.sh</a>' ) &&
|
11
|
+
html.include?( '<a class="source" href="issue26b.html">issue26b.sh</a>' ) &&
|
12
|
+
html.include?( '<a class="source" href="issue26c.html">issue26c.sh</a>' ),
|
13
|
+
"URLs correctly generated for files in a flat directory structure"
|
14
|
+
)
|
15
|
+
end
|
16
|
+
|
17
|
+
def test_heiarachical_sourcelist
|
18
|
+
r = Rocco.new( 'a/issue26.sh', [ 'a/issue26a.sh', 'b/issue26b.sh', 'c/issue26c.sh' ] ) {
|
19
|
+
"# Comment 1\n# Comment 1\nprint 'omg!'"
|
20
|
+
}
|
21
|
+
html = r.to_html
|
22
|
+
assert(
|
23
|
+
html.include?( '<a class="source" href="issue26a.html">issue26a.sh</a>' ) &&
|
24
|
+
html.include?( '<a class="source" href="../b/issue26b.html">issue26b.sh</a>' ) &&
|
25
|
+
html.include?( '<a class="source" href="../c/issue26c.html">issue26c.sh</a>' ),
|
26
|
+
"URLs correctly generated for files in a flat directory structure"
|
27
|
+
)
|
28
|
+
end
|
29
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
require File.expand_path('../helper', __FILE__)
|
2
|
+
|
3
|
+
class RoccoStylesheetTests < Test::Unit::TestCase
|
4
|
+
def test_default_stylesheet
|
5
|
+
r = Rocco.new( 'file.rb', [ 'file.rb'] ) {
|
6
|
+
"# Content"
|
7
|
+
}
|
8
|
+
html = r.to_html
|
9
|
+
assert(
|
10
|
+
html.include?('<link rel="stylesheet" href="http://jashkenas.github.com/docco/resources/docco.css">')
|
11
|
+
)
|
12
|
+
end
|
13
|
+
|
14
|
+
def test_custom_stylesheet
|
15
|
+
r = Rocco.new( 'file.rb', [ 'file.rb'], :stylesheet => 'http://example.com/custom.css' ) {
|
16
|
+
"# Content"
|
17
|
+
}
|
18
|
+
html = r.to_html
|
19
|
+
assert(
|
20
|
+
html.include?('<link rel="stylesheet" href="http://example.com/custom.css">')
|
21
|
+
)
|
22
|
+
end
|
23
|
+
end
|
metadata
ADDED
@@ -0,0 +1,110 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: fl-rocco
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.0
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Ryan Tomayko
|
9
|
+
- Mike West
|
10
|
+
autorequire:
|
11
|
+
bindir: bin
|
12
|
+
cert_chain: []
|
13
|
+
date: 2012-01-10 00:00:00.000000000 Z
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
16
|
+
name: redcarpet
|
17
|
+
requirement: &70109930618620 !ruby/object:Gem::Requirement
|
18
|
+
none: false
|
19
|
+
requirements:
|
20
|
+
- - ~>
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: '1.17'
|
23
|
+
type: :runtime
|
24
|
+
prerelease: false
|
25
|
+
version_requirements: *70109930618620
|
26
|
+
- !ruby/object:Gem::Dependency
|
27
|
+
name: mustache
|
28
|
+
requirement: &70109930617760 !ruby/object:Gem::Requirement
|
29
|
+
none: false
|
30
|
+
requirements:
|
31
|
+
- - ! '>='
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: *70109930617760
|
37
|
+
- !ruby/object:Gem::Dependency
|
38
|
+
name: rake
|
39
|
+
requirement: &70109930617000 !ruby/object:Gem::Requirement
|
40
|
+
none: false
|
41
|
+
requirements:
|
42
|
+
- - ~>
|
43
|
+
- !ruby/object:Gem::Version
|
44
|
+
version: '0.9'
|
45
|
+
type: :development
|
46
|
+
prerelease: false
|
47
|
+
version_requirements: *70109930617000
|
48
|
+
description: Docco in Ruby
|
49
|
+
email:
|
50
|
+
- r@tomayko.com
|
51
|
+
- <mike@mikewest.org>
|
52
|
+
executables:
|
53
|
+
- rocco
|
54
|
+
extensions: []
|
55
|
+
extra_rdoc_files: []
|
56
|
+
files:
|
57
|
+
- CHANGES.md
|
58
|
+
- COPYING
|
59
|
+
- README
|
60
|
+
- Rakefile
|
61
|
+
- bin/rocco
|
62
|
+
- lib/rocco.rb
|
63
|
+
- lib/rocco/comment_styles.rb
|
64
|
+
- lib/rocco/layout.mustache
|
65
|
+
- lib/rocco/layout.rb
|
66
|
+
- lib/rocco/tasks.rb
|
67
|
+
- lib/rocco/version.rb
|
68
|
+
- rocco.gemspec
|
69
|
+
- test/fixtures/issue10.iso-8859-1.rb
|
70
|
+
- test/fixtures/issue10.utf-8.rb
|
71
|
+
- test/helper.rb
|
72
|
+
- test/suite.rb
|
73
|
+
- test/test_basics.rb
|
74
|
+
- test/test_block_comment_styles.rb
|
75
|
+
- test/test_block_comments.rb
|
76
|
+
- test/test_comment_normalization.rb
|
77
|
+
- test/test_commentchar_detection.rb
|
78
|
+
- test/test_descriptive_section_names.rb
|
79
|
+
- test/test_docblock_annotations.rb
|
80
|
+
- test/test_heredoc.rb
|
81
|
+
- test/test_language_detection.rb
|
82
|
+
- test/test_reported_issues.rb
|
83
|
+
- test/test_skippable_lines.rb
|
84
|
+
- test/test_source_list.rb
|
85
|
+
- test/test_stylesheet.rb
|
86
|
+
homepage: http://rtomayko.github.com/rocco/
|
87
|
+
licenses: []
|
88
|
+
post_install_message:
|
89
|
+
rdoc_options: []
|
90
|
+
require_paths:
|
91
|
+
- lib
|
92
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
93
|
+
none: false
|
94
|
+
requirements:
|
95
|
+
- - ! '>='
|
96
|
+
- !ruby/object:Gem::Version
|
97
|
+
version: '0'
|
98
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
99
|
+
none: false
|
100
|
+
requirements:
|
101
|
+
- - ! '>='
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
requirements: []
|
105
|
+
rubyforge_project:
|
106
|
+
rubygems_version: 1.8.10
|
107
|
+
signing_key:
|
108
|
+
specification_version: 2
|
109
|
+
summary: Docco in Ruby
|
110
|
+
test_files: []
|