From c077a7308eb84deb0e068ead404caa88621f1836 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Fri, 7 Apr 2006 18:21:52 +0000 Subject: Fixed that boot.rb would set RAILS_GEM_VERSION twice, not respect an uncommented RAILS_GEM_VERSION line, and not use require_gem [DHH] Added rake rails:update:configs to update config/boot.rb from the latest (also included in rake rails:update) [DHH] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4197 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- railties/lib/tasks/framework.rake | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'railties/lib/tasks/framework.rake') diff --git a/railties/lib/tasks/framework.rake b/railties/lib/tasks/framework.rake index d12471949b..bc8093e855 100644 --- a/railties/lib/tasks/framework.rake +++ b/railties/lib/tasks/framework.rake @@ -71,8 +71,8 @@ namespace :rails do rm_rf "vendor/rails" end - desc "Update both scripts and public/javascripts from Rails" - task :update => [ "update:scripts", "update:javascripts" ] + desc "Update both configs, scripts and public/javascripts from Rails" + task :update => [ "update:scripts", "update:javascripts", "update:configs" ] namespace :update do desc "Add new scripts to the application script/ directory" @@ -102,5 +102,13 @@ namespace :rails do scripts.reject!{|s| File.basename(s) == 'application.js'} if File.exists?(project_dir + 'application.js') FileUtils.cp(scripts, project_dir) end + + desc "Update boot/config.rb from your current rails install" + task :configs do + require 'railties_path' + project_dir = RAILS_ROOT + '/public/javascripts/' + scripts = Dir[RAILTIES_PATH + '/html/javascripts/*.js'] + FileUtils.cp(RAILTIES_PATH + '/environments/boot.rb', RAILTIES_PATH + '/environments/boot.rb') + end end end -- cgit v1.2.3