diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2005-10-15 15:00:15 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2005-10-15 15:00:15 +0000 |
commit | 8cfcc04d08860dcff16a97901acc1538e4cf6e20 (patch) | |
tree | 2ddc26d35e8cf612112f47437134b5c745b7f461 /railties/lib | |
parent | 48fd667bda20b899c8c2f0c68a403476f083effc (diff) | |
download | rails-8cfcc04d08860dcff16a97901acc1538e4cf6e20.tar.gz rails-8cfcc04d08860dcff16a97901acc1538e4cf6e20.tar.bz2 rails-8cfcc04d08860dcff16a97901acc1538e4cf6e20.zip |
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
Diffstat (limited to 'railties/lib')
-rw-r--r-- | railties/lib/tasks/framework.rake | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/railties/lib/tasks/framework.rake b/railties/lib/tasks/framework.rake new file mode 100644 index 0000000000..fe2a8c09b8 --- /dev/null +++ b/railties/lib/tasks/framework.rake @@ -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
\ No newline at end of file |