yard-tomdoc 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- data/HISTORY.md +12 -0
- data/NOTICE.md +30 -10
- data/README.md +7 -0
- data/lib/yard-tomdoc/tomdoc.rb +5 -5
- data/lib/yard-tomdoc/version.rb +6 -0
- data/lib/yard-tomdoc-intern.rb +1 -0
- data/test/helper.rb +6 -0
- data/test/system/sample/lib/example.rb +23 -0
- data/test/system/sample/lib/hello_world.rb +13 -0
- data/test/system/test_yardoc.rb +30 -0
- data/test/{test_docstring.rb → unit/test_docstring.rb} +15 -17
- metadata +73 -70
- data/MIT.txt +0 -20
data/HISTORY.md
CHANGED
@@ -1,5 +1,17 @@
|
|
1
1
|
# RELEASE HISTORY
|
2
2
|
|
3
|
+
|
4
|
+
## 0.3.1 | 2011-11-10
|
5
|
+
|
6
|
+
This release simply modernizes the build configuration
|
7
|
+
and adds an systems test. Functionally it has not changed.
|
8
|
+
|
9
|
+
Changes:
|
10
|
+
|
11
|
+
* Modernize the build configuration.
|
12
|
+
* Add systems test and integrate Travis CI.
|
13
|
+
|
14
|
+
|
3
15
|
## 0.3.0 | 2011-06-08
|
4
16
|
|
5
17
|
Okay,looks like tomdoc is ready to handle the dependency. If there
|
data/NOTICE.md
CHANGED
@@ -1,17 +1,37 @@
|
|
1
|
-
COPYRIGHT NOTICES
|
2
|
-
=================
|
1
|
+
# COPYRIGHT NOTICES
|
3
2
|
|
4
|
-
Yard TomDoc
|
5
|
-
-----------
|
6
3
|
|
7
|
-
|
4
|
+
## YARD Tomdoc
|
8
5
|
|
9
|
-
|
6
|
+
**Copyright (c) 2010 Loren Segal, Thomas Sawyer**
|
10
7
|
|
8
|
+
Distributed under the terms of the MIT License (see below).
|
11
9
|
|
12
|
-
TomDoc
|
13
|
-
------
|
14
10
|
|
15
|
-
|
11
|
+
## Tomdoc
|
12
|
+
|
13
|
+
**Copyright (c) 2010 Tom Preston-Werner, Chris Wanstrath**
|
14
|
+
|
15
|
+
Distributed under the terms of the MIT License (see below).
|
16
|
+
|
17
|
+
|
18
|
+
## The MIT License
|
19
|
+
|
20
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
21
|
+
of this software and associated documentation files (the "Software"), to deal
|
22
|
+
in the Software without restriction, including without limitation the rights
|
23
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
24
|
+
copies of the Software, and to permit persons to whom the Software is
|
25
|
+
furnished to do so, subject to the following conditions:
|
26
|
+
|
27
|
+
The above copyright notice and this permission notice shall be included in
|
28
|
+
all copies or substantial portions of the Software.
|
29
|
+
|
30
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
31
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
32
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
33
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
34
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
35
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
36
|
+
THE SOFTWARE.
|
16
37
|
|
17
|
-
Distributed under the terms of the MIT License (see MIT.txt).
|
data/README.md
CHANGED
@@ -1,5 +1,12 @@
|
|
1
1
|
# yard-tomdoc
|
2
2
|
|
3
|
+
| Author: | Thomas Sawyer <transfire@gmail.com> |
|
4
|
+
|------------|------------------------------------------------|
|
5
|
+
| Copyright: | (c) 2010 Loren Segal, Thomas Sawyer |
|
6
|
+
| Home: | http://rubyworks.github.com/yard-tomdoc |
|
7
|
+
| Issues: | http://github.com/rubyworks/yard-tomdoc/issues |
|
8
|
+
| Status: | [![Build Status](https://secure.travis-ci.org/rubyworks/yard-tomdoc.png)](http://travis-ci.org/rubyworks/yard-tomdoc) |
|
9
|
+
|
3
10
|
|
4
11
|
## Description
|
5
12
|
|
data/lib/yard-tomdoc/tomdoc.rb
CHANGED
@@ -72,11 +72,11 @@ module TomDoc
|
|
72
72
|
|
73
73
|
# Returns [String] cleansed comment text.
|
74
74
|
def tomdoc
|
75
|
-
raw
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
75
|
+
#raw
|
76
|
+
clean = raw.split("\n").map do |line|
|
77
|
+
line =~ /^(\s*# ?)/ ? line.sub($1, '') : nil
|
78
|
+
end.compact.join("\n")
|
79
|
+
clean
|
80
80
|
end
|
81
81
|
|
82
82
|
# Returns [Array] document split into sections.
|
data/lib/yard-tomdoc-intern.rb
CHANGED
data/test/helper.rb
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
# This is an example class.
|
2
|
+
class Example
|
3
|
+
|
4
|
+
# Jump is not the kind of method you bring
|
5
|
+
# home to mother.
|
6
|
+
#
|
7
|
+
# how_high - Integer height of the jump
|
8
|
+
#
|
9
|
+
# Examples
|
10
|
+
#
|
11
|
+
# Example.new.jump #=> "tartar"
|
12
|
+
#
|
13
|
+
# Returns String of tartar.
|
14
|
+
def jump(how_high=nil)
|
15
|
+
"tartar"
|
16
|
+
end
|
17
|
+
|
18
|
+
# This is a subexample.
|
19
|
+
class SubExample
|
20
|
+
end
|
21
|
+
|
22
|
+
end
|
23
|
+
|
@@ -0,0 +1,30 @@
|
|
1
|
+
dir = File.expand_path(File.dirname(__FILE__))
|
2
|
+
tmp = dir + '/../../tmp'
|
3
|
+
|
4
|
+
require dir + "/../helper.rb"
|
5
|
+
|
6
|
+
# This test is design to run `yard doc` on the sample project and
|
7
|
+
# check to make sure it was produced successufully.
|
8
|
+
#
|
9
|
+
# NOTE: There is only one test b/c generation has to happen first
|
10
|
+
# and minitest will randomize the order of tests. You have fix?
|
11
|
+
#
|
12
|
+
describe "yard doc" do
|
13
|
+
|
14
|
+
before do
|
15
|
+
FileUtils.mkdir(tmp) unless File.directory?(tmp)
|
16
|
+
FileUtils.cp_r(dir + '/sample', tmp)
|
17
|
+
end
|
18
|
+
|
19
|
+
it "should generate documentation" do
|
20
|
+
Dir.chdir(tmp + '/sample') do
|
21
|
+
success = system "yard doc --plugin yard-tomdoc lib/"
|
22
|
+
|
23
|
+
assert(success, "failed to generate yard documentation")
|
24
|
+
assert File.directory?('doc')
|
25
|
+
|
26
|
+
# TODO: more verifications
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
end
|
@@ -1,29 +1,27 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
require 'minitest/autorun'
|
1
|
+
require File.expand_path(File.dirname(__FILE__)) + "/../helper.rb"
|
4
2
|
|
5
3
|
require "yard"
|
6
|
-
require "yard-tomdoc"
|
4
|
+
#require "yard-tomdoc"
|
7
5
|
|
8
6
|
# TODO: make separate test for this
|
9
|
-
|
7
|
+
require "yard-tomdoc-intern"
|
10
8
|
|
11
9
|
describe YARD::Docstring do
|
12
10
|
|
13
11
|
before do
|
14
12
|
@docstring = YARD::Docstring.new <<-eof
|
15
|
-
Duplicate some text an arbitrary number of times.
|
16
|
-
|
17
|
-
text - The String to be duplicated.
|
18
|
-
count - The Integer number of times to duplicate the text.
|
19
|
-
|
20
|
-
Examples
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
Returns the duplicated String.
|
25
|
-
|
26
|
-
Raises ArgumentError if something bad happened
|
13
|
+
# Duplicate some text an arbitrary number of times.
|
14
|
+
#
|
15
|
+
# text - The String to be duplicated.
|
16
|
+
# count - The Integer number of times to duplicate the text.
|
17
|
+
#
|
18
|
+
# Examples
|
19
|
+
# multiplex('Tom', 4)
|
20
|
+
# # => 'TomTomTomTom'
|
21
|
+
#
|
22
|
+
# Returns the duplicated String.
|
23
|
+
#
|
24
|
+
# Raises ArgumentError if something bad happened
|
27
25
|
eof
|
28
26
|
end
|
29
27
|
|
metadata
CHANGED
@@ -1,105 +1,108 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: yard-tomdoc
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.3.1
|
5
5
|
prerelease:
|
6
|
-
segments:
|
7
|
-
- 0
|
8
|
-
- 3
|
9
|
-
- 0
|
10
|
-
version: 0.3.0
|
11
6
|
platform: ruby
|
12
|
-
authors:
|
13
|
-
- Loren Segal
|
7
|
+
authors:
|
14
8
|
- Thomas Sawyer
|
9
|
+
- Loren Segal
|
15
10
|
autorequire:
|
16
11
|
bindir: bin
|
17
12
|
cert_chain: []
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
13
|
+
date: 2012-02-04 00:00:00.000000000 Z
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
16
|
+
name: yard
|
17
|
+
requirement: &30272280 !ruby/object:Gem::Requirement
|
18
|
+
none: false
|
19
|
+
requirements:
|
20
|
+
- - ! '>='
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: '0'
|
23
|
+
type: :runtime
|
24
|
+
prerelease: false
|
25
|
+
version_requirements: *30272280
|
26
|
+
- !ruby/object:Gem::Dependency
|
27
|
+
name: detroit
|
28
|
+
requirement: &30271760 !ruby/object:Gem::Requirement
|
29
|
+
none: false
|
30
|
+
requirements:
|
31
|
+
- - ! '>='
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :development
|
23
35
|
prerelease: false
|
24
|
-
|
36
|
+
version_requirements: *30271760
|
37
|
+
- !ruby/object:Gem::Dependency
|
38
|
+
name: rake
|
39
|
+
requirement: &30271260 !ruby/object:Gem::Requirement
|
25
40
|
none: false
|
26
|
-
requirements:
|
27
|
-
- -
|
28
|
-
- !ruby/object:Gem::Version
|
29
|
-
|
30
|
-
segments:
|
31
|
-
- 0
|
32
|
-
version: "0"
|
41
|
+
requirements:
|
42
|
+
- - ! '>='
|
43
|
+
- !ruby/object:Gem::Version
|
44
|
+
version: '0'
|
33
45
|
type: :development
|
34
|
-
version_requirements: *id001
|
35
|
-
- !ruby/object:Gem::Dependency
|
36
|
-
name: redline
|
37
46
|
prerelease: false
|
38
|
-
|
47
|
+
version_requirements: *30271260
|
48
|
+
- !ruby/object:Gem::Dependency
|
49
|
+
name: minitest
|
50
|
+
requirement: &30270760 !ruby/object:Gem::Requirement
|
39
51
|
none: false
|
40
|
-
requirements:
|
41
|
-
- -
|
42
|
-
- !ruby/object:Gem::Version
|
43
|
-
|
44
|
-
segments:
|
45
|
-
- 0
|
46
|
-
version: "0"
|
52
|
+
requirements:
|
53
|
+
- - ! '>='
|
54
|
+
- !ruby/object:Gem::Version
|
55
|
+
version: '0'
|
47
56
|
type: :development
|
48
|
-
|
49
|
-
|
50
|
-
|
57
|
+
prerelease: false
|
58
|
+
version_requirements: *30270760
|
59
|
+
description: Use TomDoc documentation format with YARD.
|
60
|
+
email:
|
61
|
+
- transfire@gmail.com
|
51
62
|
executables: []
|
52
|
-
|
53
63
|
extensions: []
|
54
|
-
|
55
|
-
|
64
|
+
extra_rdoc_files:
|
65
|
+
- HISTORY.md
|
56
66
|
- README.md
|
57
|
-
|
67
|
+
- NOTICE.md
|
68
|
+
files:
|
58
69
|
- lib/yard-tomdoc/arg.rb
|
59
70
|
- lib/yard-tomdoc/tomdoc.rb
|
71
|
+
- lib/yard-tomdoc/version.rb
|
60
72
|
- lib/yard-tomdoc/yard.rb
|
61
73
|
- lib/yard-tomdoc-intern.rb
|
62
74
|
- lib/yard-tomdoc.rb
|
63
|
-
- test/
|
75
|
+
- test/helper.rb
|
76
|
+
- test/system/sample/lib/example.rb
|
77
|
+
- test/system/sample/lib/hello_world.rb
|
78
|
+
- test/system/test_yardoc.rb
|
79
|
+
- test/unit/test_docstring.rb
|
64
80
|
- HISTORY.md
|
65
81
|
- README.md
|
66
|
-
- MIT.txt
|
67
82
|
- NOTICE.md
|
68
83
|
homepage: http://rubyworks.github.com/yard-tomdoc
|
69
|
-
licenses:
|
84
|
+
licenses:
|
70
85
|
- MIT
|
71
86
|
post_install_message:
|
72
|
-
rdoc_options:
|
73
|
-
|
74
|
-
- YARD-TomDoc API
|
75
|
-
- --main
|
76
|
-
- README.md
|
77
|
-
require_paths:
|
87
|
+
rdoc_options: []
|
88
|
+
require_paths:
|
78
89
|
- lib
|
79
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
90
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
80
91
|
none: false
|
81
|
-
requirements:
|
82
|
-
- -
|
83
|
-
- !ruby/object:Gem::Version
|
84
|
-
|
85
|
-
|
86
|
-
- 0
|
87
|
-
version: "0"
|
88
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
92
|
+
requirements:
|
93
|
+
- - ! '>='
|
94
|
+
- !ruby/object:Gem::Version
|
95
|
+
version: '0'
|
96
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
89
97
|
none: false
|
90
|
-
requirements:
|
91
|
-
- -
|
92
|
-
- !ruby/object:Gem::Version
|
93
|
-
|
94
|
-
segments:
|
95
|
-
- 0
|
96
|
-
version: "0"
|
98
|
+
requirements:
|
99
|
+
- - ! '>='
|
100
|
+
- !ruby/object:Gem::Version
|
101
|
+
version: '0'
|
97
102
|
requirements: []
|
98
|
-
|
99
|
-
|
100
|
-
rubygems_version: 1.8.2
|
103
|
+
rubyforge_project:
|
104
|
+
rubygems_version: 1.8.11
|
101
105
|
signing_key:
|
102
106
|
specification_version: 3
|
103
107
|
summary: TomDoc for YARD
|
104
108
|
test_files: []
|
105
|
-
|
data/MIT.txt
DELETED
@@ -1,20 +0,0 @@
|
|
1
|
-
The MIT License
|
2
|
-
|
3
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
4
|
-
of this software and associated documentation files (the "Software"), to deal
|
5
|
-
in the Software without restriction, including without limitation the rights
|
6
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
7
|
-
copies of the Software, and to permit persons to whom the Software is
|
8
|
-
furnished to do so, subject to the following conditions:
|
9
|
-
|
10
|
-
The above copyright notice and this permission notice shall be included in
|
11
|
-
all copies or substantial portions of the Software.
|
12
|
-
|
13
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
14
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
15
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
16
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
17
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
18
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
19
|
-
THE SOFTWARE.
|
20
|
-
|