Permalink
Browse files

Defer rake/contrib requires so we can use the stdlib rake instead of …

…the full gem
  • Loading branch information...
1 parent 216309c commit 4c963972fd0fb696e857540351f7558f027ec962 @jeremy jeremy committed May 12, 2009
Showing with 4 additions and 2 deletions.
  1. +1 −1 Rakefile
  2. +3 −1 railties/Rakefile
View
@@ -1,6 +1,5 @@
require 'rake'
require 'rake/rdoctask'
-require 'rake/contrib/sshpublisher'
env = %(PKG_BUILD="#{ENV['PKG_BUILD']}") if ENV['PKG_BUILD']
@@ -74,6 +73,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
PROJECTS.each do |project|
system %(cd #{project} && #{env} #{$0} pdoc)
View
@@ -2,7 +2,6 @@ require 'rake'
require 'rake/testtask'
require 'rake/rdoctask'
require 'rake/gempackagetask'
-require 'rake/contrib/rubyforgepublisher'
require 'date'
require 'rbconfig'
@@ -344,12 +343,14 @@ end
# Publishing -------------------------------------------------------
desc "Publish the rails gem"
task :pgem => [:gem] do
+ require 'rake/contrib/sshpublisher'
Rake::SshFilePublisher.new("gems.rubyonrails.org", "/u/sites/gems/gems", "pkg", "#{PKG_FILE_NAME}.gem").upload
`ssh gems.rubyonrails.org '/u/sites/gems/gemupdate.sh'`
end
desc "Publish the guides"
task :pguides => :guides do
+ require 'rake/contrib/sshpublisher'
mkdir_p 'pkg'
`tar -czf pkg/guides.gz guides/output`
Rake::SshFilePublisher.new("web.rubyonrails.org", "/u/sites/guides.rubyonrails.org/public", "pkg", "guides.gz").upload
@@ -358,6 +359,7 @@ end
desc "Publish the release files to RubyForge."
task :release => [ :package ] do
+ require 'rake/contrib/rubyforgepublisher'
require 'rubyforge'
packages = %w( gem ).collect{ |ext| "pkg/#{PKG_NAME}-#{PKG_VERSION}.#{ext}" }

0 comments on commit 4c96397

Please sign in to comment.