mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Added Rails framework freezing tasks: freeze_gems (freeze to current gems), freeze_edge (freeze to Rails SVN trunk), unfreeze_rails (float with newest gems on system)
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2613 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
parent
48fd667bda
commit
8cfcc04d08
2 changed files with 33 additions and 0 deletions
|
@ -1,5 +1,7 @@
|
|||
*SVN*
|
||||
|
||||
* Added Rails framework freezing tasks: freeze_gems (freeze to current gems), freeze_edge (freeze to Rails SVN trunk), unfreeze_rails (float with newest gems on system)
|
||||
|
||||
* Added update_javascripts task which will fetch all the latest js files from your current rails install. Use after updating rails. [Tobias Luetke]
|
||||
|
||||
* Added cleaning of RAILS_ROOT to useless elements such as '../non-dot-dot/'. Provides cleaner backtraces and error messages. [Nicholas Seckar]
|
||||
|
|
31
railties/lib/tasks/framework.rake
Normal file
31
railties/lib/tasks/framework.rake
Normal file
|
@ -0,0 +1,31 @@
|
|||
desc "Lock this application to the current gems (by unpacking them into vendor/rails)"
|
||||
task :freeze_gems do
|
||||
rm_rf "vendor/rails"
|
||||
mkdir_p "vendor/rails"
|
||||
|
||||
for gem in %w( actionpack activerecord actionmailer activesupport actionwebservice )
|
||||
system "cd vendor/rails; gem unpack #{gem}; mv #{gem}* #{gem}"
|
||||
end
|
||||
|
||||
system "cd vendor/rails; gem unpack rails; mv rails* railties"
|
||||
end
|
||||
|
||||
desc "Lock this application to the Edge Rails (by exporting from Subversion)"
|
||||
task :freeze_edge do
|
||||
$stderr.close
|
||||
svn_available = `svn --version`.size > 0
|
||||
raise "Subversion is not installed" unless svn_available
|
||||
|
||||
rm_rf "vendor/rails"
|
||||
mkdir_p "vendor/rails"
|
||||
|
||||
for framework in %w( railties actionpack activerecord actionmailer activesupport actionwebservice )
|
||||
mkdir_p "vendor/rails/#{framework}"
|
||||
system "svn export http://dev.rubyonrails.org/svn/rails/trunk/#{framework}/lib vendor/rails/#{framework}/lib"
|
||||
end
|
||||
end
|
||||
|
||||
desc "Unlock this application from freeze of gems or edge and return to a fluid use of system gems"
|
||||
task :unfreeze_rails do
|
||||
rm_rf "vendor/rails"
|
||||
end
|
Loading…
Reference in a new issue