aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/tasks/framework.rake
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2006-04-07 18:21:52 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2006-04-07 18:21:52 +0000
commitc077a7308eb84deb0e068ead404caa88621f1836 (patch)
treeb4e8ee76c7b52334912dd8aa916fb679ee264779 /railties/lib/tasks/framework.rake
parent7d3092478cf2f572ffc9a106c2eedc520986e60d (diff)
downloadrails-c077a7308eb84deb0e068ead404caa88621f1836.tar.gz
rails-c077a7308eb84deb0e068ead404caa88621f1836.tar.bz2
rails-c077a7308eb84deb0e068ead404caa88621f1836.zip
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
Diffstat (limited to 'railties/lib/tasks/framework.rake')
-rw-r--r--railties/lib/tasks/framework.rake12
1 files changed, 10 insertions, 2 deletions
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