Permalink
Browse files

Merge branch 'master' of github.com:rails/rails

  • Loading branch information...
2 parents 7ba7562 + 2aa4e5f commit 69bc8b26a9be246acc06eaab09063eb97f76aa00 @josevalim josevalim committed Jun 17, 2010
View
@@ -5,6 +5,7 @@ gem "rails", :path => File.dirname(__FILE__)
gem "rake", ">= 0.8.7"
gem "mocha", ">= 0.9.8"
+gem "rdoc", "2.2"
mri = !defined?(RUBY_ENGINE) || RUBY_ENGINE == "ruby"
if mri && RUBY_VERSION < '1.9'
@@ -44,10 +45,6 @@ elsif RUBY_ENGINE == "jruby"
end
end
-group :documentation do
- gem 'rdoc', '2.1'
-end
-
if ENV['CI']
gem "nokogiri", ">= 1.4.0"
View
@@ -1,3 +1,6 @@
+gem 'rdoc', '= 2.2'
+require 'rdoc'
+
require 'rake'
require 'rake/rdoctask'
require 'rake/gempackagetask'
@@ -68,7 +71,15 @@ Rake::RDocTask.new do |rdoc|
rdoc.options << '--charset' << 'utf-8'
rdoc.options << '--main' << 'railties/README'
- rdoc.template = ENV['template'] ? "#{ENV['template']}.rb" : './doc/template/horo'
+ # Workaround: RDoc assumes that rdoc.template can be required, and that
+ # rdoc.template.upcase is a constant living in RDoc::Generator::HTML
+ # which holds the actual template class.
+ #
+ # We put 'doc/template' in the load path to be able to set the template
+ # to the string 'horo' and thus meet those RDoc's assumptions.
+ $:.unshift('doc/template')
+
+ rdoc.template = ENV['template'] ? "#{ENV['template']}.rb" : 'horo'
rdoc.rdoc_files.include('railties/CHANGELOG')
rdoc.rdoc_files.include('railties/MIT-LICENSE')
@@ -117,7 +128,7 @@ end
desc "Publish API docs for Rails as a whole and for each component"
task :pdoc => :rdoc do
require 'rake/contrib/sshpublisher'
- Rake::SshDirPublisher.new("wrath.rubyonrails.org", "public_html/api", "doc/rdoc").upload
+ Rake::SshDirPublisher.new("rails@api.rubyonrails.org", "public_html/api", "doc/rdoc").upload
PROJECTS.each do |project|
system %(cd #{project} && #{$0} pdoc)
end
View
@@ -1,4 +1,5 @@
-require 'rubygems'
+gem 'rdoc', '= 2.2'
+require 'rdoc'
require 'rake'
require 'rake/testtask'
require 'rake/rdoctask'
@@ -53,5 +54,5 @@ end
desc "Publish the API documentation"
task :pdoc => [:rdoc] do
require 'rake/contrib/sshpublisher'
- Rake::SshDirPublisher.new("wrath.rubyonrails.org", "public_html/am", "doc").upload
+ Rake::SshDirPublisher.new("rails@api.rubyonrails.org", "public_html/am", "doc").upload
end
View
@@ -1,4 +1,5 @@
-require 'rubygems'
+gem 'rdoc', '= 2.2'
+require 'rdoc'
require 'rake'
require 'rake/testtask'
require 'rake/rdoctask'
View
@@ -1,5 +1,8 @@
dir = File.dirname(__FILE__)
+gem 'rdoc', '= 2.2'
+require 'rdoc'
+
require 'rake/testtask'
task :default => :test
View
@@ -1,4 +1,5 @@
-require 'rubygems'
+gem 'rdoc', '= 2.2'
+require 'rdoc'
require 'rake'
require 'rake/testtask'
require 'rake/rdoctask'
@@ -222,5 +223,5 @@ end
desc "Publish the API documentation"
task :pdoc => [:rdoc] do
require 'rake/contrib/sshpublisher'
- Rake::SshDirPublisher.new("wrath.rubyonrails.org", "public_html/ar", "doc").upload
+ Rake::SshDirPublisher.new("rails@api.rubyonrails.org", "public_html/ar", "doc").upload
end
@@ -1032,7 +1032,7 @@ def test_add_table_with_decimals
elsif current_adapter?(:SQLiteAdapter)
# - SQLite3 stores a float, in violation of SQL
assert_kind_of BigDecimal, b.value_of_e
- assert_equal BigDecimal("2.71828182845905"), b.value_of_e
+ assert_in_delta BigDecimal("2.71828182845905"), b.value_of_e, 0.00000000000001
else
# - SQL standard is an integer
assert_kind_of Fixnum, b.value_of_e
View
@@ -1,4 +1,5 @@
-require 'rubygems'
+gem 'rdoc', '= 2.2'
+require 'rdoc'
require 'rake'
require 'rake/testtask'
require 'rake/rdoctask'
@@ -83,5 +84,5 @@ end
desc "Publish the API documentation"
task :pdoc => [:rdoc] do
require 'rake/contrib/sshpublisher'
- Rake::SshDirPublisher.new("wrath.rubyonrails.org", "public_html/ar", "doc").upload
+ Rake::SshDirPublisher.new("rails@api.rubyonrails.org", "public_html/ar", "doc").upload
end
View
@@ -1,3 +1,5 @@
+gem 'rdoc', '= 2.2'
+require 'rdoc'
require 'rake/testtask'
require 'rake/rdoctask'
require 'rake/gempackagetask'
@@ -47,5 +49,5 @@ end
desc "Publish the API documentation"
task :pdoc => [:rdoc] do
require 'rake/contrib/sshpublisher'
- Rake::SshDirPublisher.new("wrath.rubyonrails.org", "public_html/as", "doc").upload
+ Rake::SshDirPublisher.new("rails@api.rubyonrails.org", "public_html/as", "doc").upload
end
Oops, something went wrong.

0 comments on commit 69bc8b2

Please sign in to comment.