resh 0.0.3 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/ChangeLog CHANGED
@@ -1,3 +1,8 @@
1
+ 2007-10-20 SATOH Hiroh <cho45@lowreal.net>
2
+
3
+ * release 0.0.3:
4
+ * Fixed typo on all pages' footer.
5
+
1
6
  2007-10-11 SATOH Hiroh <cho45@lowreal.net>
2
7
 
3
8
  * release 0.0.3:
data/README CHANGED
@@ -1,5 +1,5 @@
1
1
 
2
- = resh
2
+ = Resh
3
3
 
4
4
 
5
5
  == Description
data/Rakefile CHANGED
@@ -11,25 +11,27 @@ require 'rubyforge'
11
11
  require 'fileutils'
12
12
  include FileUtils
13
13
 
14
- NAME = "resh"
15
- AUTHOR = "cho45"
16
- EMAIL = "cho45@lowreal.net"
17
- DESCRIPTION = "A RDoc template."
14
+ NAME = "resh"
15
+ AUTHOR = "cho45"
16
+ EMAIL = "cho45@lowreal.net"
17
+ DESCRIPTION = "A RDoc template."
18
18
  RUBYFORGE_PROJECT = "lowreal"
19
- HOMEPATH = "http://coderepos.org/share/wiki/Resh"
20
- BIN_FILES = %w( )
21
- VERS = "0.0.3"
19
+ HOMEPATH = "http://coderepos.org/share/wiki/Resh"
20
+ BIN_FILES = %w( )
21
+ VERS = "0.0.4"
22
22
 
23
23
  REV = File.read(".svn/entries")[/committed-rev="(d+)"/, 1] rescue nil
24
24
  CLEAN.include ['**/.*.sw?', '*.gem', '.config']
25
25
  CLOBBER.include ['lib/rdoc/generators/template/html/resh/*']
