diff options
author | Pratik Naik <pratiknaik@gmail.com> | 2010-03-12 16:00:01 +0000 |
---|---|---|
committer | Pratik Naik <pratiknaik@gmail.com> | 2010-03-12 16:00:01 +0000 |
commit | e68bfaf1fe1a7890a67af6f444281185f507cf9e (patch) | |
tree | 5e73caccdcdd65d0ac97f9eb92195928f30925f2 /Rakefile | |
parent | ef6462c73003b28c8e060a06120abb9cd67b6d52 (diff) | |
parent | 16846553b8866eab2aa3b128a2a23a221a25f7e3 (diff) | |
download | rails-e68bfaf1fe1a7890a67af6f444281185f507cf9e.tar.gz rails-e68bfaf1fe1a7890a67af6f444281185f507cf9e.tar.bz2 rails-e68bfaf1fe1a7890a67af6f444281185f507cf9e.zip |
Merge remote branch 'mainstream/master'
Conflicts:
activerecord/lib/active_record/base.rb
railties/lib/rails/configuration.rb
railties/lib/rails/log_subscriber.rb
Diffstat (limited to 'Rakefile')
-rw-r--r-- | Rakefile | 48 |
1 files changed, 36 insertions, 12 deletions
@@ -2,23 +2,17 @@ require 'rake' require 'rake/rdoctask' require 'rake/gempackagetask' -env = %(PKG_BUILD="#{ENV['PKG_BUILD']}") if ENV['PKG_BUILD'] - PROJECTS = %w(activesupport activemodel actionpack actionmailer activeresource activerecord railties) -Dir["#{File.dirname(__FILE__)}/*/lib/*/version.rb"].each do |version_path| - require version_path -end - desc 'Run all tests by default' task :default => %w(test test:isolated) -%w(test test:isolated rdoc pgem package gem gemspec).each do |task_name| +%w(test test:isolated rdoc package gem).each do |task_name| desc "Run #{task_name} task for all projects" task task_name do errors = [] PROJECTS.each do |project| - system(%(cd #{project} && #{env} #{$0} #{task_name})) || errors << project + system(%(cd #{project} && #{$0} #{task_name})) || errors << project end fail("Errors in #{errors.join(', ')}") unless errors.empty? end @@ -27,9 +21,9 @@ end desc "Smoke-test all projects" task :smoke do (PROJECTS - %w(activerecord)).each do |project| - system %(cd #{project} && #{env} #{$0} test:isolated) + system %(cd #{project} && #{$0} test:isolated) end - system %(cd activerecord && #{env} #{$0} sqlite3:isolated_test) + system %(cd activerecord && #{$0} sqlite3:isolated_test) end spec = eval(File.read('rails.gemspec')) @@ -48,12 +42,14 @@ desc "Release all components to gemcutter." task :release_projects => :package do errors = [] PROJECTS.each do |project| - system(%(cd #{project} && #{env} #{$0} release)) || errors << project + system(%(cd #{project} && #{$0} release)) || errors << project end fail("Errors in #{errors.join(', ')}") unless errors.empty? end +desc "Install gems for all projects." task :install => :gem do + require File.expand_path("../actionpack/lib/action_pack/version", __FILE__) (PROJECTS - ["railties"]).each do |project| puts "INSTALLING #{project}" system("gem install #{project}/pkg/#{project}-#{ActionPack::VERSION::STRING}.gem --no-ri --no-rdoc") @@ -121,6 +117,34 @@ 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) + system %(cd #{project} && #{$0} pdoc) + end +end + +task :update_versions do + require File.dirname(__FILE__) + "/version" + + File.open("RAILS_VERSION", "w") do |f| + f.write Rails::VERSION::STRING + "\n" + end + + constants = { + "activesupport" => "ActiveSupport", + "activemodel" => "ActiveModel", + "actionpack" => "ActionPack", + "actionmailer" => "ActionMailer", + "activeresource" => "ActiveResource", + "activerecord" => "ActiveRecord", + "railties" => "Rails" + } + + version_file = File.read("version.rb") + + PROJECTS.each do |project| + Dir["#{project}/lib/*/version.rb"].each do |file| + File.open(file, "w") do |f| + f.write version_file.gsub(/Rails/, constants[project]) + end + end end end |