RDoc 2.4.2
Eric Hodel | Wed, 25 Mar 2009 23:18:00 GMT
rdoc version 2.4.2 has been released!
RDoc is an application that produces documentation for one or more Ruby source files. RDoc includes the rdoc and ri tools for generating and displaying online documentation.
At this point in time, RDoc 2.x is a work in progress and may incur further API changes beyond what has been made to RDoc 1.0.1. Command-line tools are largely unaffected, but internal APIs may shift rapidly.
See RDoc for a description of RDoc’s markup and basic use.
Changes:
- 2 Minor Enhancements
- Added --pipe for turning RDoc on stdin into HTML
- Added rdoc/task.rb containing a replacement for rake/rdoctask.rb. Use RDoc::Task now instead of Rake::RDocTask.
- 10 Bug Fixes
- Writing the ri cache file to the proper directory. Bug #24459 by Lars Christensen.
- Possible fix for Dir::[] and Pathname interaction on 1.9. Bug #24650 by tiburon.
- Fixed scanning constants for if/end, etc. pairs. Bug #24609 by Ryan Davis.
- Fixed private methods in the C parser. Bug #24599 by Aaron Patterson.
- Fixed display of markup on RDoc main page. Bug #24168 by rhubarb.
- Fixed display of \ character in documentation proceeding words. Bug #22112 by James Gray. See RDoc for details.
- Fixed parsing and display of arg params for some corner cases. Bug #21113 by Csiszár Attila.
- Fixed links in Files box. Patch #24403 by Eric Wong.
- Toplevel methods now appear in Object. Bug #22677 by Ryan Davis.
- Added back --promiscuous which didn’t do anything you cared about. Why did you enable it? Nobody looked at that page! Oh, it warns, too.
RDoc 2.4.1
Eric Hodel | Fri, 27 Feb 2009 03:19:22 GMT
RDoc is an application that produces documentation for one or more Ruby source files. RDoc includes the rdoc and ri tools for generating and displaying online documentation.
At this point in time, RDoc 2.x is a work in progress and may incur further API changes beyond what has been made to RDoc 1.0.1. Command-line tools are largely unaffected, but internal APIs may shift rapidly.
See RDoc for a description of RDoc’s markup and basic use.
Changes:
- 1 Minor Enhancements
- Added :attr:, :attr_reader:, :attr_writer:, :attr_accessor: directives. Replaces—accessor. See RDoc::Parser::Ruby for details.
- 3 Bug Fixes
- Don’t complain when exiting normally. Bug by Matt Neuburg.
- Restore—inline-source that warns
- Fixed links to files in Darkfish output
RDoc 2.4.0
Eric Hodel | Wed, 25 Feb 2009 06:02:13 GMT
RDoc is an application that produces documentation for one or more Ruby source files. RDoc includes the rdoc and ri tools for generating and displaying online documentation.
At this point in time, RDoc 2.x is a work in progress and may incur further API changes beyond what has been made to RDoc 1.0.1. Command-line tools are largely unaffected, but internal APIs may shift rapidly.
Project Page RDoc Documentation
Changes
- 9 Minor Enhancements
- `ri -f html` is now XHTML-happy
- Clarified RDoc::Markup link syntax. Bug #23517 by Eric Armstrong.
- Number of threads to parse with is now configurable
- Darkfish can now use alternate templates from $LOAD_PATH via -T
- Removed F95 parser in favor of the rdoc-f95 gem
- Moved HTML and XML generators to unmaintained
- No gem will be provided as it’s too difficult to make them work
- Removed options—one-file,—style=,—inline-source,—promiscuous, —op-name
- Removed support for—accessor, use regular documentation or the method directive instead. See RDoc::Parser::Ruby
- Removed—ri-system as it is unused by Ruby’s makefiles
- Added method list to index.html
- 6 Bug Fixes
- nodoc’d classes no longer appear in the index. Bug #23751 by Clifford Heath.
- Fix 1.9 compatibility issues. Bug #23815 by paddor.
- Darkfish now respects—charset
- RDoc no longer attempts to be lazy when building HTML. This is a workaround. Bug #23893 by Stefano Crocco.
- RDoc doesn’t crash with def (blah).foo() end
- RDoc doesn’t crash with #define functions
rdoc, rdoc_chm, rdoc_html_templates 2.3.0 Released
Eric Hodel | Thu, 29 Jan 2009 01:07:00 GMT
RDoc version 2.3.0 has been released!
This release of RDoc brings some big changes. Most notably Michael Granger’s Darkfish generator has become the default output format for RDoc! Michael put a ton of great work into this, and it looks quite lovely. Check out the RDoc documentation for a sample.
rdoc_chm and rdoc_html_templates have been split off from RDoc and released separately as unmaintained software. I don’t plan to make any future changes or updates to rdoc_html_templates (which are for the old HTML generator) ever, but somebody may be interested in taking over maintainership of the rdoc_chm generator.
rdoc will automatically detect rdoc_html_templates and rdoc_chm, so you only need to install them to make them usable via command-line options.
Release notes
RDoc is an application that produces documentation for one or more Ruby source files. RDoc includes the rdoc and ri tools for generating and displaying online documentation.
At this point in time, RDoc 2.x is a work in progress and may incur further API changes beyond what has been made to RDoc 1.0.1. Command-line tools are largely unaffected, but internal APIs may shift rapidly.
See the RDoc documentation for a description of RDoc’s markup and basic use.
Changes:
- 3 Major Enhancements
- Michael Granger’s Darkfish generator is now the default for HTML output
- Various rdoc generation speedups by Hongli Lai. Patches #22555, #22556, #22557, #22562, #22565.
- rdoc/discover.rb files are loaded automatically from installed gems
- 8 Minor Enhancements
- Added a space after the commas in ri class method lists. RubyForge enhancement #22182.
- Improved ri—interactive
- Generators can now override generated file locations
- Moved unmaintained CHM generator to it’s own package
- Moved unmaintained extra HTML templates to their own package
- Removed experimental texinfo generator
- Converted to minitest
- Known classes and modules list outputs once per line now for grep
- 11 Bug Fixes
- Fix missing superclass in ri output
- Fix an RDoc crash when told to parse an empty file
- Ignore nonexistent files instead of crashing
- .txt and .rdoc files are always considered text. Patch #22897 by Aaron Patterson.
- When merging ri data with a nonexistant directory, RDoc no longer crashes
- Fix visibility of methods in XML output. Issue by Yehuda Katz.
- Fixed relative link generation
- Fix crash, RDoc now ignores comments above local variable assignments in modules
- RDoc now only accepts adjacent comments for rb_define_module and rb_define_class
- C file RDoc is no longer included in token stream
- Scan all gem paths to match gem name for ri output
RDoc 2.1.0
Eric Hodel | Mon, 21 Jul 2008 05:25:39 GMT
RDoc is an application that produces documentation for one or more Ruby source files. RDoc includes the `rdoc` and `ri` tools for generating and displaying online documentation.
At this point in time, RDoc 2.x is a work in progress and may incur further API changes beyond what has been made to the RDoc 1.0.1. Command-line tools are largely unaffected, but internal APIs may shift rapidly.
- 3 Major Enhancements:
- RDoc now knows about meta-programmed methods, see RDoc::Parser::Ruby
- Reorganized parsers under RDoc::Parser base class
- ri now walks the ancestors of a class looking for a method e.g. ri File#read displays documentation for IO#read (may require regeneration of ri data)
- 5 Minor Enhancements:
- Allow links to files
- Default options now taken from RDOCOPT environment variable
- Class method documentation can be found at toplevel now (def X.foo)
- Allow HTML templates distributed as gems to be loaded with the -T option, just like the standard templates in rdoc/generator/html (so an HTML template lib/new_template.rb in a gem can be used with rdoc -T new_template)
- `rdoc -v` prints out files, classes, modules and methods as it goes
- 11 Bug Fixes:
- `ri Foo.bar` now looks for class methods also
- Sections work in the default template again
- Doesn’t warn about :foo:: list item being an unrecognized directive
- RDoc no longer converts characters inside tt tags
- Fixed “unitialized constant RDoc::Markup::ToHtml::HTML”
- Fixed generation of relative links
- Fixed various diagram generation issues
- Fixed templates broken by switch to erb
- Fixed issue with <!
- -> style comments - Lowercase words are no longer rdoc’d as methods without leading #, as described in the documentation
- RDoc now correctly sets superclasses if they were originally unknown
RDoc 2.0.0
Eric Hodel | Fri, 11 Apr 2008 01:21:00 GMT
rdoc version 2.0.0 has been released!
http://rubyforge.org/projects/rdoc
http://rdoc.rubyforge.org/rdoc
RDoc is an application that produces documentation for one or more Ruby source files. RDoc includes the `rdoc` and `ri` tools for generating and displaying online documentation.
At this point in time, RDoc 2.x is a work in progress and may incur further API changes beyond what has been made to the RDoc 1.0.1. Command-line tools are largely unaffected, but internal APIs may shift rapidly.
Changes:
- 3 Major Enhancements:
- Renamespaced everything RDoc under the RDoc module.
- New `ri` implementation.
- Reads from a cache in ~/.ri/ for enhanced speed.
- RubyGems aware, only searches latest gem versions.
- Now up to over 100 tests and 200 assertions.
- 4 Minor Enhancements:
- Switched to an ERb-based TemplatePage, see RDoc::TemplatePage.
- Class/module ri now displays attribute and constant comments.
- Cross-references can be disabled with a leading \.
- Relaxed parsing for some RDoc inline markup.
Bugs:
If you found a bug, please report it at the RDoc project's tracker on RubyForge: http://rubyforge.org/tracker/?group_id=627
Synopsis:
gem 'rdoc' require 'rdoc/rdoc' # ... see RDoc
An RDoc Wiki
Eric Hodel | Fri, 15 Feb 2008 00:14:00 GMT
For fun, I wrote a 200 line wiki a couple of weeks ago using WEBrick and RDoc with RCS as the only external dependency for history. You’ll need a recent build of Ruby 1.9 or Rubinius to run it:
It uses RDoc’s markup for formatting, and stores its content into ~/.rdocwiki as plain text files.
RdocWiki has one special page, /WikiCss that you can use to style things, here’s what I used:
#wiki_edit textarea {
width: 40em;
height: 20em;
}
#wiki_edit input {
display: block;
}
#wiki_restore {
display: inline;
}
I’d run a copy on Rubinius for you to use, but currently Rubinius is broken on FreeBSD.
RDoc's TemplatePage removed from Ruby
Eric Hodel | Mon, 07 Jan 2008 10:59:54 GMT
If you’ve got a custom RDoc template, it won’t work with the next release of 1.9. I’ve removed the custom TemplatePage and replaced it with an ERB-based version that works similarly.
This should make it much, much easier to write a custom RDoc template as you can now use arbitrary ruby code inside your templates.
It’s really easy to convert an old RDoc template to the upcoming version:
| Replace this | With this |
|---|---|
%blah% | <%= values["blah"] %>
|
!INCLUDE! | <%= template_include %>
|
HREF:aref:name | <%= href values["aref"], values["name"] %>
|
IF:blah | <% if values["blah"] then %>
|
IFNOT:blah | <% unless values["blah"] then %>
|
ENDIF:blah | <% end %>
|
START:blah | <% values["blah"].each do |blah| %>
|
END:blah | <% end %>
|
To make nested loops easier to convert, convert START statements to:
<% values["blah"].each do |blah| $stderr.puts blah.keys %>
So you can see what is being used inside which loop.
I’ve also removed the old_html template, as I don’t think anybody uses it anymore, and updated all the existing templates in RDoc to use ERB. (If somebody could double-check my work on the CHM and XML outputters, that would be great.)
Unleashing ri
Eric Hodel | Sun, 27 Aug 2006 23:45:00 GMT
Now that ruby 1.8.5 has been released (Changelog) and ri includes a bunch more documentation and integrates with gems you just might be suffering from ri overload.$ ri --system -l | wc -l
8882
$ ri -l | wc -l
11918
$ echo 11918 - 8882 | bc
3036
I have 31 extra gems installed, including Rails, which gives me a ton more at-my-fingertips documentation! Some people would rather have less documentation, and there are a handful of new options that control where ri will search for documentation.
$ ri -h
[...]
--doc-dir, -d <dirname>
A directory to search for documentation. If not
specified, we search the standard rdoc/ri directories.
May be repeated.
--system Include documentation from Ruby's standard library:
/usr/local/share/ri/1.8/system
--site Include documentation from libraries installed in site_lib:
/usr/local/share/ri/1.8/site
--home Include documentation stored in ~/.rdoc:
/Users/drbrain/.rdoc
--gems Include documentation from Rubygems:
/usr/local/lib/ruby/gems/1.8/doc/*/ri
[...]
Options may also be passed in the 'RI' environment variable
$
I've set my RI environment variable is -T -f ansi to turn off the pager and give me fancy colors, but you can do mix-and-match options to your liking. To only search the system libraries by default, export RI='--system'. To make an alias that searches only rails documentation:
alias rri="ri -d /usr/local/lib/ruby/gems/1.8/doc/actionmailer*/ri \
-d /usr/local/lib/ruby/gems/1.8/doc/actionpack*/ri \
-d /usr/local/lib/ruby/gems/1.8/doc/actionwebservice*/ri \
-d /usr/local/lib/ruby/gems/1.8/doc/activerecord*/ri \
-d /usr/local/lib/ruby/gems/1.8/doc/activesupport*/ri \
-T -f ansi"
(If you have multiple rails versions you'll need to explicitly list the versions of each gem.)
$ rri ActiveRecord::Base.find
----------------------------------------------- ActiveRecord::Base::find
ActiveRecord::Base::find(*args)
------------------------------------------------------------------------
Find operates with three different retrieval approaches:
[...]
Also, note that if you install multiple versions of a gem you'll either need to run gem cleanup and remove the old versions or manually remove their ri if you want the older versions to hang around. If you don't, you might get duplicate documentation.
RDoc Mega Update
Eric Hodel | Sat, 05 Aug 2006 05:08:56 GMT
With many thanks to Hugh Sasse for doing much of the gruntwork, there will be a huge increase in RDoc available in Ruby 1.8.5. If you have the time, get the latest from CVS (HEAD or ruby_1_8) and make install install-doc, check it out, and report back anything busted, poorly worded, or in need of general cleanup.
I have until Sunday night to fix anything you find.
Older posts: 1 2

Articles