diff options
Diffstat (limited to 'railties/Rakefile')
-rw-r--r-- | railties/Rakefile | 32 |
1 files changed, 15 insertions, 17 deletions
diff --git a/railties/Rakefile b/railties/Rakefile index 3a87a88ddc..e6f698fc74 100644 --- a/railties/Rakefile +++ b/railties/Rakefile @@ -6,12 +6,8 @@ require 'rake/gempackagetask' require 'date' require 'rbconfig' -begin - require File.expand_path('../../vendor/gems/environment', __FILE__) -rescue LoadError -end $LOAD_PATH.unshift "#{File.dirname(__FILE__)}/lib" -require 'rails' +require 'rails/version' PKG_BUILD = ENV['PKG_BUILD'] ? '.' + ENV['PKG_BUILD'] : '' PKG_NAME = ENV['PKG_NAME'] || 'rails' @@ -26,21 +22,23 @@ RUBY_FORGE_USER = "webster132" task :default => :test +task :test => 'test:isolated' ## This is required until the regular test task ## below passes. It's not ideal, but at least ## we can see the failures -task :test do - dir = ENV["TEST_DIR"] || "**" - Dir["test/#{dir}/*_test.rb"].all? do |file| - next true if file.include?("fixtures") - ruby = File.join(*RbConfig::CONFIG.values_at('bindir', 'RUBY_INSTALL_NAME')) - system(ruby, '-Itest', "-I#{File.dirname(__FILE__)}/../activesupport/lib", file) - end or raise "Failures" -end -task :isolated_test => :test - -Rake::TestTask.new("regular_test") do |t| +namespace :test do + task :isolated do + dir = ENV["TEST_DIR"] || "**" + Dir["test/#{dir}/*_test.rb"].all? do |file| + next true if file.include?("fixtures") + ruby = File.join(*RbConfig::CONFIG.values_at('bindir', 'RUBY_INSTALL_NAME')) + system(ruby, '-Itest', "-I#{File.dirname(__FILE__)}/../activesupport/lib", file) + end or raise "Failures" + end +end + +Rake::TestTask.new('test:regular') do |t| t.libs << 'test' << "#{File.dirname(__FILE__)}/../activesupport/lib" t.pattern = 'test/**/*_test.rb' t.warning = true @@ -152,7 +150,7 @@ end # Publishing ------------------------------------------------------- desc "Publish the rails gem" -task :pgem => [:gem] do +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'` |