Skip to content

Commit a02d672

Browse files
committed
Horo rdoc template
1 parent f4ccc17 commit a02d672

File tree

10 files changed

+630
-16
lines changed

10 files changed

+630
-16
lines changed

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
debug.log
2-
doc
2+
doc/rdoc
33
activeresource/doc
44
activerecord/doc
55
actionpack/doc

Rakefile

+7-7
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ end
1313
desc 'Run all tests by default'
1414
task :default => :test
1515

16-
%w(test rdoc package release).each do |task_name|
16+
%w(test rdoc pgem package release).each do |task_name|
1717
desc "Run #{task_name} task for all projects"
1818
task task_name do
1919
PROJECTS.each do |project|
@@ -25,14 +25,14 @@ end
2525

2626
desc "Generate documentation for the Rails framework"
2727
Rake::RDocTask.new do |rdoc|
28-
rdoc.rdoc_dir = 'doc'
29-
rdoc.title = "Rails Framework Documentation"
28+
rdoc.rdoc_dir = 'doc/rdoc'
29+
rdoc.title = "Ruby on Rails Documentation"
3030

3131
rdoc.options << '--line-numbers' << '--inline-source'
3232
rdoc.options << '-A cattr_accessor=object'
3333
rdoc.options << '--charset' << 'utf-8'
3434

35-
rdoc.template = "#{ENV['template']}.rb" if ENV['template']
35+
rdoc.template = ENV['template'] ? "#{ENV['template']}.rb" : './doc/template/horo'
3636

3737
rdoc.rdoc_files.include('railties/CHANGELOG')
3838
rdoc.rdoc_files.include('railties/MIT-LICENSE')
@@ -68,13 +68,13 @@ end
6868

6969
# Enhance rdoc task to copy referenced images also
7070
task :rdoc do
71-
FileUtils.mkdir_p "doc/files/examples/"
72-
FileUtils.copy "activerecord/examples/associations.png", "doc/files/examples/associations.png"
71+
FileUtils.mkdir_p "doc/rdoc/files/examples/"
72+
FileUtils.copy "activerecord/examples/associations.png", "doc/rdoc/files/examples/associations.png"
7373
end
7474

7575
desc "Publish API docs for Rails as a whole and for each component"
7676
task :pdoc => :rdoc do
77-
Rake::SshDirPublisher.new("wrath.rubyonrails.org", "public_html/api", "doc").upload
77+
Rake::SshDirPublisher.new("wrath.rubyonrails.org", "public_html/api", "doc/rdoc").upload
7878
PROJECTS.each do |project|
7979
system %(cd #{project} && #{env} #{$0} pdoc)
8080
end

actionmailer/Rakefile

+2-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Rake::RDocTask.new { |rdoc|
3535
rdoc.title = "Action Mailer -- Easy email delivery and testing"
3636
rdoc.options << '--line-numbers' << '--inline-source' << '-A cattr_accessor=object'
3737
rdoc.options << '--charset' << 'utf-8'
38-
rdoc.template = "#{ENV['template']}.rb" if ENV['template']
38+
rdoc.template = ENV['template'] ? "#{ENV['template']}.rb" : '../doc/template/horo'
3939
rdoc.rdoc_files.include('README', 'CHANGELOG')
4040
rdoc.rdoc_files.include('lib/action_mailer.rb')
4141
rdoc.rdoc_files.include('lib/action_mailer/*.rb')
@@ -77,6 +77,7 @@ end
7777
desc "Publish the API documentation"
7878
task :pgem => [:package] do
7979
Rake::SshFilePublisher.new("wrath.rubyonrails.org", "public_html/gems/gems", "pkg", "#{PKG_FILE_NAME}.gem").upload
80+
`ssh wrath.rubyonrails.org './gemupdate.sh'`
8081
end
8182

8283
desc "Publish the API documentation"

actionpack/Rakefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ Rake::RDocTask.new { |rdoc|
4949
rdoc.title = "Action Pack -- On rails from request to response"
5050
rdoc.options << '--line-numbers' << '--inline-source'
5151
rdoc.options << '--charset' << 'utf-8'
52-
rdoc.template = "#{ENV['template']}.rb" if ENV['template']
52+
rdoc.template = ENV['template'] ? "#{ENV['template']}.rb" : '../doc/template/horo'
5353
if ENV['DOC_FILES']
5454
rdoc.rdoc_files.include(ENV['DOC_FILES'].split(/,\s*/))
5555
else

activemodel/Rakefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Rake::RDocTask.new { |rdoc|
1010
rdoc.title = "Active Model"
1111
rdoc.options << '--line-numbers' << '--inline-source' << '-A cattr_accessor=object'
1212
rdoc.options << '--charset' << 'utf-8'
13-
rdoc.template = "#{ENV['template']}.rb" if ENV['template']
13+
rdoc.template = ENV['template'] ? "#{ENV['template']}.rb" : '../doc/template/horo'
1414
rdoc.rdoc_files.include('README', 'CHANGES')
1515
rdoc.rdoc_files.include('lib/**/*.rb')
16-
}
16+
}

activerecord/Rakefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ Rake::RDocTask.new { |rdoc|
141141
rdoc.title = "Active Record -- Object-relation mapping put on rails"
142142
rdoc.options << '--line-numbers' << '--inline-source' << '-A cattr_accessor=object'
143143
rdoc.options << '--charset' << 'utf-8'
144-
rdoc.template = "#{ENV['template']}.rb" if ENV['template']
144+
rdoc.template = ENV['template'] ? "#{ENV['template']}.rb" : '../doc/template/horo'
145145
rdoc.rdoc_files.include('README', 'RUNNING_UNIT_TESTS', 'CHANGELOG')
146146
rdoc.rdoc_files.include('lib/**/*.rb')
147147
rdoc.rdoc_files.exclude('lib/active_record/vendor/*')

activeresource/Rakefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ Rake::RDocTask.new { |rdoc|
4242
rdoc.title = "Active Resource -- Object-oriented REST services"
4343
rdoc.options << '--line-numbers' << '--inline-source' << '-A cattr_accessor=object'
4444
rdoc.options << '--charset' << 'utf-8'
45-
rdoc.template = "#{ENV['template']}.rb" if ENV['template']
45+
rdoc.template = ENV['template'] ? "#{ENV['template']}.rb" : '../doc/template/horo'
4646
rdoc.rdoc_files.include('README', 'CHANGELOG')
4747
rdoc.rdoc_files.include('lib/**/*.rb')
4848
rdoc.rdoc_files.exclude('lib/activeresource.rb')

activesupport/Rakefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Rake::RDocTask.new { |rdoc|
3333
rdoc.title = "Active Support -- Utility classes and standard library extensions from Rails"
3434
rdoc.options << '--line-numbers' << '--inline-source'
3535
rdoc.options << '--charset' << 'utf-8'
36-
rdoc.template = "#{ENV['template']}.rb" if ENV['template']
36+
rdoc.template = ENV['template'] ? "#{ENV['template']}.rb" : '../doc/template/horo'
3737
rdoc.rdoc_files.include('README', 'CHANGELOG')
3838
rdoc.rdoc_files.include('lib/active_support.rb')
3939
rdoc.rdoc_files.include('lib/active_support/**/*.rb')

0 commit comments

Comments
 (0)