diff options
author | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-01-13 03:13:37 +0000 |
---|---|---|
committer | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-01-13 03:13:37 +0000 |
commit | ec519b9b43db7756fcc2c19020ece2d7e2263fe4 (patch) | |
tree | df6a1e6827f788c68e430d44a5ff913a62af6cf7 | |
parent | 937b7ab8b59346f02da81ef324b8955b01d7cc25 (diff) | |
download | ruby-ec519b9b43db7756fcc2c19020ece2d7e2263fe4.tar.gz |
Complete RDoc namespace change
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15018 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | lib/rdoc/README | 2 | ||||
-rw-r--r-- | lib/rdoc/generator.rb (renamed from lib/rdoc/generators.rb) | 2 | ||||
-rw-r--r-- | lib/rdoc/generator/chm.rb (renamed from lib/rdoc/generators/chm.rb) | 4 | ||||
-rw-r--r-- | lib/rdoc/generator/chm/chm.rb (renamed from lib/rdoc/generators/chm/chm.rb) | 8 | ||||
-rw-r--r-- | lib/rdoc/generator/html.rb (renamed from lib/rdoc/generators/html.rb) | 14 | ||||
-rw-r--r-- | lib/rdoc/generator/html/hefss.rb (renamed from lib/rdoc/generators/html/hefss.rb) | 6 | ||||
-rw-r--r-- | lib/rdoc/generator/html/html.rb (renamed from lib/rdoc/generators/html/html.rb) | 6 | ||||
-rw-r--r-- | lib/rdoc/generator/html/kilmer.rb (renamed from lib/rdoc/generators/html/kilmer.rb) | 4 | ||||
-rw-r--r-- | lib/rdoc/generator/html/one_page_html.rb (renamed from lib/rdoc/generators/html/one_page_html.rb) | 4 | ||||
-rw-r--r-- | lib/rdoc/generator/ri.rb (renamed from lib/rdoc/generators/ri.rb) | 8 | ||||
-rw-r--r-- | lib/rdoc/generator/xml.rb (renamed from lib/rdoc/generators/xml.rb) | 12 | ||||
-rw-r--r-- | lib/rdoc/generator/xml/rdf.rb (renamed from lib/rdoc/generators/xml/rdf.rb) | 4 | ||||
-rw-r--r-- | lib/rdoc/generator/xml/xml.rb (renamed from lib/rdoc/generators/xml/xml.rb) | 4 | ||||
-rw-r--r-- | lib/rdoc/options.rb | 2 | ||||
-rw-r--r-- | lib/rdoc/rdoc.rb | 11 |
15 files changed, 45 insertions, 46 deletions
diff --git a/lib/rdoc/README b/lib/rdoc/README index 89ea0fbd3f..8ad023f35d 100644 --- a/lib/rdoc/README +++ b/lib/rdoc/README @@ -219,7 +219,7 @@ Options are: [<tt>--template</tt> <i>name</i>] specify an alternate template to use when generating output (the default is 'standard'). This template should be in a directory - accessible via $: as rdoc/generators/xxxx_template, where 'xxxx' + accessible via $: as rdoc/generator/xxxx_template, where 'xxxx' depends on the output formatter. [<tt>--version</tt>] diff --git a/lib/rdoc/generators.rb b/lib/rdoc/generator.rb index 2970c89827..cf4bb3a6f1 100644 --- a/lib/rdoc/generators.rb +++ b/lib/rdoc/generator.rb @@ -4,7 +4,7 @@ require 'rdoc/options' require 'rdoc/markup/simple_markup' require 'rdoc/template' -module RDoc::Generators +module RDoc::Generator ## # Name of sub-direcory that holds file descriptions diff --git a/lib/rdoc/generators/chm.rb b/lib/rdoc/generator/chm.rb index ce05d38d50..7537365842 100644 --- a/lib/rdoc/generators/chm.rb +++ b/lib/rdoc/generator/chm.rb @@ -1,6 +1,6 @@ -require 'rdoc/generators/html' +require 'rdoc/generator/html' -class RDoc::Generators::CHM < RDoc::Generators::HTML +class RDoc::Generator::CHM < RDoc::Generator::HTML HHC_PATH = "c:/Program Files/HTML Help Workshop/hhc.exe" diff --git a/lib/rdoc/generators/chm/chm.rb b/lib/rdoc/generator/chm/chm.rb index 4134420668..0a17a9e1ea 100644 --- a/lib/rdoc/generators/chm/chm.rb +++ b/lib/rdoc/generator/chm/chm.rb @@ -1,9 +1,9 @@ -require 'rdoc/generators/chm' -require 'rdoc/generators/html/html' +require 'rdoc/generator/chm' +require 'rdoc/generator/html/html' -module RDoc::Generators::CHM::CHM +module RDoc::Generator::CHM::CHM - HTML = RDoc::Generators::HTML::HTML + HTML = RDoc::Generator::HTML::HTML INDEX = HTML::INDEX diff --git a/lib/rdoc/generators/html.rb b/lib/rdoc/generator/html.rb index 10244576df..32f8235537 100644 --- a/lib/rdoc/generators/html.rb +++ b/lib/rdoc/generator/html.rb @@ -1,9 +1,9 @@ require 'fileutils' -require 'rdoc/generators' +require 'rdoc/generator' require 'rdoc/markup/simple_markup/to_html' -module RDoc::Generators +module RDoc::Generator ## # Build a hash of all items that can be cross-referenced. @@ -61,8 +61,8 @@ module RDoc::Generators # (defined in MarkUp). If we fine the corresponding reference, # generate a hyperlink. If the name we're looking for contains # no punctuation, we look for it up the module/class chain. For - # example, HyperlinkHtml is found, even without the Generators:: - # prefix, because we look for it in module Generators first. + # example, HyperlinkHtml is found, even without the Generator:: + # prefix, because we look for it in module Generator first. def handle_special_CROSSREF(special) name = special.text @@ -1168,7 +1168,7 @@ module RDoc::Generators end ## - # Generators may need to return specific subclasses depending on the + # Generator may need to return specific subclasses depending on the # options they are passed. Because of this we create them using a factory def self.for(options) @@ -1221,8 +1221,8 @@ module RDoc::Generators template = @options.template unless template =~ %r{/|\\} then - template = File.join("rdoc/generators", - @options.generator.key, template) + template = File.join('rdoc', 'generator', @options.generator.key, + template) end require template diff --git a/lib/rdoc/generators/html/hefss.rb b/lib/rdoc/generator/html/hefss.rb index c7b4fcc449..294d5b62f6 100644 --- a/lib/rdoc/generators/html/hefss.rb +++ b/lib/rdoc/generator/html/hefss.rb @@ -1,7 +1,7 @@ -require 'rdoc/generators/html' -require 'rdoc/generators/html/html' +require 'rdoc/generator/html' +require 'rdoc/generator/html/html' -module RDoc::Generators::HTML::HEFSS +module RDoc::Generator::HTML::HEFSS FONTS = "Verdana, Arial, Helvetica, sans-serif" diff --git a/lib/rdoc/generators/html/html.rb b/lib/rdoc/generator/html/html.rb index 4eb7a86975..0a0b754919 100644 --- a/lib/rdoc/generators/html/html.rb +++ b/lib/rdoc/generator/html/html.rb @@ -1,5 +1,5 @@ -require 'rdoc/generators/html' -require 'rdoc/generators/html/one_page_html' +require 'rdoc/generator/html' +require 'rdoc/generator/html/one_page_html' ## # = CSS2 RDoc HTML template @@ -21,7 +21,7 @@ require 'rdoc/generators/html/one_page_html' # send a letter to Creative Commons, 559 Nathan Abbott Way, Stanford, California # 94305, USA. -module RDoc::Generators::HTML::HTML +module RDoc::Generator::HTML::HTML FONTS = "Verdana,Arial,Helvetica,sans-serif" diff --git a/lib/rdoc/generators/html/kilmer.rb b/lib/rdoc/generator/html/kilmer.rb index e4c5b115a6..b6c9c4e339 100644 --- a/lib/rdoc/generators/html/kilmer.rb +++ b/lib/rdoc/generator/html/kilmer.rb @@ -1,6 +1,6 @@ -require 'rdoc/generators/html' +require 'rdoc/generator/html' -module RDoc::Generators::HTML::KILMER +module RDoc::Generator::HTML::KILMER FONTS = "Verdana, Arial, Helvetica, sans-serif" diff --git a/lib/rdoc/generators/html/one_page_html.rb b/lib/rdoc/generator/html/one_page_html.rb index dbac9e2f5a..885d0dcf6b 100644 --- a/lib/rdoc/generators/html/one_page_html.rb +++ b/lib/rdoc/generator/html/one_page_html.rb @@ -1,6 +1,6 @@ -require 'rdoc/generators/html' +require 'rdoc/generator/html' -module RDoc::Generators::HTML::ONE_PAGE_HTML +module RDoc::Generator::HTML::ONE_PAGE_HTML CONTENTS_XML = <<-EOF <% if defined? classes and classes["description"] then %> diff --git a/lib/rdoc/generators/ri.rb b/lib/rdoc/generator/ri.rb index a8cacc7501..bb0c4f4021 100644 --- a/lib/rdoc/generators/ri.rb +++ b/lib/rdoc/generator/ri.rb @@ -1,4 +1,4 @@ -require 'rdoc/generators' +require 'rdoc/generator' require 'rdoc/markup/simple_markup/to_flow' require 'rdoc/ri/cache' @@ -6,10 +6,10 @@ require 'rdoc/ri/reader' require 'rdoc/ri/writer' require 'rdoc/ri/descriptions' -class RDoc::Generators::RI +class RDoc::Generator::RI ## - # Generators may need to return specific subclasses depending on the + # Generator may need to return specific subclasses depending on the # options they are passed. Because of this we create them using a factory def self.for(options) @@ -21,7 +21,7 @@ class RDoc::Generators::RI end ## - # Set up a new RDoc::Generators::RI. + # Set up a new RDoc::Generator::RI. def initialize(options) #:not-new: @options = options diff --git a/lib/rdoc/generators/xml.rb b/lib/rdoc/generator/xml.rb index d84cecc05c..3335f2ce7c 100644 --- a/lib/rdoc/generators/xml.rb +++ b/lib/rdoc/generator/xml.rb @@ -1,9 +1,9 @@ -require 'rdoc/generators/html' +require 'rdoc/generator/html' ## # Generate XML output as one big file -class RDoc::Generators::XML < RDoc::Generators::HTML +class RDoc::Generator::XML < RDoc::Generator::HTML ## # Standard generator factory @@ -42,16 +42,16 @@ class RDoc::Generators::XML < RDoc::Generators::HTML def build_indices @info.each do |toplevel| - @files << RDoc::Generators::HtmlFile.new(toplevel, @options, RDoc::Generators::FILE_DIR) + @files << RDoc::Generator::HtmlFile.new(toplevel, @options, RDoc::Generator::FILE_DIR) end RDoc::TopLevel.all_classes_and_modules.each do |cls| - build_class_list(cls, @files[0], RDoc::Generators::CLASS_DIR) + build_class_list(cls, @files[0], RDoc::Generator::CLASS_DIR) end end def build_class_list(from, html_file, class_dir) - @classes << RDoc::Generators::HtmlClass.new(from, html_file, class_dir, @options) + @classes << RDoc::Generator::HtmlClass.new(from, html_file, class_dir, @options) from.each_classmodule do |mod| build_class_list(mod, html_file, class_dir) end @@ -98,7 +98,7 @@ class RDoc::Generators::XML < RDoc::Generators::HTML end def gen_method_index - gen_an_index(RDoc::Generators::HtmlMethod.all_methods, 'Methods') + gen_an_index(RDoc::Generator::HtmlMethod.all_methods, 'Methods') end def gen_an_index(collection, title) diff --git a/lib/rdoc/generators/xml/rdf.rb b/lib/rdoc/generator/xml/rdf.rb index 3f6643e15b..7b15c69a18 100644 --- a/lib/rdoc/generators/xml/rdf.rb +++ b/lib/rdoc/generator/xml/rdf.rb @@ -1,6 +1,6 @@ -require 'rdoc/generators/xml' +require 'rdoc/generator/xml' -module RDoc::Generators::XML::RDF +module RDoc::Generator::XML::RDF CONTENTS_RDF = <<-EOF <% if defined? classes and classes["description"] then %> diff --git a/lib/rdoc/generators/xml/xml.rb b/lib/rdoc/generator/xml/xml.rb index e711b514fa..ffb1329c4e 100644 --- a/lib/rdoc/generators/xml/xml.rb +++ b/lib/rdoc/generator/xml/xml.rb @@ -1,6 +1,6 @@ -require 'rdoc/generators/xml' +require 'rdoc/generator/xml' -module RDoc::Generators::XML::XML +module RDoc::Generator::XML::XML CONTENTS_XML = <<-EOF <% if defined? classes and classes["description"] then %> diff --git a/lib/rdoc/options.rb b/lib/rdoc/options.rb index a36fb017ad..bc14080630 100644 --- a/lib/rdoc/options.rb +++ b/lib/rdoc/options.rb @@ -135,7 +135,7 @@ class RDoc::Options ## # Template class for file generation #-- - # HACK around dependencies in lib/rdoc/generators/html.rb + # HACK around dependencies in lib/rdoc/generator/html.rb attr_accessor :template_class # :nodoc: diff --git a/lib/rdoc/rdoc.rb b/lib/rdoc/rdoc.rb index b376653549..559af5e37a 100644 --- a/lib/rdoc/rdoc.rb +++ b/lib/rdoc/rdoc.rb @@ -57,21 +57,20 @@ module RDoc Generator = Struct.new(:file_name, :class_name, :key) ## - # This is the list of output generators that we - # support + # This is the list of output generator that we support GENERATORS = {} $LOAD_PATH.collect do |d| File.expand_path d end.find_all do |d| - File.directory? "#{d}/rdoc/generators" + File.directory? "#{d}/rdoc/generator" end.each do |dir| - Dir.entries("#{dir}/rdoc/generators").each do |gen| + Dir.entries("#{dir}/rdoc/generator").each do |gen| next unless /(\w+)\.rb$/ =~ gen type = $1 unless GENERATORS.has_key? type - GENERATORS[type] = Generator.new("rdoc/generators/#{gen}", + GENERATORS[type] = Generator.new("rdoc/generator/#{gen}", "#{type.upcase}".intern, type) end @@ -266,7 +265,7 @@ module RDoc require gen.file_name - gen_class = Generators.const_get(gen.class_name) + gen_class = ::RDoc::Generator.const_get gen.class_name gen = gen_class.for(options) pwd = Dir.pwd |