26
- RDOC_OPTS = ['--title', "#{NAME} documentation",
26
+ RDOC_OPTS = [
27
+ '--title', "#{NAME.capitalize} documentation",
27
28
  "--charset", "utf-8",
28
29
  "--opname", "index.html",
29
30
  "--line-numbers",
30
31
  "--main", "README",
31
32
  "--inline-source",
32
33
  ]
34
+ ENV["RESH_ADDITIONAL_STYLE_FILE"] = Pathname.new("rdoc.css").realpath(true)
33
35
 
34
36
  desc "Packages up #{NAME} gem."
35
37
  task :default => [:test]
@@ -217,7 +217,7 @@
217
217
  <p class="footer-links"><a href="<%=index%>">&lt;Index</a> <a href="#top">Top^</a></p>
218
218
  <p>Created at: <%=require "time"; Time.now.xmlschema %></p>
219
219
  <p>
220
- Powerd by
220
+ Powered by
221
221
  <span class="ruby-r">R</span>Doc
222
222
  (
223
223
  template: <a href="http://coderepos.org/share/wiki/Resh">Resh</a>
@@ -201,7 +201,7 @@
201
201
  <p>Original Document Last-modified: <%=Time.parse(values["dtm_modified"]).xmlschema%></p>
202
202
  <p>Created at: <%=require "time"; Time.now.xmlschema %></p>
203
203
  <p>
204
- Powerd by
204
+ Powered by
205
205
  <span class="ruby-r">R</span>Doc
206
206
  (
207
207
  template: <a href="http://coderepos.org/share/wiki/Resh">Resh</a>
@@ -22,7 +22,7 @@
22
22
  if readme
23
23
  r = readme.value_hash
24
24
  %>
25
- <div class="readme">
25
+ <div class="readme" id="readme">
26
26
  <div class="readme-information">
27
27
  <p class="short-name">
28
28
  <%=r["short_name"]%>
@@ -38,7 +38,7 @@
38
38
  <%=r["description"]%>
39
39
  </div>
40
40
  <% end %>
41
- <div class="index-classes">
41
+ <div class="index-classes" id="classes">
42
42
  <h2>Classes/Modules</h2>
43
43
  <% @classes.sort.each do |c|
44
44
  next unless c.document_self
@@ -70,7 +70,7 @@
70
70
  <% end %>
71
71
  <% end %>
72
72
  </div>
73
- <div class="index-files">
73
+ <div class="index-files" id="files">
74
74
  <h2>Files</h2>
75
75
  <ul>
76
76
  <% @files.sort.each do |f|
@@ -87,7 +87,7 @@
87
87
  <p class="footer-links"><a href="#top">Top^</a></p>
88
88
  <p>Created at: <%=require "time"; Time.now.xmlschema %></p>
89
89
  <p>
90
- Powerd by
90
+ Powered by
91
91
  <span class="ruby-r">R</span>Doc
92
92
  (
93
93
  template: <a href="http://coderepos.org/share/wiki/Resh">Resh</a>
@@ -1,11 +1,17 @@
1
1
  #!rdoc --charset utf-8 --template ~/coderepos/lang/ruby/rdoc/generators/template/html/resh/resh.rb /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/{README,lib/*,doc/*}
2
- #!rdoc --charset utf-8 --inline-source --template ~/coderepos/lang/ruby/rdoc/generators/template/html/erbdeyareyo.rb /opt/ruby1.8.5/lib/ruby/1.8/rdoc/*.rb
2
+ #
3
+ # Overides all methods using TemplatePage
4
+ # to use ERB instead of it.
3
5
 
4
- require "pp"
6
+ require "rdoc/rdoc"
5
7
  require "erb"
6
8
  require "pathname"
7
9
 
10
+ $tmpl = Pathname.new(__FILE__).parent
11
+
8
12
  class ::TemplateFile
13
+ # TemplateFile.new raise error.
14
+ # It's best to be as safe as possible.
9
15
  def initialize
10
16
  raise "DO NOT USE"
11
17
  end
@@ -16,7 +22,6 @@ module ::RDoc::Page
16
22
  CLASS_INDEX = ""
17
23
  METHOD_INDEX = ""
18
24
  end
19
- $tmpl = Pathname.new(__FILE__).parent
20
25
 
21
26
  p ::Generators::HtmlClass
22
27
  class ::Generators::HtmlClass
@@ -69,13 +74,21 @@ end
69
74
 
70
75
  p ::Generators::HTMLGenerator
71
76
  class ::Generators::HTMLGenerator
72
- alias :orig_generate :generate
73
- def generate(*args)
77
+ # Overrides generate method to
78
+ # change order of processing.
79
+ # write_style_sheet should be processed at last.
80
+ def generate(toplevels)
74
81
  @options.instance_eval "@inline_source = true"
75
- orig_generate(*args)
82
+ @toplevels = toplevels
83
+ @files = []
84
+ @classes = []
85
+
86
+ gen_sub_directories()
87
+ build_indices
88
+ generate_html
89
+ write_style_sheet
76
90
  end
77
91
 
78
- # TemplatePage をつかっているのをぬきだしてきたやつ
79
92
  def write_style_sheet
80
93
  return unless defined? RDoc::Page::STYLE
81
94
  File.open(::Generators::CSS_NAME, "w") {|f|
@@ -121,8 +134,9 @@ class ::Generators::HTMLGenerator
121
134
  end
122
135
  end
123
136
 
137
+ # Not used.
124
138
  def generate_xml
125
- values = {
139
+ values = {
126
140
  'charset' => @options.charset,
127
141
  'files' => gen_into(@files),
128
142
  'classes' => gen_into(@classes),
@@ -208,4 +208,7 @@ a.method-signature {
208
208
  .ruby-operator {
209
209
  }
210
210
 
211
-
211
+ <% path = ENV["RESH_ADDITIONAL_STYLE_FILE"] %>
212
+ <% if path && File.exist?(path) %>
213
+ <%=File.read(path)%>
214
+ <% end %>
metadata CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.4
3
3
  specification_version: 1
4
4
  name: resh
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.0.3
7
- date: 2007-10-11 00:00:00 +09:00
6
+ version: 0.0.4
7
+ date: 2007-10-20 00:00:00 +09:00
8
8
  summary: A RDoc template.
9
9
  require_paths:
10
10
  - lib
@@ -50,7 +50,7 @@ test_files:
50
50
  - test/test_helper.rb
51
51
  rdoc_options:
52
52
  - "--title"
53
- - resh documentation
53
+ - Resh documentation
54
54
  - "--charset"
55
55
  - utf-8
56
56
  - "--opname"