RDoc 4.0.1
drbrain |
- home: https://github.com/rdoc/rdoc
- rdoc: http://docs.seattlerb.org/rdoc
- bugs: https://github.com/rdoc/rdoc/issues
RDoc produces HTML and command-line documentation for Ruby projects. RDoc includes the +rdoc+ and +ri+ tools for generating and displaying documentation from the command-line.
Changes:
- Bug fixes
- RDoc::Options parser should rescue from OptionParser::ParseError.
- Updated example of RDoc::Options to include reopening RDoc::Options. Pointed out by Michael Granger
- Moved RubyGems documentation installed message into RDoc hook. For RubyGems bug #469 by Jeff Sandberg
- An Error is now raised when a heredoc is not terminated. Fixes exceptions when processing comment blocks. Reported by darix
- rdoc --quiet --no-ignore-invalid now exits for invalid options. Pull request #192 by Jeremy Evans
- RDoc::Parser::C no longer ignores a (METHOD) cast in rbdefinemethod. Pull request #184 by Carlos Agarie
- RDoc::Servlet no longer ignores extra directories from -d. Pull request #173 by Thomas Leitner
- Fixed
rdoc --ri-site. Bug #193 by Michal Papis. - RDoc no longer attempts to parse binary files. Bug #189 by postmodern, Bug #190 by Christoffer Lervåg, Bug #195 by Aaron Patterson
rdoc --pipeoutput now containsfor markdown compliance.- RDoc no longer leaves emacs-style modelines in .txt, .md or .rd files. Bug #178 by Zachary Scott
- RDoc no longer puts raw markup in HTML output for markdown input. Bug #204 by Erik Hollensbe
- Code objects with nodoc are no longer included in the ri store. Bug #177 by Thomas Leitner.
- Text#snippet now creates a RDoc::Markup::ToHtmlSnippet correctly.
- The C parser now de-duplicates call-seq if the same C function is used for multiple method names. Bug #203 by Pete Higgins
rdoc 4.0.0
drbrain |
RDoc produces HTML and command-line documentation for Ruby projects. RDoc includes the +rdoc+ and +ri+ tools for generating and displaying documentation from the command-line.
Changes
RDoc 4.0 includes several new features and several breaking changes. The
changes should not affect users of rdoc or ri.
Notable feature additions are markdown support and an WEBrick servlet that can serve HTML from an ri store. (This means that RubyGems 2.0+ no longer needs to build HTML documentation when installing gems.)
Changes since RDoc 3.12.1:
Breaking changes
- The default output encoding for RDoc is now UTF-8. Previously RDoc used the default external encoding which was determined from your locale. Issue #106 by Justin Baker.
RDoc::RI::Store is now RDoc::Store so ri data generated by RDoc 4 cannot be read by earlier versions of RDoc. RDoc::RI::Store exists as an alias of RDoc::Store so ri data from older versions can still be read. RDoc::RI::Store will be removed in RDoc 5.
Tests that create RDoc::CodeObjects on the fly without wiring them into the documentation tree (did not use add_class, add_method, etc.) must be updated to use these methods. The documentation tree automatically attaches them to the store instance which allows lookups to work correctly. Additionally, a new method RDoc::Store#add_file must be used instead of RDoc::TopLevel.new. The latter will not be attached to the documentation tree.
- RDoc generators must accept an RDoc::Store and an RDoc::Options in initialize. RDoc no longer passes an Array of RDoc::TopLevel objects to #generate. Use RDoc::Store#all_files instead.
- Some markup formatters (RDoc::Markup::To*) now accept an RDoc::Options instance as the first argument. Notably, the base class Formatter and ToHtml*. (This is not universal due to the difficult at accessing the user's options instance deep inside RDoc. A future major release may remedy this.)
- Added new markup nodes and specials that RDoc::Markup::Formatter subclasses must handle. If you're using RDoc::Markup::FormatterTestCase the new methods you need to add should be readily apparent.
- Removed RDoc::RI::Paths::SYSDIR and ::SITEDIR. These were hidden constants so no breakage is expected. Use RDoc::RI::Paths::systemdir and ::sitedir instead.
- RDoc::RI::Store#modules has been renamed to RDoc::Store#module_names to avoid confusion with RDoc::Store#all_modules imported from RDoc::TopLevel.
- RDoc::RDocError has been removed. It was deprecated throughout RDoc 3.
- ri -f html is no longer supported.
- Comment definitions in C comments are now only discovered from the first line. A colon on a subsequent line won't trigger definition extraction. Issue #103, see also http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-core/42942
- Fixed :stopdoc: for class A::B where A has not been seen. Issue #95 by Ryan Davis
- RDoc::ClassModule#each_ancestor no longer yields itself if there is circular ancestry
Major enhancements
ri can now show pages (README, etc.)
ri rdoc:README
Will show the README for the latest version of RDoc. You can specify exact gem versions such as "rdoc-4.0:README" or view pages from the standard library documentation with "ruby:README".
RDoc 3 did not save pages in ri data so you will need to regenerate documentation from your gems to use this feature.
- Added Markdown as a supported format. The markdown format can be set on a per-file or per-comment basis with the +:markdown:+ directive like the rd and tomdoc formats and on a per-project basis with rdoc --markup markdown --write-options
Removed global state from RDoc. RDoc::Store holds the documentation tree and connects the driver to the parsers and generator. This also allows documentation parsing and generation for multiple instances, but the rdoc command-line tool does not support this.
Due to this change RDoc::RDoc.current and RDoc::RDoc.reset no longer exist.
Minor enhancements
Added --page-dir option to give pretty names for a FAQ, guides, or other documentation you write that is not stored in the project root. For example, with the following layout:
README.txt guides/syntax.txt guides/conversion.txt
Running
rdoc --page-dir guideswill make the files in "guides" appear to be at the top level of the project. This means they will appear to exist at the top level in HTML output and you can access them withri your\_gem:syntaxandri your\_gem:conversion.- Added --root for building documentation from outside the source dir.
- Added current heading and page-top links to HTML headings.
- Added a ChangeLog parser. It automatically parses files that begin with 'ChangeLog'
- Added a table of contents to the sidebar.
- RDoc markup format merges adjacent labels in a label or note list into a single definition list item for output.
- RDoc now tracks use of extend. Pull request #118 by Michael Granger.
- RDoc now tracks methods that use super. Pull request #116 by Erik Hollensbe.
- Added methods ::systemdir, ::sitedir, ::home_dir and ::gem_dir to fetch the components of RDoc::RI::Paths.path individually.
- Added support for rb_file_const.
- RDoc now processes files in sorted order. Issue #71 by Vít Ondruch
- RDoc now warns with --verbose when methods are duplicated. Issue #71 by Vít Ondruch
- ri will display documentation for all methods in a class if -a is given. Issue #57 by casper
- The RDoc coverage report will report line information for attributes, constants and methods missing documentation. Issue #121 by Zachary Scott
- RDoc now reports a warning for files that are unreadable due to permissions problems.
- RDoc controls documentation generation for RubyGems 2.0+
Bug fixes
- Fixed parsing of multibyte files with incomplete characters at byte 1024. Ruby bug #6393 by nobu, patch by Nobuyoshi Nakada and Yui NARUSE.
- Fixed rdoc -E. Ruby Bug #6392 and (modified) patch by Nobuyoshi Nakada
- Added link handling to Markdown output. Bug #160 by burningTyger.
- Fixed HEREDOC output for the limited case of a heredoc followed by a line end. When a HEREDOC is not followed by a line end RDoc is not currently smart enough to restore the source correctly. Bug #162 by Zachary Scott.
- Fixed parsing of executables with shebang and encoding comments. Bug #161 by Marcus Stollsteimer
- RDoc now ignores methods defined on constants instead of creating a fake module. Bug #163 by Zachary Scott.
- Fixed ChangeLog parsing for FFI gem. Bug #165 by Zachary Scott.
- RDoc now links #=== methods. Bug #164 by Zachary Scott.
- Allow [] following argument names for TomDoc. Bug #167 by Ellis Berner.
- Fixed the RDoc servlet for home and site directories. Bug #170 by Thomas Leitner.
- Fixed references to methods in the RDoc servlet. Bug #171 by Thomas Leitner.
- Fixed debug message when generating the darkfish root page. Pull Request #174 by Thomas Leitner.
- Fixed deletion of attribute ri data when a class was loaded then saved. Issue #171 by Thomas Leitner.
- Fully qualified names for constants declared from the top level are now attached to their class or module properly.
- Fixed table of contents display in HTML output for classes and modules.
- Incremental ri builds of C files now work. C variable names from previous runs are now saved between runs.
- A word that is directly followed by a multi-word tidy link label no longer
disappears. (Like
text{link}[http://example]) - Fixed legacy template support. Pull Request #107 by Justin Baker.
- An HTML class in a verbatim section no longer triggers ruby parsing. Issue #92 by Vijay Dev
- Improved documentation for setting the default documentation format for your ruby project. Issue #94 by Henrik Hodne
- Fixed handling of LANG in the RDoc::Options tests. Issue #99 by Vít Ondruch
- RDoc no longer quits when given an entry that is not a file or directory. Issue #101 by Charles Nutter
- Fixed bug in syntax-highlighting that would corrupt regular expressions. Ruby Bug #6488 by Benny Lyne Amorsen.
- "class Object" no longer appears in the coverage report if all its methods are documented. This suppresses a false positive for libraries that add toplevel methods. Pull Request #128 by Zachary Scott.
- Fixed testgenurl test name in TestRDocMarkupToHtml. Pull Request #130 by Zachary Scott.
- Comment-defined methods ahead of define_method are now discovered. Issue #133 by eclectic923
- Fixed detection of define_method documentation. Issue #138 by Marvin Gülker.
- Fixed lexing of character syntax (
?z). Reported by Xavier Noria. - Add license to gem spec. Issue #144 by pivotalcommon
- Fixed comment selection for classes. Pull request #146 by pioz
- Fixed parsing of
def self.&() end. Issue #148 by Michael Lucy - Generated RD parser files are now included in the gem. Issue #145 by Marvin Gülker
- Class and module aliases now create new classes to avoid duplicate names in the class list. Issue #143 by Richard Schneeman, Rails Issue #2839
- RDoc::Markup::Parser now correctly matches indentation of lists when multibyte characters are used in the list labels. Issue #140 by burningTyger
- Fixed mangling of email addresses that look like labels. Issue #129 by Tobias Koch
- Classes and modules in a C file may now be created in any order. Issue #124 by Su Zhang
- A metaprogrammed method supports the :args: directive. Issue #100
- A metaprogrammed method supports the :yields: directive.
- RDoc will now look for directives up to the end of the line. For example, class B < A; end # :nodoc: will now hide documentation of B. Issue #125 by Zachary Scott
- Fixed tokenization of % when it is not followed by a $-string type
- Fixed display of _END_ in documentation examples in HTML output
- Fixed tokenization of reserved words used as new-style hash keys
- RDoc now handles class << $gvar by ignoring the body
- Fixed parsing of class A:: B.
- Worked around bug in RDoc::RubyLex where tokens won't be reinterpreted after unget_tk.
- Fixed class << ::Foo writing documentation to /Foo.html
- Fixed class ::A referencing itself from inside its own namespace.
Changes since RDoc 4.0.0.rc.2:
- Bug fix
- Templates now use the correct encoding when generating pages. Issue #183 by Vít Ondruch
RDoc 4.0.0.rc.2.1
drbrain |
As a preview release, please file bugs for any problems you have with rdoc at https://github.com/rdoc/rdoc/issues
RDoc 4.0 includes several new features and several breaking changes. The
changes should not affect users of rdoc or ri.
Notable feature additions are markdown support and an WEBrick servlet that can serve HTML from an ri store. (This means that RubyGems 2.0+ no longer needs to build HTML documentation when installing gems.)
Changes since RDoc 3.12.1:
Breaking changes
- The default output encoding for RDoc is now UTF-8. Previously RDoc used the default external encoding which was determined from your locale. Issue #106 by Justin Baker.
RDoc::RI::Store is now RDoc::Store so ri data generated by RDoc 4 cannot be read by earlier versions of RDoc. RDoc::RI::Store exists as an alias of RDoc::Store so ri data from older versions can still be read. RDoc::RI::Store will be removed in RDoc 5.
Tests that create RDoc::CodeObjects on the fly without wiring them into the documentation tree (did not use addclass, addmethod, etc.) must be updated to use these methods. The documentation tree automatically attaches them to the store instance which allows lookups to work correctly. Additionally, a new method RDoc::Store#add_file must be used instead of RDoc::TopLevel.new. The latter will not be attached to the documentation tree.
- RDoc generators must accept an RDoc::Store and an RDoc::Options in initialize. RDoc no longer passes an Array of RDoc::TopLevel objects to #generate. Use RDoc::Store#all_files instead.
- Some markup formatters (RDoc::Markup::To) now accept an RDoc::Options instance as the first argument. Notably, the base class Formatter and ToHtml. (This is not universal due to the difficult at accessing the user's options instance deep inside RDoc. A future major release may remedy this.)
- Added new markup nodes and specials that RDoc::Markup::Formatter subclasses must handle. If you're using RDoc::Markup::FormatterTestCase the new methods you need to add should be readily apparent.
- Removed RDoc::RI::Paths::SYSDIR and ::SITEDIR. These were hidden constants so no breakage is expected. Use RDoc::RI::Paths::systemdir and ::sitedir instead.
- RDoc::RI::Store#modules has been renamed to RDoc::Store#modulenames to avoid confusion with RDoc::Store#allmodules imported from RDoc::TopLevel.
- RDoc::RDocError has been removed. It was deprecated throughout RDoc 3.
- ri -f html is no longer supported.
- Comment definitions in C comments are now only discovered from the first line. A colon on a subsequent line won't trigger definition extraction. Issue #103, see also http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-core/42942
- Fixed :stopdoc: for class A::B where A has not been seen. Issue #95 by Ryan Davis
- RDoc::ClassModule#each_ancestor no longer yields itself if there is circular ancestry
Major enhancements
ri can now show pages (README, etc.)
ri rdoc:README
Will show the README for the latest version of RDoc. You can specify exact gem versions such as "rdoc-4.0:README" or view pages from the standard library documentation with "ruby:README".
RDoc 3 did not save pages in ri data so you will need to regenerate documentation from your gems to use this feature.
- Added Markdown as a supported format. The markdown format can be set on a per-file or per-comment basis with the +:markdown:+ directive like the rd and tomdoc formats and on a per-project basis with rdoc --markup markdown --write-options
Removed global state from RDoc. RDoc::Store holds the documentation tree and connects the driver to the parsers and generator. This also allows documentation parsing and generation for multiple instances, but the rdoc command-line tool does not support this.
Due to this change RDoc::RDoc.current and RDoc::RDoc.reset no longer exist.
Minor enhancements
Added --page-dir option to give pretty names for a FAQ, guides, or other documentation you write that is not stored in the project root. For example, with the following layout:
README.txt guides/syntax.txt guides/conversion.txt
Running
rdoc --page-dir guideswill make the files in "guides" appear to be at the top level of the project. This means they will appear to exist at the top level in HTML output and you can access them withri your_gem:syntaxandri your_gem:conversion.- Added --root for building documentation from outside the source dir.
- Added current heading and page-top links to HTML headings.
- Added a ChangeLog parser. It automatically parses files that begin with 'ChangeLog'
- Added a table of contents to the sidebar.
- RDoc markup format merges adjacent labels in a label or note list into a single definition list item for output.
- RDoc now tracks use of extend. Pull request #118 by Michael Granger.
- RDoc now tracks methods that use super. Pull request #116 by Erik Hollensbe.
- Added methods ::systemdir, ::sitedir, ::homedir and ::gemdir to fetch the components of RDoc::RI::Paths.path individually.
- Added support for rbfileconst.
- RDoc now processes files in sorted order. Issue #71 by Vít Ondruch
- RDoc now warns with --verbose when methods are duplicated. Issue #71 by Vít Ondruch
- ri will display documentation for all methods in a class if -a is given. Issue #57 by casper
- The RDoc coverage report will report line information for attributes, constants and methods missing documentation. Issue #121 by Zachary Scott
- RDoc now reports a warning for files that are unreadable due to permissions problems.
- RDoc controls documentation generation for RubyGems 2.0+
Bug fixes
- Fixed parsing of multibyte files with incomplete characters at byte 1024. Ruby bug #6393 by nobu, patch by Nobuyoshi Nakada and Yui NARUSE.
- Fixed rdoc -E. Ruby Bug #6392 and (modified) patch by Nobuyoshi Nakada
- Added link handling to Markdown output. Bug #160 by burningTyger.
- Fixed HEREDOC output for the limited case of a heredoc followed by a line end. When a HEREDOC is not followed by a line end RDoc is not currently smart enough to restore the source correctly. Bug #162 by Zachary Scott.
- Fixed parsing of executables with shebang and encoding comments. Bug #161 by Marcus Stollsteimer
- RDoc now ignores methods defined on constants instead of creating a fake module. Bug #163 by Zachary Scott.
- Fixed ChangeLog parsing for FFI gem. Bug #165 by Zachary Scott.
- RDoc now links #=== methods. Bug #164 by Zachary Scott.
- Allow [] following argument names for TomDoc. Bug #167 by Ellis Berner.
- Fixed the RDoc servlet for home and site directories. Bug #170 by Thomas Leitner.
- Fixed references to methods in the RDoc servlet. Bug #171 by Thomas Leitner.
- Fixed debug message when generating the darkfish root page. Pull Request #174 by Thomas Leitner.
- Fixed deletion of attribute ri data when a class was loaded then saved. Issue #171 by Thomas Leitner.
- Fully qualified names for constants declared from the top level are now attached to their class or module properly.
- Fixed table of contents display in HTML output for classes and modules.
- Incremental ri builds of C files now work. C variable names from previous runs are now saved between runs.
- A word that is directly followed by a multi-word tidy link label no longer
disappears. (Like
text{link}[http://example]) - Fixed legacy template support. Pull Request #107 by Justin Baker.
- An HTML class in a verbatim section no longer triggers ruby parsing. Issue #92 by Vijay Dev
- Improved documentation for setting the default documentation format for your ruby project. Issue #94 by Henrik Hodne
- Fixed handling of LANG in the RDoc::Options tests. Issue #99 by Vít Ondruch
- RDoc no longer quits when given an entry that is not a file or directory. Issue #101 by Charles Nutter
- Fixed bug in syntax-highlighting that would corrupt regular expressions. Ruby Bug #6488 by Benny Lyne Amorsen.
- "class Object" no longer appears in the coverage report if all its methods are documented. This suppresses a false positive for libraries that add toplevel methods. Pull Request #128 by Zachary Scott.
- Fixed testgenurl test name in TestRDocMarkupToHtml. Pull Request #130 by Zachary Scott.
- Comment-defined methods ahead of define_method are now discovered. Issue #133 by eclectic923
- Fixed detection of define_method documentation. Issue #138 by Marvin Gülker.
- Fixed lexing of character syntax (
?z). Reported by Xavier Noria. - Add license to gem spec. Issue #144 by pivotalcommon
- Fixed comment selection for classes. Pull request #146 by pioz
- Fixed parsing of
def self.&() end. Issue #148 by Michael Lucy - Generated RD parser files are now included in the gem. Issue #145 by Marvin Gülker
- Class and module aliases now create new classes to avoid duplicate names in the class list. Issue #143 by Richard Schneeman, Rails Issue #2839
- RDoc::Markup::Parser now correctly matches indentation of lists when multibyte characters are used in the list labels. Issue #140 by burningTyger
- Fixed mangling of email addresses that look like labels. Issue #129 by Tobias Koch
- Classes and modules in a C file may now be created in any order. Issue #124 by Su Zhang
- A metaprogrammed method supports the :args: directive. Issue #100
- A metaprogrammed method supports the :yields: directive.
- RDoc will now look for directives up to the end of the line. For example, class B < A; end # :nodoc: will now hide documentation of B. Issue #125 by Zachary Scott
- Fixed tokenization of % when it is not followed by a $-string type
- Fixed display of END in documentation examples in HTML output
- Fixed tokenization of reserved words used as new-style hash keys
- RDoc now handles class << $gvar by ignoring the body
- Fixed parsing of class A:: B.
- Worked around bug in RDoc::RubyLex where tokens won't be reinterpreted after unget_tk.
- Fixed class << ::Foo writing documentation to /Foo.html
- Fixed class ::A referencing itself from inside its own namespace.
Changes since RDoc 4.0.0.rc.2:
- Bug fix
- Templates now use the correct encoding when generating pages. Issue #183 by Vít Ondruch
RDoc XSS vulnerability CVE-2013-0256 releases 3.9.5, 3.12.1, 4.0.0.rc.2
drbrain |
RDoc versions 3.9.5, 3.12.1 and 4.0.0.rc.2 have been released!
- home: github.com/rdoc/rdoc
- rdoc: docs.seattlerb.org/rdoc
- bugs: github.com/rdoc/rdoc/issues
RDoc produces HTML and command-line documentation for Ruby projects. RDoc
includes the rdoc and ri tools for generating and
displaying documentation from the command-line.
Vulnerability Description
RDoc documentation generated by rdoc 2.3.0 through rdoc 3.12 and prereleases up to rdoc 4.0.0.preview2.1 are vulnerable to an XSS exploit. This exploit may lead to cookie disclosure to third parties.
The exploit exists in darkfish.js which is copied from the RDoc install location to the generated documentation.
RDoc is a static documentation generation tool. Patching the library itself is insufficient to correct this exploit. Those hosting rdoc documentation will need to apply the following patch. If applied while ignoring whitespace, this patch will correct all affected versions:
diff --git darkfish.js darkfish.js
index 4be722f..f26fd45 100644
--- darkfish.js
+++ darkfish.js
@@ -109,13 +109,15 @@ function hookSearch() {
function highlightTarget( anchor ) {
console.debug( "Highlighting target '%s'.", anchor );
- $("a[name=" + anchor + "]").each( function() {
- if ( !$(this).parent().parent().hasClass('target-section') ) {
- console.debug( "Wrapping the target-section" );
- $('div.method-detail').unwrap( 'div.target-section' );
- $(this).parent().wrap( '<div class="target-section"></div>' );
- } else {
- console.debug( "Already wrapped." );
+ $("a[name]").each( function() {
+ if ( $(this).attr("name") == anchor ) {
+ if ( !$(this).parent().parent().hasClass('target-section') ) {
+ console.debug( "Wrapping the target-section" );
+ $('div.method-detail').unwrap( 'div.target-section' );
+ $(this).parent().wrap( '<div class="target-section"></div>' );
+ } else {
+ console.debug( "Already wrapped." );
+ }
}
});
};
RDoc 3.9.5, 3.12.1 and RDoc 4.0.0.rc.2 and newer are not vulnerable to this exploit.
This exploit was discovered by Evgeny Ermakov corwmh@gmail.com.
This vulnerability has been assigned the CVE identifier CVE-2013-0256.
RDoc 3.9.5
RDoc 3.9.5 was released to match the RDoc in ruby 1.9.3-p385.
- Bug fixes
- Fixed an XSS exploit in darkfish.js. This could lead to cookie disclosure to third parties. See CVE-2013-0256.rdoc for full details including a patch you can apply to generated RDoc documentation.
RDoc 3.12.1
RDoc 3.12.1 was updated as the latest stable release as RDoc 4 is not yet ready.
- Bug fixes
- Fixed an XSS exploit in darkfish.js. This could lead to cookie disclosure to third parties. See CVE-2013-0256.rdoc for full details including a patch you can apply to generated RDoc documentation.
- Ensured that rd parser files are generated before checking the manifest.
RDoc 4.0.0.rc.2
Minor enhancements
- Added current heading and page-top links to HTML headings.
Bug fixes
- Fixed an XSS exploit in darkfish.js. This could lead to cookie disclosure to third parties. See CVE-2013-0256.rdoc for full details including a patch you can apply to generated RDoc documentation.
- Fixed parsing of multibyte files with incomplete characters at byte 1024. Ruby bug #6393 by nobu, patch by Nobuyoshi Nakada and Yui NARUSE.
- Fixed rdoc -E. Ruby Bug #6392 and (modified) patch by Nobuyoshi Nakada
- Added link handling to Markdown output. Bug #160 by burningTyger.
- Fixed HEREDOC output for the limited case of a heredoc followed by a line end. When a HEREDOC is not followed by a line end RDoc is not currently smart enough to restore the source correctly. Bug #162 by Zachary Scott.
- Fixed parsing of executables with shebang and encoding comments. Bug #161 by Marcus Stollsteimer
- RDoc now ignores methods defined on constants instead of creating a fake module. Bug #163 by Zachary Scott.
- Fixed ChangeLog parsing for FFI gem. Bug #165 by Zachary Scott.
- RDoc now links #=== methods. Bug #164 by Zachary Scott.
- Allow [] following argument names for TomDoc. Bug #167 by Ellis Berner.
- Fixed the RDoc servlet for home and site directories. Bug #170 by Thomas Leitner.
- Fixed references to methods in the RDoc servlet. Bug #171 by Thomas Leitner.
- Fixed debug message when generating the darkfish root page. Pull Request #174 by Thomas Leitner.
- Fixed deletion of attribute ri data when a class was loaded then saved. Issue #171 by Thomas Leitner.
rdoc-spellcheck 1.0
drbrain |
rdoc-spellcheck checks your documentation for spelling errors. File, class, and method names are automatically excluded from the results and you can add your own words to the default word list.
Features
-
Checks documentation for pages, classes, modules, methods, constants, etc.
-
Prints a report showing each misspelled word and correction suggestions
Synopsis
$ rdoc -f spellcheck lib *.rdoc
Requirements
-
rdoc
-
libaspell – See github.com/evan/raspell/blob/master/README.rdoc for installation instructions for aspell
Install
sudo gem install rdoc-spellcheck
rdoc 3.12
drbrain |
RDoc produces HTML and command-line documentation for Ruby projects. RDoc
includes the rdoc and ri tools for generating and
displaying online documentation.
See RDoc for a description of RDoc’s markup and basic use.
3.12 / 2011-12-15
-
Minor enhancements
-
Added DEVELOPERS document which contains an overview of how RDoc works and how to add new features to RDoc.
-
Improved title for HTML output to include
--titlein the title element. -
rdoc --pipenow understands--markup. -
RDoc now supports irc-scheme hyperlinks. Issue #83 by trans.
-
-
Bug fixes
-
Fix title on HTML output for pages.
-
Fixed parsing of non-indented HEREDOC.
-
Fixed parsing of
%w[]and other % literals. Issue #84 by Erik Hollensbe -
Fixed arrow replacement in HTML output munging the spaceship operator. Issue #85 by eclectic923.
-
Verbatim sections with ERB that match the ruby code whitelist are no longer syntax-highlighted. Issue #86 by eclectic923
-
Line endings on windows are normalized immediately after reading with binmode. Issue #87 by Usa Nakamura
-
RDoc better understands directives for comments. Comment directives can now be found anywhere in multi-line comments. Issue #90 by Ryan Davis
-
Tidy links to methods show the label again. Issue #88 by Simon Chiang
-
RDoc::Parser::C can now find comments directly above
rb_define_class_under. Issue #89 by Enrico -
In rdoc, backspace and ansi formatters, labels and notes without bodies are now shown.
-
In rdoc, backspace and ansi formatters, whitespace between label or note and the colon is now stripped.
-
RDoc 3.10
drbrain |
RDoc produces HTML and command-line documentation for Ruby projects. RDoc
includes the rdoc and ri tools for generating and
displaying online documentation.
See RDoc for a description of RDoc’s markup and basic use.
Changes:
3.10 / 2011-10-08
-
Major enhancements
-
RDoc HTML output has been improved:
-
The search from Володя Колесников‘s (Vladimir Kolesnikov) Sdoc has been integrated.
The search index generation is a reusable component through RDoc::Generator::JsonIndex
-
The table of contents is now a separate page and now shows links to headings and sections inside a page or class.
-
Class pages no longer show the namespace and no longer have file info pages.
-
HTML output is HTML 5.
-
Static files can be copied into RDoc using –copy-files
-
-
RDoc supports additional documentation formats:
-
TomDoc 1.0.0-rc1
-
RD format
The default markup can be set via the
--markupoption.The format of documentation in a particular file can be specified by the
:markup:directive. If the:markup:directive is in the first comment it is used as the default for the entire file. For other comments it overrides the default markup format.The markup format can be set for rake tasks using RDoc::Task#markup
-
-
RDoc can save and load an options file.
To create an options file that defaults to using TomDoc markup run:
rdoc --markup tomdoc --write-options
This will create a .rdoc_options file. Check it in to your VCS and package it with your gem. RDoc will automatically load this file and combine it with the user’s options.
Some options are not saved. See RDoc::Options@Saved+Options for full details.
-
-
Minor enhancements
-
RDoc autoloads everything. You only need to require ‘rdoc’ now.
-
HTML headings now have ids matching their titles.
= Hello!
Is rendered as
<h1 id="label-Hello%21">Hello!</h1>
-
Labels for classes or methods can be linked-to by adding an
@following the class or method reference. For example,RDoc::Markup@LinksSee RDoc::Markup@Links for further details.
-
For HTML output RDoc uses
SomeClass.method_nameandSomeClass#method_namefor remote methods and attributes and::method_nameand#method_namefor local methods. -
RDoc makes an effort to syntax-highlight ruby code in verbatim sections. See RDoc::Markup@Paragraphs+and+Verbatim
-
Added RDoc::TopLevel#text? and RDoc::Parser::Text to indicate a parsed file contains no ruby constructs.
-
Added
rdoc-labellink scheme which allows bidirectional links. See RDoc::Markup for details. -
Image paths at HTTPS URLs will now be turned into +<img>+ tags. Pull Request #60 by James Mead
-
Added RDoc::Comment which encapsulates comment-handling functionality.
-
Added RDoc::Markup::PreProcess::post_process to allow arbitrary comment munging.
-
RDoc::RDoc::current is set for the entire RDoc run.
-
Split rdoc/markup/inline into individual files for its component classes.
-
Moved token stream HTML markup out of RDoc::AnyMethod#markup_code into RDoc::TokenStream::to_html
-
“Top” link in section headers is no longer inside the heading element.
-
RDoc avoids printing some warnings unless run with `rdoc –verbose`. For Rails issue #1646.
-
Finishing a paragraph with two or more spaces will result in a line break. This feature is experimental and may be modified or removed.
-
-
Bug fixes
-
Markup defined by RDoc::Markup#add_special inside a
<tt>is no longer converted. -
Performance of RDoc::RubyLex has been improved. Ruby Bug #5202 by Ryan Melton.
-
Add US-ASCII magic comments to work with
ruby -Ku. Issue #63 by Travis D. Warlick, Jr. -
Clicking a link in the method description now works. Issue #61 by Alan Hogan.
-
Fixed RDoc::Markup::Parser for CRLF line endings. Issue #67 by Marvin Gülker.
-
Fixed lexing of percent strings like %r{#}. Issue #68 by eclectic923.
-
The C parser now understands classes defined with
rb_struct_define_without_accessor(like Range). Pull Request #73 by Dan Bernier -
Fixed lexing of
a b <<-HEREDOC. Issue #75 by John Mair. -
Added LEGAL.rdoc with references to licenses in other files. Issue #78 by Dmitry Jemerov.
-
Block parameters are displayed in Darkfish output again. Issue #76 by Andrea Singh.
-
The method parameter coverage report no longer includes parameter default values. Issue #77 by Jake Goulding.
-
The module for an include is not looked up until parsed all the files are parsed. Unless your project includes nonexistent modules this avoids worst-case behavior (
O(n!)) of RDoc::Include#module.
-
Ruby 1.9.3 preview 1
drbrain |
Ruby 1.9.3 preview 1 has been released! Please install it and report bugs! The NEWS file contains the changes since Ruby 1.9.2 and the ChangeLog contains all the gory details.
If you're using RVM you can follow these instructions to install preview 1. If not, you can download the tarball, unpack it, then run configure; make; make install as you like.
Bug Reports
Ruby 1.9.3 preview 1 ships with RDoc, RubyGems and Rake. I can fix critical bugs in all of these before the final release. Please file bug reports for Ruby via redmine for any issue you find. You can also search for existing issues to avoid duplicate reports.
RDoc
The preview 1 release contains RDoc 3.8, but I've released RDoc 3.9.1 to fix a few additional bugs. Please install RDoc 3.9.1 atop the preview 1 release, or standalone on your main ruby. I prefer reports of RDoc issues via github.
RubyGems
The preview 1 release contains RubyGems 1.8.6.1 which is slightly newer than RubyGems 1.8.6. RubyGems 1.8.7 will be released shortly with the combined changes. I prefer reports of RubyGems issues via github.
Rake
The preview 1 release contains Rake 0.9.2.1 which is slightly newer than Rake 0.9.2. I prefer reports of Rake issues via github.
RDoc 3.9.1
drbrain |
RDoc 3.9.1 will be included with Ruby 1.9.3 provided no show-stopping bugs are found. Please install RDoc and report any bugs you've found.
RDoc produces HTML and command-line documentation for Ruby projects. RDoc includes the rdoc and ri tools for generating and displaying online documentation.
See RDoc for a description of RDoc’s markup and basic use.
3.9.1
-
Bug fixes
-
Fix RDoc::Markup parser for a header followed by a non-text token. Issue #56 by Adam Tait
-
Fix RDoc::Markup::ToHtmlCrossref#gen_url for non-rdoc-ref links.
-
Fix bug report URL when rdoc crashes.
-
3.9
-
Minor enhancements
-
RDoc::Parser::C now supports :doc: and :nodoc: for class comments
-
Added the rdoc-ref: link scheme which links to a named reference. rdoc-ref: can resolve references to classes, modules, methods, files, etc. This can be used to create cross-generator named links unlike the link: scheme which is dependent upon the exact file name. Issue #53 by Simon Chiang
-
Pulled RDoc::CrossReference out of RDoc::Markup::ToHtmlCrossref. Cross-references can now be created easily for non-HTML formatters.
-
-
Bug fixes
-
`ri []` and other special methods now work properly. Issue #52 by ddebernardy.
-
`ri` now has space between class comments from multiple files.
-
:stopdoc: no longer creates Object references. Issue #55 by Simon Chiang
-
:nodoc: works on class aliases now. Issue #51 by Steven G. Harms
-
Remove tokenizer restriction on header lengths for verbatim sections. Issue #49 by trans
-
RDoc 3.7
drbrain |
RDoc produces HTML and command-line documentation for Ruby projects. RDoc includes the rdoc and ri tools for generating and displaying online documentation.
See RDoc for a description of RDoc’s markup and basic use.
Changes:
### 3.7 / 2011-06-27
-
Minor enhancements
-
New directive :category: which allows methods to be grouped into sections more cleanly. See RDoc::Markup for details.
-
Document-class for RDoc::Parser::C now supports Foo::CONST as well as CONST.
-
ri method output is now a comma-separated list when displayed interactively. Pull Request #39 by Benoit Daloze.
-
RDoc::ClassModule#merge now prefers the argument’s information over the receiver’s (it now behaves like Hash#merge! instead of a backwards Hash#merge!).
-
RDoc::Markup#convert now accepts an RDoc::Markup::Document instance
-
RDoc now owns the code for generating RDoc and ri data when gems install
-
Added RDoc::RDoc::reset
-
Added RDoc::CodeObject#file_name
-
-
Bug fixes
-
ri no longer crashes when attempting to complete a plain [.
-
ri data now tracks which file information came from so it can process removals and changes to:
-
Classes and Modules
-
Methods
-
Attributes
-
Includes
-
Constants
You will need to rebuild your ri data for it to update properly. Issue #21 by Sven Riedel
-
-
Signal and SignalException no longer clobber each other
-
RDoc::Parser::C no longer creates classes when processing aliases.
-
RDoc::Text#strip_stars handles Document-method for methods with =, ! and ? now.
-
RDoc::Parser::C now allows .cpp files to be used with the “in” comment on rb_define_method. Bug #35 by Hanmac.
-
RDoc::Parser::Ruby no longer eats content when =begin/=end documentation blocks are followed by a documentable item. Issue #41 by mfn.
-
RDoc::Markup::Formatter and subclasses now allow an optional markup parameter for adding custom markup. The example in RDoc::Markup::Formatter will now work. Issue #38 by tsilen.
-
RDoc::Parser::C can now distinguish between class methods and instance methods in Document-method. Issue #36 by Vincent Batts.
-
RDoc now encodes file names in the output encoding. Issue #33 by Perry Smith.
-
ri data generation for method aliases no longer duplicates the class in #full_name
-

