From 2944a79452c871857dd154aeadd6ef8634709ec0 Mon Sep 17 00:00:00 2001 From: Xavier Noria Date: Thu, 22 Jul 2010 23:17:28 +0200 Subject: [PATCH] bump required RDoc to >= 2.5.9, and replace the 2.2 horo.rb with Aaron's gem --- Gemfile | 3 +- Rakefile | 3 +- doc/template/horo.rb | 618 ------------------------------------------- 3 files changed, 4 insertions(+), 620 deletions(-) delete mode 100644 doc/template/horo.rb diff --git a/Gemfile b/Gemfile index e915135996..d2377c2d08 100644 --- a/Gemfile +++ b/Gemfile @@ -5,7 +5,8 @@ gem "rails", :path => File.dirname(__FILE__) gem "rake", ">= 0.8.7" gem "mocha", ">= 0.9.8" -gem "rdoc", "2.2" +gem "rdoc", ">= 2.5.9" +gem "horo" mri = !defined?(RUBY_ENGINE) || RUBY_ENGINE == "ruby" if mri && RUBY_VERSION < '1.9' diff --git a/Rakefile b/Rakefile index c49942c0bb..835a2dec50 100644 --- a/Rakefile +++ b/Rakefile @@ -1,5 +1,6 @@ -gem 'rdoc', '= 2.2' +gem 'rdoc', '>= 2.5.9' require 'rdoc' +require 'horo' require 'rake' require 'rake/rdoctask' diff --git a/doc/template/horo.rb b/doc/template/horo.rb deleted file mode 100644 index b38fa28cde..0000000000 --- a/doc/template/horo.rb +++ /dev/null @@ -1,618 +0,0 @@ -# Horo RDoc template -# Author: Hongli Lai - http://izumi.plan99.net/blog/ -# -# Based on the Jamis template: -# http://weblog.jamisbuck.org/2005/4/8/rdoc-template - -if defined?(RDoc::Diagram) - RDoc::Diagram.class_eval do - remove_const(:FONT) - const_set(:FONT, "\"Bitstream Vera Sans\"") - end -end - -require 'rdoc/generator/html' - -module RDoc -module Generator -class HTML -class HORO - -FONTS = "\"Bitstream Vera Sans\", Verdana, Arial, Helvetica, sans-serif" - -STYLE = <; - background: #FFF; - color: #000; - margin: 0px; - font-size: small; -} - -p { - margin-top: 0.5em; - margin-bottom: 0.5em; -} - -#content { - margin: 2em; - margin-left: 3.5em; - margin-right: 3.5em; -} - -#description p { - margin-bottom: 0.5em; -} - -.sectiontitle { - margin-top: 1em; - margin-bottom: 1em; - padding: 0.5em; - padding-left: 2em; - background: #005; - color: #FFF; - font-weight: bold; -} - -.attr-rw { - padding-left: 1em; - padding-right: 1em; - text-align: center; - color: #055; -} - -.attr-name { - font-weight: bold; -} - -.attr-desc { -} - -.attr-value { - font-family: monospace; -} - -.file-title-prefix { - font-size: large; -} - -.file-title { - font-size: large; - font-weight: bold; - background: #005; - color: #FFF; -} - -.banner { - background: #005; - color: #FFF; - border: 1px solid black; - padding: 1em; -} - -.banner td { - background: transparent; - color: #FFF; -} - -h1 a, h2 a, .sectiontitle a, .banner a { - color: #FF0; -} - -h1 a:hover, h2 a:hover, .sectiontitle a:hover, .banner a:hover { - color: #FF7; -} - -.dyn-source { - display: none; - background: #fffde8; - color: #000; - border: #ffe0bb dotted 1px; - margin: 0.5em 2em 0.5em 2em; - padding: 0.5em; -} - -.dyn-source .cmt { - color: #00F; - font-style: italic; -} - -.dyn-source .kw { - color: #070; - font-weight: bold; -} - -.method { - margin-left: 1em; - margin-right: 1em; - margin-bottom: 1em; -} - -.description pre { - padding: 0.5em; - border: #ffe0bb dotted 1px; - background: #fffde8; -} - -.method .title { - font-family: monospace; - font-size: large; - border-bottom: 1px dashed black; - margin-bottom: 0.3em; - padding-bottom: 0.1em; -} - -.method .description, .method .sourcecode { - margin-left: 1em; -} - -.description p, .sourcecode p { - margin-bottom: 0.5em; -} - -.method .sourcecode p.source-link { - text-indent: 0em; - margin-top: 0.5em; -} - -.method .aka { - margin-top: 0.3em; - margin-left: 1em; - font-style: italic; - text-indent: 2em; -} - -h1 { - padding: 1em; - margin-left: -1.5em; - font-size: x-large; - font-weight: bold; - color: #FFF; - background: #007; -} - -h2 { - padding: 0.5em 1em 0.5em 1em; - margin-left: -1.5em; - font-size: large; - font-weight: bold; - color: #FFF; - background: #009; -} - -h3, h4, h5, h6 { - color: #220088; - border-bottom: #5522bb solid 1px; -} - -.sourcecode > pre { - padding: 0.5em; - border: 1px dotted black; - background: #FFE; -} - -dt { - font-weight: bold -} - -dd { - margin-bottom: 0.7em; -} -CSS - -XHTML_PREAMBLE = %{"?> - -} - -XHTML_FRAMESET_PREAMBLE = %{ - -} - -HEADER = XHTML_PREAMBLE + < - - <%= values['title'] %> - - - - - - - -ENDHEADER - -FILE_PAGE = < - - - - -
File
<%= values['short_name'] %>
- - - - - - - - - -
Path:<%= values['full_path'] %> -<% if values['cvsurl'] %> -  (CVS) -<% end %> -
Modified:<%= values['dtm_modified'] %>
-
- -
-HTML - -################################################################### - -CLASS_PAGE = < - <%= values['classmod'] %>
<%= values['full_name'] %> - - - - - - -<% if values['parent'] %> - - - - -<% end %> -
In: -<% values['infiles'].each do |infile| %> -<%= href infile['full_path_url'], infile['full_path'] %>: -<% if infile['cvsurl'] %> - (CVS) -<% end %> -<% end %> -
Parent: -<% if values['par_url'] %> - -<% end %> -<%= values['parent'] %> -<% if values['par_url'] %> - -<% end %> -
- - - -HTML - -################################################################### - -METHOD_LIST = < -<% if values['diagram'] %> -
- <%= values['diagram'] %> -
-<% end %> - -<% if values['description'] %> -
<%= values['description'] %>
-<% end %> - -<% if values['requires'] %> -
Required Files
-
    -<% values['requires'].each do |require| %> -
  • <%= href require['aref'], require['name'] %>:
  • -<% end %> -
