Skip to content
This repository
Browse code

Update rails:freeze:gems to work with RubyGems 0.9.5.

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8336 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
commit a456388ff92b74918d8b457faf1ede356cc76b2d 1 parent 37b874b
Jeremy Kemper jeremy authored

Showing 2 changed files with 18 additions and 7 deletions. Show diff stats Hide diff stats

  1. +5 0 railties/CHANGELOG
  2. +13 7 railties/lib/tasks/framework.rake
5 railties/CHANGELOG
... ... @@ -1,3 +1,8 @@
  1 +*SVN*
  2 +
  3 +* Update rails:freeze:gems to work with RubyGems 0.9.5. [Jeremy Kemper]
  4 +
  5 +
1 6 *2.0.1* (December 7th, 2007)
2 7
3 8 * Fixed Active Record bug
20 railties/lib/tasks/framework.rake
@@ -4,6 +4,7 @@ namespace :rails do
4 4 task :gems do
5 5 deps = %w(actionpack activerecord actionmailer activesupport activeresource)
6 6 require 'rubygems'
  7 + require 'rubygems/gem_runner'
7 8 Gem.manage_gems
8 9
9 10 rails = (version = ENV['VERSION']) ?
@@ -21,14 +22,19 @@ namespace :rails do
21 22 rm_rf "vendor/rails"
22 23 mkdir_p "vendor/rails"
23 24
24   - chdir("vendor/rails") do
25   - rails.dependencies.select { |g| deps.include? g.name }.each do |g|
26   - Gem::GemRunner.new.run(["unpack", "-v", "#{g.version_requirements}", "#{g.name}"])
27   - mv(Dir.glob("#{g.name}*").first, g.name)
28   - end
  25 + begin
  26 + chdir("vendor/rails") do
  27 + rails.dependencies.select { |g| deps.include? g.name }.each do |g|
  28 + Gem::GemRunner.new.run(["unpack", g.name, "--version", g.version_requirements.to_s])
  29 + mv(Dir.glob("#{g.name}*").first, g.name)
  30 + end
29 31
30   - Gem::GemRunner.new.run(["unpack", "-v", "=#{version}", "rails"])
31   - FileUtils.mv(Dir.glob("rails*").first, "railties")
  32 + Gem::GemRunner.new.run(["unpack", "rails", "--version", "=#{version}"])
  33 + FileUtils.mv(Dir.glob("rails*").first, "railties")
  34 + end
  35 + rescue Exception
  36 + rm_rf "vendor/rails"
  37 + raise
32 38 end
33 39 end
34 40

0 comments on commit a456388

Please sign in to comment.
Something went wrong with that request. Please try again.