diff options
Diffstat (limited to 'railties')
-rw-r--r-- | railties/CHANGELOG | 2 | ||||
-rw-r--r-- | railties/lib/tasks/framework.rake | 9 |
2 files changed, 8 insertions, 3 deletions
diff --git a/railties/CHANGELOG b/railties/CHANGELOG index 24a82e89fe..6b50897638 100644 --- a/railties/CHANGELOG +++ b/railties/CHANGELOG @@ -1,5 +1,7 @@ *SVN* +* Don't replace application.js in public/javascripts if it already exists [Cody Fauser] + * Change test:uncommitted to delay execution of `svn status` by using internal Rake API's. [Nicholas Seckar] * Use require_library_or_gem to load rake in commands/server.rb. Closes #4205. [rob.rasmussen@gmail.com] diff --git a/railties/lib/tasks/framework.rake b/railties/lib/tasks/framework.rake index 9e39e02edb..4ac7f7ebe0 100644 --- a/railties/lib/tasks/framework.rake +++ b/railties/lib/tasks/framework.rake @@ -85,9 +85,12 @@ namespace :rails do end desc "Update your javascripts from your current rails install" - task :javascripts do + task :javascripts do require 'railties_path' - FileUtils.cp(Dir[RAILTIES_PATH + '/html/javascripts/*.js'], RAILS_ROOT + '/public/javascripts/') + project_dir = RAILS_ROOT + '/public/javascripts/' + scripts = Dir[RAILTIES_PATH + '/html/javascripts/*.js'] + scripts.reject!{|s| File.basename(s) == 'application.js'} if File.exists?(project_dir + 'application.js') + FileUtils.cp(scripts, project_dir) end end -end
\ No newline at end of file +end |