yard 0.7.2 → 0.7.3
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of yard might be problematic. Click here for more details.
- data/ChangeLog +205 -0
- data/README.md +52 -73
- data/Rakefile +17 -2
- data/docs/GettingStarted.md +6 -2
- data/lib/yard.rb +1 -1
- data/lib/yard/cli/yri.rb +1 -1
- data/lib/yard/code_objects/macro_object.rb +1 -1
- data/lib/yard/handlers/base.rb +1 -1
- data/lib/yard/handlers/ruby/attribute_handler.rb +1 -1
- data/lib/yard/handlers/ruby/base.rb +2 -2
- data/lib/yard/handlers/ruby/exception_handler.rb +9 -7
- data/lib/yard/handlers/ruby/legacy/exception_handler.rb +3 -4
- data/lib/yard/handlers/ruby/visibility_handler.rb +1 -1
- data/lib/yard/parser/c_parser.rb +40 -5
- data/lib/yard/parser/ruby/ast_node.rb +2 -1
- data/lib/yard/parser/ruby/ruby_parser.rb +47 -7
- data/lib/yard/parser/source_parser.rb +13 -2
- data/lib/yard/rubygems/specification.rb +2 -2
- data/lib/yard/templates/helpers/html_helper.rb +13 -8
- data/lib/yard/templates/helpers/markup_helper.rb +1 -1
- data/lib/yard/verifier.rb +2 -2
- data/spec/cli/server_spec.rb +7 -6
- data/spec/cli/yri_spec.rb +1 -1
- data/spec/code_objects/extra_file_object_spec.rb +1 -1
- data/spec/config_spec.rb +0 -1
- data/spec/handlers/base_spec.rb +2 -2
- data/spec/handlers/constant_handler_spec.rb +1 -1
- data/spec/handlers/examples/exception_handler_001.rb.txt +4 -0
- data/spec/handlers/exception_handler_spec.rb +4 -0
- data/spec/handlers/ruby/base_spec.rb +3 -3
- data/spec/parser/c_parser_spec.rb +100 -11
- data/spec/parser/ruby/ast_node_spec.rb +2 -1
- data/spec/parser/ruby/ruby_parser_spec.rb +43 -2
- data/spec/parser/source_parser_spec.rb +2 -1
- data/spec/templates/examples/method001.html +3 -2
- data/spec/templates/helpers/html_helper_spec.rb +26 -5
- data/templates/default/fulldoc/html/css/full_list.css +2 -0
- data/templates/default/fulldoc/html/css/style.css +2 -0
- data/templates/default/fulldoc/html/full_list_methods.erb +1 -1
- data/templates/default/fulldoc/html/js/full_list.js +23 -6
- data/templates/default/tags/html/option.erb +2 -2
- data/templates/guide/fulldoc/html/css/style.css +2 -0
- metadata +23 -28
data/ChangeLog
CHANGED
@@ -1,5 +1,210 @@
|
|
1
|
+
2011-10-15 Loren Segal <lsegal@soen.ca>
|
2
|
+
|
3
|
+
* ChangeLog, README.md, lib/yard.rb: Update README, ChangeLog and bump to
|
4
|
+
0.7.3 for release
|
5
|
+
|
6
|
+
* Rakefile: Add ruby193 to suite
|
7
|
+
|
8
|
+
* spec/config_spec.rb: Remove unnecessary file? stub, fixes JRuby spec
|
9
|
+
|
10
|
+
* lib/yard/parser/c_parser.rb, spec/parser/c_parser_spec.rb: Support
|
11
|
+
rb_define_attr in CRuby code Allows for commented /* rb_define_attr */ block
|
12
|
+
to define an attribute silently when attribute methods are defined through
|
13
|
+
rb_define_method. Closes #362
|
14
|
+
|
15
|
+
* docs/GettingStarted.md: Fix reference to changed method name in Getting
|
16
|
+
Started documentation
|
17
|
+
|
18
|
+
2011-10-14 Loren Segal <lsegal@soen.ca>
|
19
|
+
|
20
|
+
* lib/yard/parser/ruby/ruby_parser.rb, spec/parser/ruby/ruby_parser_spec.rb:
|
21
|
+
Fix tokenizing of heredoc source Closes #366
|
22
|
+
|
23
|
+
* lib/yard/code_objects/macro_object.rb: Fix escaping of {}
|
24
|
+
|
25
|
+
* lib/yard/templates/helpers/html_helper.rb,
|
26
|
+
spec/templates/helpers/html_helper_spec.rb: Use ! to escape {} syntax
|
27
|
+
|
28
|
+
* spec/cli/server_spec.rb, spec/handlers/constant_handler_spec.rb: Make tests
|
29
|
+
more Windows friendly
|
30
|
+
|
31
|
+
* lib/yard/parser/ruby/ruby_parser.rb: Fix parsing of %w{} and %w() when
|
32
|
+
ended by a newline
|
33
|
+
|
34
|
+
* README.md: Sentence rewording
|
35
|
+
|
36
|
+
* README.md: Get rid of those unicode characters in README
|
37
|
+
|
38
|
+
* templates/default/fulldoc/html/css/style.css,
|
39
|
+
templates/guide/fulldoc/html/css/style.css: Add styling for RDoc definition
|
40
|
+
lists (default and guide templates) Fixes #359
|
41
|
+
|
42
|
+
2011-10-14 Dirkjan Bussink <d.bussink@gmail.com>
|
43
|
+
|
44
|
+
* lib/yard/verifier.rb: Use remove_method instead of undef_method
|
45
|
+
undef_method has very different semantics. It prevents the class from
|
46
|
+
responding to the named method. This means that also original methods on
|
47
|
+
super classes won't be called. This for example results in weird behavior on
|
48
|
+
Rubinius since the original method_missing method can't be called which
|
49
|
+
normally throws the NoMethodError. Also see:
|
50
|
+
http://www.nach-vorne.de/2008/2/28/undef_method-remove_method/index.html
|
51
|
+
|
52
|
+
2011-10-07 Loren Segal <lsegal@soen.ca>
|
53
|
+
|
54
|
+
* lib/yard/parser/ruby/ruby_parser.rb, spec/parser/ruby/ruby_parser_spec.rb:
|
55
|
+
Clean up array AST node handling
|
56
|
+
|
57
|
+
2011-10-05 Loren Segal <lsegal@soen.ca>
|
58
|
+
|
59
|
+
* templates/default/fulldoc/html/css/full_list.css,
|
60
|
+
templates/default/fulldoc/html/js/full_list.js: Force items to show in list
|
61
|
+
search when parent lists are collapsed. Fixes #392
|
62
|
+
|
63
|
+
* templates/default/fulldoc/html/js/full_list.js: Improve JS searching
|
64
|
+
capabilities by adding minimal fuzzy finding behaviour. Toggle case sensitive
|
65
|
+
searching when capital letters are used
|
66
|
+
|
67
|
+
2011-10-04 Grégory Karékinian <greg@karekinian.com>
|
68
|
+
|
69
|
+
* docs/GettingStarted.md: Added information about escaping curly braces
|
70
|
+
|
71
|
+
2011-10-01 Loren Segal <lsegal@soen.ca>
|
72
|
+
|
73
|
+
* lib/yard/parser/ruby/ruby_parser.rb, spec/parser/ruby/ruby_parser_spec.rb:
|
74
|
+
Fix displaying of source for unary operator nodes in the AST Closes #371
|
75
|
+
|
76
|
+
* lib/yard/templates/helpers/markup_helper.rb: Print proper missing gem error
|
77
|
+
message for files with auto-detected markups that are different from default
|
78
|
+
markup format. Closes #373
|
79
|
+
|
80
|
+
* lib/yard/parser/source_parser.rb: Display backtraces on parser errors in
|
81
|
+
debugging mode
|
82
|
+
|
83
|
+
* lib/yard/parser/ruby/ruby_parser.rb, spec/parser/ruby/ruby_parser_spec.rb:
|
84
|
+
Fixes "Bad value for range" error in 1.9.2-p290 and 1.9.3 when using %w{}
|
85
|
+
syntax (changes to ripper API). Fixes #370
|
86
|
+
|
87
|
+
2011-07-12 Tobias Koch <tobias@tobijk.de>
|
88
|
+
|
89
|
+
* lib/yard/parser/c_parser.rb: More flexible return type guessing in c-parser
|
90
|
+
* handle keyword (un)signed for Integers * handle class names as return
|
91
|
+
types * recognize C++ 'bool' * treat return types starting with 'char' as
|
92
|
+
String
|
93
|
+
|
94
|
+
* lib/yard/parser/c_parser.rb: Find override comment for C constructor
|
95
|
+
|
96
|
+
2011-10-01 Loren Segal <lsegal@soen.ca>
|
97
|
+
|
98
|
+
* lib/yard/parser/ruby/ruby_parser.rb, spec/parser/ruby/ruby_parser_spec.rb:
|
99
|
+
Fix broken ruby parser specs
|
100
|
+
|
101
|
+
2011-09-07 Loren Segal <lsegal@soen.ca>
|
102
|
+
|
103
|
+
* spec/code_objects/extra_file_object_spec.rb, spec/handlers/base_spec.rb,
|
104
|
+
spec/parser/source_parser_spec.rb,
|
105
|
+
spec/templates/helpers/html_helper_spec.rb: Fix various encoding and toplevel
|
106
|
+
class variable changes for 1.9.3 compatibility
|
107
|
+
|
108
|
+
* lib/yard/handlers/ruby/attribute_handler.rb,
|
109
|
+
lib/yard/handlers/ruby/base.rb, lib/yard/handlers/ruby/visibility_handler.rb,
|
110
|
+
lib/yard/parser/ruby/ast_node.rb, spec/handlers/ruby/base_spec.rb,
|
111
|
+
spec/parser/ruby/ast_node_spec.rb: Add support for new Ripper vcall AST node,
|
112
|
+
replaces var_ref for method calls Closes #384
|
113
|
+
|
114
|
+
* lib/yard/handlers/base.rb, lib/yard/parser/source_parser.rb: LoadOrderError
|
115
|
+
should not stuff continuation inside of message (1.9.3 now calls to_s on
|
116
|
+
raise argument)
|
117
|
+
|
118
|
+
* Rakefile, lib/yard/cli/yri.rb: Remove depcrecated Config in favour of
|
119
|
+
RbConfig
|
120
|
+
|
121
|
+
2011-08-18 Kouhei Sutou <kou@clear-code.com>
|
122
|
+
|
123
|
+
* lib/yard/templates/helpers/html_helper.rb: escape HTML meta characters in
|
124
|
+
text for HTML output. Here is an example text file. hello.txt: Hello >_<!
|
125
|
+
Here is a command to generate HTML: % yardoc - hello.txt It generates the
|
126
|
+
following HTML: ... ...<pre>Hello >_<!</pre>... ... We should escape ">",
|
127
|
+
"<" and so on in text to output valid HTML.
|
128
|
+
|
129
|
+
2011-08-14 Loren Segal <lsegal@soen.ca>
|
130
|
+
|
131
|
+
* spec/templates/examples/method001.html: Fix broken spec from incomplete
|
132
|
+
merge on #372
|
133
|
+
|
134
|
+
2011-08-07 Kouhei Sutou <kou@clear-code.com>
|
135
|
+
|
136
|
+
* templates/default/tags/html/option.erb: fix wrong close tag.
|
137
|
+
|
138
|
+
2011-07-01 Rob Gleeson <rob@flowof.info>
|
139
|
+
|
140
|
+
* lib/yard/templates/helpers/html_helper.rb: Add support for GitHub
|
141
|
+
codeblocks when using RedCarpet.
|
142
|
+
|
143
|
+
2011-07-07 Kouhei Sutou <kou@clear-code.com>
|
144
|
+
|
145
|
+
* .../default/fulldoc/html/full_list_methods.erb: [template][html] add
|
146
|
+
missing escape in object link label. This problem can be reproducable by the
|
147
|
+
following steps: 1. Create the following script: class Array def &(other)
|
148
|
+
end end 2. Genreate documents from the above script: % yardoc array-amp.rb
|
149
|
+
3. Find link markup in method_list.html: % grep '#&' method_list.html <span
|
150
|
+
class='object_link'><a href="Array.html#%26-instance_method" title="Array#&
|
151
|
+
(method)">#&</a></span> '>#&</a' should be '>#&</a'.
|
152
|
+
|
153
|
+
* lib/yard/templates/helpers/html_helper.rb,
|
154
|
+
spec/templates/helpers/html_helper_spec.rb: [html] fix missing escape in
|
155
|
+
title.
|
156
|
+
|
157
|
+
2011-06-22 Loren Segal <lsegal@soen.ca>
|
158
|
+
|
159
|
+
* lib/yard/handlers/ruby/exception_handler.rb,
|
160
|
+
lib/yard/handlers/ruby/legacy/exception_handler.rb,
|
161
|
+
spec/handlers/exception_handler_spec.rb: Ignore empty raise calls instead. It
|
162
|
+
is too ambiguous for YARD to guess at
|
163
|
+
|
164
|
+
* spec/parser/c_parser_spec.rb: Fix C parser spec
|
165
|
+
|
166
|
+
* lib/yard/parser/c_parser.rb, spec/parser/c_parser_spec.rb: Handle proper
|
167
|
+
filenames in C parser /* in FILE */ declarations Closes #358
|
168
|
+
|
169
|
+
* spec/parser/c_parser_spec.rb: Refactor C parser specs
|
170
|
+
|
171
|
+
2011-06-20 Sven Fuchs <svenfuchs@artweb-design.de>
|
172
|
+
|
173
|
+
* .travis.yml: Don't use bundler_args: --local in .travis.yml This setting
|
174
|
+
only works on the current production worker because the gems all happen to be
|
175
|
+
installed already. The new worker setup will rollback changes after every
|
176
|
+
install and so tests will always fail with this setting.
|
177
|
+
|
178
|
+
2011-06-19 Loren Segal <lsegal@soen.ca>
|
179
|
+
|
180
|
+
* lib/yard/rubygems/specification.rb: Support RubyGems 1.8.x in
|
181
|
+
rubygems_plugin.rb
|
182
|
+
|
183
|
+
2011-06-15 Loren Segal <lsegal@soen.ca>
|
184
|
+
|
185
|
+
* lib/yard/handlers/ruby/exception_handler.rb,
|
186
|
+
lib/yard/handlers/ruby/legacy/exception_handler.rb,
|
187
|
+
.../handlers/examples/exception_handler_001.rb.txt,
|
188
|
+
spec/handlers/exception_handler_spec.rb: Handle empty raise statements as
|
189
|
+
raising Exception Closes #356
|
190
|
+
|
1
191
|
2011-06-14 Loren Segal <lsegal@soen.ca>
|
2
192
|
|
193
|
+
* README.md: Point contributors section to github's contributors page (easier
|
194
|
+
maintenance)
|
195
|
+
|
196
|
+
* .travis.yml: Only test for 1.8.6, 1.8.7 and ree on travis-ci.org
|
197
|
+
|
198
|
+
* .travis.yml: One more update for Travis CI
|
199
|
+
|
200
|
+
* Rakefile: Fix travis_ci task status exiting and legacy mode
|
201
|
+
|
202
|
+
* Gemfile: Remove ripper from Gemfile temporarily
|
203
|
+
|
204
|
+
* .travis.yml, Rakefile, spec/cli/yri_spec.rb: Add support for travis-ci.org
|
205
|
+
|
206
|
+
* Gemfile: Fix Gemfile to add ripper/rubygems sources
|
207
|
+
|
3
208
|
* ChangeLog, README.md, lib/yard.rb: 0.7.2 release
|
4
209
|
|
5
210
|
* lib/yard/templates/helpers/html_helper.rb,
|
data/README.md
CHANGED
@@ -8,43 +8,43 @@ YARD: Yay! A Ruby Documentation Tool
|
|
8
8
|
**Contributors**: See Contributors section below
|
9
9
|
**Copyright**: 2007-2011
|
10
10
|
**License**: MIT License
|
11
|
-
**Latest Version**: 0.7.
|
12
|
-
**Release Date**:
|
11
|
+
**Latest Version**: 0.7.3 (codename "Rhombus")
|
12
|
+
**Release Date**: October 15th 2011
|
13
13
|
|
14
14
|
Synopsis
|
15
15
|
--------
|
16
16
|
|
17
|
-
YARD is a documentation generation tool for the Ruby programming language.
|
18
|
-
It enables the user to generate consistent, usable documentation that can be
|
19
|
-
exported to a number of formats very easily, and also supports extending for
|
20
|
-
custom Ruby constructs such as custom class level definitions. Below is a
|
17
|
+
YARD is a documentation generation tool for the Ruby programming language.
|
18
|
+
It enables the user to generate consistent, usable documentation that can be
|
19
|
+
exported to a number of formats very easily, and also supports extending for
|
20
|
+
custom Ruby constructs such as custom class level definitions. Below is a
|
21
21
|
summary of some of YARD's notable features.
|
22
22
|
|
23
23
|
|
24
24
|
Feature List
|
25
25
|
------------
|
26
26
|
|
27
|
-
**1. RDoc/SimpleMarkup Formatting Compatibility**: YARD is made to be compatible
|
28
|
-
with RDoc formatting. In fact, YARD does no processing on RDoc documentation
|
29
|
-
strings, and leaves this up to the output generation tool to decide how to
|
30
|
-
render the documentation.
|
31
|
-
|
32
|
-
**2. Yardoc Meta-tag Formatting Like Python, Java, Objective-C and other languages**:
|
33
|
-
YARD uses a '@tag' style definition syntax for meta tags alongside regular code
|
34
|
-
documentation. These tags should be able to happily sit side by side RDoc formatted
|
35
|
-
documentation, but provide a much more consistent and usable way to describe
|
27
|
+
**1. RDoc/SimpleMarkup Formatting Compatibility**: YARD is made to be compatible
|
28
|
+
with RDoc formatting. In fact, YARD does no processing on RDoc documentation
|
29
|
+
strings, and leaves this up to the output generation tool to decide how to
|
30
|
+
render the documentation.
|
31
|
+
|
32
|
+
**2. Yardoc Meta-tag Formatting Like Python, Java, Objective-C and other languages**:
|
33
|
+
YARD uses a '@tag' style definition syntax for meta tags alongside regular code
|
34
|
+
documentation. These tags should be able to happily sit side by side RDoc formatted
|
35
|
+
documentation, but provide a much more consistent and usable way to describe
|
36
36
|
important information about objects, such as what parameters they take and what types
|
37
|
-
they are expected to be, what type a
|
37
|
+
they are expected to be, what type a
|
38
38
|
raise, if it is deprecated, etc.. It also allows information to be better (and more
|
39
|
-
consistently) organized
|
39
|
+
consistently) organized
|
40
40
|
of tags in the {file:docs/Tags.md#taglist Tags.md} file.
|
41
41
|
|
42
|
-
YARD also supports an optional "types" declarations for certain tags.
|
43
|
-
This allows the developer to document type signatures for ruby methods and
|
44
|
-
parameters in a non intrusive but helpful and consistent manner. Instead of
|
45
|
-
describing this data in the body of the description, a developer may formally
|
46
|
-
declare the parameter or return type(s) in a single line. Consider the
|
47
|
-
following
|
42
|
+
YARD also supports an optional "types" declarations for certain tags.
|
43
|
+
This allows the developer to document type signatures for ruby methods and
|
44
|
+
parameters in a non intrusive but helpful and consistent manner. Instead of
|
45
|
+
describing this data in the body of the description, a developer may formally
|
46
|
+
declare the parameter or return type(s) in a single line. Consider the
|
47
|
+
following method documented with YARD formatting:
|
48
48
|
|
49
49
|
# Reverses the contents of a String or IO object.
|
50
50
|
#
|
@@ -56,16 +56,16 @@ following Yardoc'd method:
|
|
56
56
|
end
|
57
57
|
|
58
58
|
With the above @param tag, we learn that the contents parameter can either be
|
59
|
-
a String or any object that responds to the 'read' method, which is more
|
60
|
-
powerful than the textual description, which says it should be an IO object.
|
61
|
-
This also informs the developer that they should expect to receive a String
|
62
|
-
object returned by the method, and although this may be obvious for a
|
63
|
-
'reverse' method, it becomes very useful when the method name may not be as
|
64
|
-
descriptive.
|
59
|
+
a String or any object that responds to the 'read' method, which is more
|
60
|
+
powerful than the textual description, which says it should be an IO object.
|
61
|
+
This also informs the developer that they should expect to receive a String
|
62
|
+
object returned by the method, and although this may be obvious for a
|
63
|
+
'reverse' method, it becomes very useful when the method name may not be as
|
64
|
+
descriptive.
|
65
65
|
|
66
66
|
**3. Custom Constructs and Extensibility of YARD**: YARD is designed to be
|
67
67
|
extended and customized by plugins. Take for instance the scenario where you
|
68
|
-
need to document the following code:
|
68
|
+
need to document the following code:
|
69
69
|
|
70
70
|
class List
|
71
71
|
# Sets the publisher name for the list.
|
@@ -73,27 +73,27 @@ need to document the following code:
|
|
73
73
|
end
|
74
74
|
|
75
75
|
This custom declaration provides dynamically generated code that is hard for a
|
76
|
-
documentation tool to properly document without help from the developer. To
|
77
|
-
ease the pains of manually documenting the procedure, YARD can be extended by
|
76
|
+
documentation tool to properly document without help from the developer. To
|
77
|
+
ease the pains of manually documenting the procedure, YARD can be extended by
|
78
78
|
the developer to handle the `cattr_accessor` construct and automatically create
|
79
|
-
an attribute on the class with the associated documentation. This makes
|
79
|
+
an attribute on the class with the associated documentation. This makes
|
80
80
|
documenting external API's, especially dynamic ones, a lot more consistent for
|
81
|
-
consumption by the users.
|
81
|
+
consumption by the users.
|
82
82
|
|
83
83
|
YARD is also designed for extensibility everywhere else, allowing you to add
|
84
84
|
support for new programming languages, new data structures and even where/how
|
85
85
|
data is stored.
|
86
86
|
|
87
|
-
**4. Raw Data Output**: YARD also outputs documented objects as raw data (the
|
88
|
-
dumped Namespace) which can be reloaded to do generation at a later date, or
|
89
|
-
even auditing on code. This means that any developer can use the raw data to
|
90
|
-
perform output generation for any custom format, such as YAML, for instance.
|
91
|
-
While YARD plans to support XHTML style documentation output as well as
|
87
|
+
**4. Raw Data Output**: YARD also outputs documented objects as raw data (the
|
88
|
+
dumped Namespace) which can be reloaded to do generation at a later date, or
|
89
|
+
even auditing on code. This means that any developer can use the raw data to
|
90
|
+
perform output generation for any custom format, such as YAML, for instance.
|
91
|
+
While YARD plans to support XHTML style documentation output as well as
|
92
92
|
command line (text based) and possibly XML, this may still be useful for those
|
93
|
-
who would like to reap the benefits of YARD's processing in other forms, such
|
94
|
-
as throwing all the documentation into a database. Another useful way of
|
93
|
+
who would like to reap the benefits of YARD's processing in other forms, such
|
94
|
+
as throwing all the documentation into a database. Another useful way of
|
95
95
|
exploiting this raw data format would be to write tools that can auto generate
|
96
|
-
test cases, for example, or show possible unhandled exceptions in code.
|
96
|
+
test cases, for example, or show possible unhandled exceptions in code.
|
97
97
|
|
98
98
|
**5. Local Documentation Server**: YARD can serve documentation for projects
|
99
99
|
or installed gems (similar to `gem server`) with the added benefit of dynamic
|
@@ -289,6 +289,12 @@ More options can be seen by typing `yard-graph --help`, but here is an example:
|
|
289
289
|
Changelog
|
290
290
|
---------
|
291
291
|
|
292
|
+
- **October.15.11**: 0.7.3 release
|
293
|
+
- Improve support for parsing under Ruby 1.9.2p290 and 1.9.3 (#365, #370)
|
294
|
+
- Add support for SWIG generated CRuby code (#369)
|
295
|
+
- Add support for `rb_define_attr` calls in CRuby code (#362)
|
296
|
+
- Handle file pointers in CRuby code (#358)
|
297
|
+
|
292
298
|
- **June.14.11**: 0.7.2 release
|
293
299
|
- Fix `yard --help` not showing proper output
|
294
300
|
- YARD now expands path to `.yardoc` file in daemon mode for server (#328)
|
@@ -482,37 +488,10 @@ Changelog
|
|
482
488
|
Contributors
|
483
489
|
------------
|
484
490
|
|
485
|
-
Special thanks to
|
486
|
-
|
487
|
-
|
488
|
-
|
489
|
-
* Michael Edgar
|
490
|
-
* Sam Rawlins
|
491
|
-
* Yehuda Katz
|
492
|
-
* Duane Johnson
|
493
|
-
* Hal Brodigan
|
494
|
-
* Edward Muller
|
495
|
-
* Pieter van de Bruggen
|
496
|
-
* Leonid Borisenko
|
497
|
-
* Arthur Schreiber
|
498
|
-
* Robert Wahler
|
499
|
-
* Mark Evans
|
500
|
-
* Lee Jarvis
|
501
|
-
* Franklin Webber
|
502
|
-
* Dominik Honnef
|
503
|
-
* David Turnbull
|
504
|
-
* Bob Aman
|
505
|
-
* Anthony Thibault
|
506
|
-
* Philip Roberts
|
507
|
-
* Jeff Rafter
|
508
|
-
* Elliottcable
|
509
|
-
* James Rosen
|
510
|
-
* Jake Kerr
|
511
|
-
* Gioele Barabucci
|
512
|
-
* Gabriel Horner
|
513
|
-
* Denis Defreyne
|
514
|
-
* Benjamin Bock
|
515
|
-
* Aman Gupta
|
491
|
+
Special thanks to all contributors for submitting patches. A full list of
|
492
|
+
contributors including their patches can be found at:
|
493
|
+
|
494
|
+
http://github.com/lsegal/yard/contributors
|
516
495
|
|
517
496
|
Copyright
|
518
497
|
---------
|
data/Rakefile
CHANGED
@@ -3,7 +3,7 @@ require File.dirname(__FILE__) + '/lib/yard/rubygems/specification'
|
|
3
3
|
require 'rbconfig'
|
4
4
|
|
5
5
|
YARD::VERSION.replace(ENV['YARD_VERSION']) if ENV['YARD_VERSION']
|
6
|
-
WINDOWS = (
|
6
|
+
WINDOWS = (RbConfig::CONFIG['host_os'] =~ /mingw|win32|cygwin/ ? true : false) rescue false
|
7
7
|
SUDO = WINDOWS ? '' : 'sudo'
|
8
8
|
|
9
9
|
task :default => :specs
|
@@ -20,7 +20,7 @@ end
|
|
20
20
|
|
21
21
|
desc 'Run spec suite'
|
22
22
|
task :suite do
|
23
|
-
['ruby186', 'ruby18', 'ruby19', 'ruby192', 'jruby'].each do |ruby|
|
23
|
+
['ruby186', 'ruby18', 'ruby19', 'ruby192', 'ruby193', 'jruby'].each do |ruby|
|
24
24
|
2.times do |legacy|
|
25
25
|
next if legacy == 1 && ruby =~ /^jruby|186/
|
26
26
|
puts "Running specs with #{ruby}#{legacy == 1 ? ' (in legacy mode)' : ''}"
|
@@ -31,6 +31,21 @@ task :suite do
|
|
31
31
|
end
|
32
32
|
end
|
33
33
|
|
34
|
+
task :travis_ci do
|
35
|
+
status = 0
|
36
|
+
ENV['SUITE'] = '1'
|
37
|
+
ENV['CI'] = '1'
|
38
|
+
system "bundle exec rake specs"
|
39
|
+
status = 1 if $?.to_i != 0
|
40
|
+
if RUBY_VERSION >= '1.9' && RUBY_PLATFORM != 'java'
|
41
|
+
puts ""
|
42
|
+
puts "Running specs with in legacy mode"
|
43
|
+
system "bundle exec rake specs LEGACY=1"
|
44
|
+
status = 1 if $?.to_i != 0
|
45
|
+
end
|
46
|
+
exit(status)
|
47
|
+
end
|
48
|
+
|
34
49
|
begin
|
35
50
|
hide = '_spec\.rb$,spec_helper\.rb$,ruby_lex\.rb$,autoload\.rb$'
|
36
51
|
if YARD::Parser::SourceParser.parser_type == :ruby
|
data/docs/GettingStarted.md
CHANGED
@@ -23,7 +23,7 @@ to express small bits of information in a structured and formal manner. While
|
|
23
23
|
RDoc syntax expects you to describe your method in a completely free-form
|
24
24
|
manner, YARD recommends declaring your parameters, return types, etc. with
|
25
25
|
the `@tag` syntax, which makes outputting the documentation more consistent
|
26
|
-
and easier to read. Consider the RDoc documentation for a method
|
26
|
+
and easier to read. Consider the RDoc documentation for a method to_format:
|
27
27
|
|
28
28
|
# Converts the object into textual markup given a specific `format`
|
29
29
|
# (defaults to `:html`)
|
@@ -324,7 +324,11 @@ the link syntax in this tag:
|
|
324
324
|
|
325
325
|
# @see #methodname <- Correct.
|
326
326
|
# @see {#methodname} <- Incorrect.
|
327
|
-
|
327
|
+
|
328
|
+
If you want to use a Hash, prefix the first { with "!":
|
329
|
+
|
330
|
+
# !{ :some_key => 'value' }
|
331
|
+
|
328
332
|
### Linking URLs `{http://...}`
|
329
333
|
|
330
334
|
URLs are also linked using this `{...}` syntax:
|