Permalink
Browse files

Sigh

  • Loading branch information...
drbrain committed Dec 20, 2010
1 parent d4ff3f6 commit 1a81a2d398f2e2db7fcec5d59b5b43757bf25751
View
@@ -1,21 +1,31 @@
-=== 3.0
+=== 3.0.1 / 2010-12-19
+
+* Bug fix
+ * RDoc no longer has a Perl parser.
+
+=== 3.0 / 2010-12-19
+
+Special thanks to Thierry Lambert for massive improvements to RDoc.
* Major enhancements
* Ruby 1.8.6 is no longer supported by RDoc.
+ * RDoc now converts input files to a single encoding specified by
+ <tt>--encoding</tt>. See RDoc::RDoc and RDoc::Options#encoding.
+ <tt>--encoding</tt> is now preferred over <tt>--charset</tt>
+ * RDoc now supports a <tt>--coverage-report</tt> flag (also <tt>-C</tt> and
+ <tt>--dcov</tt>) that outputs a report on items lacking documentation.
+ * Templates (<tt>rdoc -T</tt>) are now checked for existence in
+ RDoc::Options. Generator authors can now use RDoc::Options#template_dir
+ which is the full path to the template directory.
+ * Added support for class aliases. Patch by Thierry Lambert.
* Improved merging of classes and modules across multiple files including
more accurate documentation statistics. Patch by Thierry Lambert.
* Improved handling of method aliases. Patch by Thierry Lambert.
- * Added support for class aliases. Patch by Thierry Lambert.
* Improved handling of visibility of RDoc code objects. Patch by Thierry
Lambert.
- * RDoc now converts input files to a single encoding specified by
- <tt>--encoding</tt>. See RDoc::RDoc and RDoc::Options#encoding.
- <tt>--encoding</tt> is now preferred over <tt>--charset</tt>
* RDoc::Attr#type is now RDoc::Attr#definition. Patch by Thierry Lambert.
* Removed TimeConstantMethods
- * Templates (<tt>rdoc -T</tt>) are now checked for existence in
- RDoc::Options. Generator authors can now use RDoc::Options#template_dir
- which is the full path to the template directory.
+ * RDoc now calls ::new instead of ::for on generators.
* Minor enhancements
* Added rdoc arguments <tt>--dry-run</tt>, <tt>--all</tt>,
<tt>--visibility</tt>, <tt>--force-output</tt>, <tt>--hyperlink-all</tt>.
@@ -53,6 +63,9 @@
* Removed "':' not followed by operator or identifier" warning for new Hash
syntax.
* rb_attr() is now supported for attributes.
+ * RDoc::Parser::C now supports yields, doc, and args directives like
+ RDoc::Parser::Ruby.
+ * Moved RDoc::Parser::PerlPOD to the rdoc-perl_pod gem.
* Bug fixes
* RDoc::Generator tests no longer require any installed RDoc on Ruby 1.9
* Load existing cache before generating ri. Ruby r27749 by NAKAMURA Usaku.
View
@@ -87,7 +87,6 @@ lib/rdoc/normal_module.rb
lib/rdoc/options.rb
lib/rdoc/parser.rb
lib/rdoc/parser/c.rb
-lib/rdoc/parser/perl.rb
lib/rdoc/parser/ruby.rb
lib/rdoc/parser/ruby_tools.rb
lib/rdoc/parser/simple.rb
@@ -102,6 +101,9 @@ lib/rdoc/ruby_lex.rb
lib/rdoc/ruby_token.rb
lib/rdoc/single_class.rb
lib/rdoc/stats.rb
+lib/rdoc/stats/normal.rb
+lib/rdoc/stats/quiet.rb
+lib/rdoc/stats/verbose.rb
lib/rdoc/task.rb
lib/rdoc/text.rb
lib/rdoc/token_stream.rb
@@ -142,7 +144,6 @@ test/test_rdoc_normal_module.rb
test/test_rdoc_options.rb
test/test_rdoc_parser.rb
test/test_rdoc_parser_c.rb
-test/test_rdoc_parser_perl.rb
test/test_rdoc_parser_ruby.rb
test/test_rdoc_parser_simple.rb
test/test_rdoc_rdoc.rb
View
@@ -13,7 +13,7 @@ Hoe.spec 'rdoc' do
self.remote_rdoc_dir = ''
self.testlib = :minitest
- extra_dev_deps << ['minitest', '~> 1.3']
+ extra_dev_deps << ['minitest', '~> 2']
extra_rdoc_files << 'Rakefile'
spec_extras['required_rubygems_version'] = '>= 1.3'
spec_extras['homepage'] = 'http://rdoc.rubyforge.org'
View
@@ -95,7 +95,7 @@ def self.const_missing const_name # :nodoc:
##
# RDoc version you are using
- VERSION = '2.6'
+ VERSION = '3.0.1'
##
# Method visibilities
View
@@ -841,6 +841,7 @@ def full_name
def fully_documented?
documented? and
+ attributes.all? { |a| a.documented? } and
method_list.all? { |m| m.documented? } and
constants.all? { |c| c.documented? }
end
View
@@ -6,7 +6,7 @@
#
# To use:
#
-# erbio = RDoc::ERBIO.new '<%= "hello world" %>', nil, nil, 'io'
+# erbio = RDoc::ERBIO.new '<%= "hello world" %>', nil, nil
#
# open 'hello.txt', 'w' do |io|
# erbio.result binding
@@ -16,6 +16,13 @@
class RDoc::ERBIO < ERB
+ ##
+ # Defaults +eoutvar+ to 'io', otherwise is identical to ERB's initialize
+
+ def initialize str, safe_level = nil, trim_mode = nil, eoutvar = 'io'
+ super
+ end
+
##
# Instructs +compiler+ how to write to +io_variable+
View
@@ -7,6 +7,9 @@
class RDoc::Gauntlet < Gauntlet
+ ##
+ # Runs an RDoc generator for gem +name+
+
def run name
return if self.data.key? name
@@ -53,38 +53,15 @@ class RDoc::Generator::Darkfish
include ERB::Util
- ##
- # Subversion rev
-
- SVNRev = %$Rev: 52 $
-
- ##
- # Subversion ID
-
- SVNId = %$Id: darkfish.rb 52 2009-01-07 02:08:11Z deveiant $
-
# Path to this file's parent directory. Used to find templates and other
# resources.
GENERATOR_DIR = File.join 'rdoc', 'generator'
+ ##
# Release Version
- VERSION = '1.1.6'
-
- # Directory where generated classes live relative to the root
-
- CLASS_DIR = nil
-
- # Directory where generated files live relative to the root
-
- FILE_DIR = nil
-
- # Standard generator factory method
-
- def self.for options
- new options
- end
+ VERSION = '2'
##
# Initialize a few instance variables before we start
@@ -93,6 +70,7 @@ def initialize options
@options = options
@template_dir = Pathname.new options.template_dir
+ @template_cache = {}
@files = nil
@classes = nil
@@ -113,12 +91,20 @@ def debug_msg *msg
$stderr.puts(*msg)
end
+ ##
+ # Directory where generated class HTML files live relative to the output
+ # dir.
+
def class_dir
- CLASS_DIR
+ nil
end
+ ##
+ # Directory where generated class HTML files live relative to the output
+ # dir.
+
def file_dir
- FILE_DIR
+ nil
end
##
@@ -229,9 +215,10 @@ def generate_class_files
@classes.each do |klass|
debug_msg " working on %s (%s)" % [klass.full_name, klass.path]
- out_file = @outputdir + klass.path
- rel_prefix = @outputdir.relative_path_from out_file.dirname
- svninfo = self.get_svninfo klass
+ out_file = @outputdir + klass.path
+ # suppress 1.9.3 warning
+ rel_prefix = rel_prefix = @outputdir.relative_path_from(out_file.dirname)
+ svninfo = svninfo = self.get_svninfo(klass)
debug_msg " rendering #{out_file}"
render_template template_file, out_file do |io| binding end
@@ -249,7 +236,8 @@ def generate_file_files
@files.each do |file|
out_file = @outputdir + file.path
debug_msg " working on %s (%s)" % [ file.full_name, out_file ]
- rel_prefix = @outputdir.relative_path_from out_file.dirname
+ # suppress 1.9.3 warning
+ rel_prefix = rel_prefix = @outputdir.relative_path_from(out_file.dirname)
debug_msg " rendering #{out_file}"
render_template template_file, out_file do |io| binding end
@@ -317,7 +305,7 @@ def get_svninfo klass
# An io will be yielded which must be captured by binding in the caller.
def render_template template_file, out_file # :yield: io
- template_src = template_file.read
+ template = template_for template_file
unless @options.dry_run then
debug_msg "Outputting to %s" % [out_file.expand_path]
@@ -326,15 +314,11 @@ def render_template template_file, out_file # :yield: io
out_file.open 'w', 0644 do |io|
io.set_encoding @options.encoding if Object.const_defined? :Encoding
- template = RDoc::ERBIO.new template_src, nil, '<>', 'io'
-
context = yield io
template_result template, context, template_file
end
else
- template = ERB.new template_src, nil, '<>'
-
context = yield nil
output = template_result template, context, template_file
@@ -359,5 +343,20 @@ def template_result template, context, template_file
], e.backtrace
end
+ ##
+ # Retrieves a cache template for +file+, if present, or fills the cache.
+
+ def template_for file
+ template = @template_cache[file]
+
+ return template if template
+
+ klass = @options.dry_run ? ERB : RDoc::ERBIO
+
+ template = klass.new file.read, nil, '<>'
+ @template_cache[file] = template
+ template
+ end
+
end
View
@@ -8,10 +8,6 @@ class RDoc::Generator::RI
RDoc::RDoc.add_generator self
- def self.for options
- new options
- end
-
##
# Set up a new ri generator
View
@@ -527,6 +527,9 @@
class RDoc::Markup
+ ##
+ # An AttributeManager which handles inline markup.
+
attr_reader :attribute_manager
##
@@ -15,9 +15,12 @@ class RDoc::Markup::AttributeManager
# optimistic
#++
- A_PROTECT = 004 # :nodoc:
+ A_PROTECT = 004 # :nodoc:
- PROTECT_ATTR = A_PROTECT.chr # :nodoc:
+ ##
+ # Special mask character to prevent inline markup handling
+
+ PROTECT_ATTR = A_PROTECT.chr # :nodoc:
##
# This maps delimiters that occur around words (such as *bold* or +tt+)
Oops, something went wrong.

0 comments on commit 1a81a2d

Please sign in to comment.