-<% end %> - -<% if values['toc'] %> -
Contents
- -<% end %> - -<% if values['methods'] %> -
Methods
-
    -<% values['methods'].each do |method| %> -
  • <%= href method['aref'], method['name'] %>
  • -<% end %> -
-<% end %> - -<% if values['includes'] %> -
Included Modules
-
    -<% values['includes'].each do |include| %> -
  • <%= href include['aref'], include['name'] %>:
  • -<% end %> -
-<% end %> - -<% values['sections'].each do |section| %> -<% if section['sectitle'] %> - -<% if section['seccomment'] %> -
-<%= section['seccomment'] %> -
-<% end %> -<% end %> - -<% if section['classlist'] %> -
Classes and Modules
- <%= section['classlist'] %> -<% end %> - -<% if section['constants'] %> -
Constants
- -<% section['constants'].each do |constant| %> - - - - - -<% if constant['desc'] %> - - - - -<% end %> -<% end %> -
<%= constant['name'] %>=<%= constant['value'] %>
 <%= constant['desc'] %>
-<% end %> - -<% if section['attributes'] %> -
Attributes
- -<% section['attributes'].each do |attribute| %> - - - - - -<% end %> -
-<% if attribute['rw'] %> -[<%= attribute['rw'] %>] -<% end %> - <%= attribute['name'] %><%= attribute['a_desc'] %>
-<% end %> - -<% if section['method_list'] %> -<% section['method_list'].each do |method_list| %> -<% if method_list['methods'] %> -
<%= method_list['type'] %> <%= method_list['category'] %> methods
-<% method_list['methods'].each do |method| %> -
-
-<% if method['callseq'] %> - <%= method['callseq'] %> -<% end %> -<% unless method['callseq'] %> - <%= method['name'] %><%= method['params'] %> -<% end %> -<% if method['codeurl'] %> -[ source ] -<% end %> -
-<% if method['m_desc'] %> -
- <%= method['m_desc'] %> -
-<% end %> -<% if method['aka'] %> -
- This method is also aliased as -<% method['aka'].each do |aka| %> - <%= aka['name'] %> -<% end %> -
-<% end %> -<% if method['sourcecode'] %> -
- -
-
-<%= method['sourcecode'] %>
-
-
-
-<% end %> -
-<% end %> -<% end %> -<% end %> -<% end %> -<% end %> - -HTML - -FOOTER = < - -ENDFOOTER - -BODY = HEADER + < - -
- #{METHOD_LIST} -
- - #{FOOTER} -ENDBODY - -########################## Source code ########################## - -SRC_PAGE = XHTML_PREAMBLE + < -<%= values['title'] %> - - - - -
<%= values['code'] %>
- - -HTML - -########################## Index ################################ - -FR_INDEX_BODY = < -HTML - -FILE_INDEX = XHTML_PREAMBLE + < - - -Index - - - - - -
-<% values['entries'].each do |entrie| %> -<%= entrie['name'] %>
-<% end %> -
- -HTML - -CLASS_INDEX = FILE_INDEX -METHOD_INDEX = FILE_INDEX - -INDEX = XHTML_FRAMESET_PREAMBLE + < - - <%= values['title'] %> - - - - - - - - - - - - <body bgcolor="white"> - Click <a href="html/index.html">here</a> for a non-frames - version of this page. - </body> - - - - -HTML - -end -end -end -end