Permalink
Browse files

Merge [8336] from trunk: update rails:freeze:gems to work with RubyGe…

…ms 0.9.5.

git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/1-2-stable@8337 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
jeremy committed Dec 9, 2007
1 parent 9c19009 commit 1878f6c87d0e9dba278f195f0164ec55e30f0d60
Showing with 19 additions and 7 deletions.
  1. +6 −0 railties/CHANGELOG
  2. +13 −7 railties/lib/tasks/framework.rake
View
@@ -1,9 +1,15 @@
+*SVN*
+
+* Update rails:freeze:gems to work with RubyGems 0.9.5. [Jeremy Kemper]
+
+
*1.2.6* (November 24th, 2007)
* Fix :cookie_only to correctly avoid session fixation attacks (CVE-2007-6077)
* Fix regression where the association would not construct new finder SQL on save causing bogus queries for "WHERE owner_id = NULL" even after owner was saved.
+
*1.2.5* (October 12th, 2007)
* Correct RAILS_GEM_VERSION regexp. Use =version gem requirement instead of ~>version so you don't get surprised by a beta gem in production. This change means upgrading to 1.2.5 will require a boot.rb upgrade. [Jeremy Kemper]
@@ -4,6 +4,7 @@ namespace :rails do
task :gems do
deps = %w(actionpack activerecord actionmailer activesupport actionwebservice)
require 'rubygems'
+ require 'rubygems/gem_runner'
Gem.manage_gems
rails = (version = ENV['VERSION']) ?
@@ -21,14 +22,19 @@ namespace :rails do
rm_rf "vendor/rails"
mkdir_p "vendor/rails"
- chdir("vendor/rails") do
- rails.dependencies.select { |g| deps.include? g.name }.each do |g|
- Gem::GemRunner.new.run(["unpack", "-v", "#{g.version_requirements}", "#{g.name}"])
- mv(Dir.glob("#{g.name}*").first, g.name)
- end
+ begin
+ chdir("vendor/rails") do
+ rails.dependencies.select { |g| deps.include? g.name }.each do |g|
+ Gem::GemRunner.new.run(["unpack", g.name, "--version", g.version_requirements.to_s])
+ mv(Dir.glob("#{g.name}*").first, g.name)
+ end
- Gem::GemRunner.new.run(["unpack", "-v", "=#{version}", "rails"])
- FileUtils.mv(Dir.glob("rails*").first, "railties")
+ Gem::GemRunner.new.run(["unpack", "rails", "--version", "=#{version}"])
+ FileUtils.mv(Dir.glob("rails*").first, "railties")
+ end
+ rescue Exception
+ rm_rf "vendor/rails"
+ raise
end
end

0 comments on commit 1878f6c

Please sign in to comment.