diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2006-03-19 01:34:14 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2006-03-19 01:34:14 +0000 |
commit | 8463cd646ec5b8f439577a7c2ca225179709b5ed (patch) | |
tree | 8508927c7e456126fb83f4254038b06b13ce3bde /railties | |
parent | eb1ae042bd1b32841249fcc9c240c2e2a4161c6f (diff) | |
download | rails-8463cd646ec5b8f439577a7c2ca225179709b5ed.tar.gz rails-8463cd646ec5b8f439577a7c2ca225179709b5ed.tar.bz2 rails-8463cd646ec5b8f439577a7c2ca225179709b5ed.zip |
Fixed rails:freeze:gems for Windows (closes #3274) [paul@paulbutcher.com]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3963 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'railties')
-rw-r--r-- | railties/CHANGELOG | 2 | ||||
-rw-r--r-- | railties/lib/tasks/framework.rake | 23 |
2 files changed, 15 insertions, 10 deletions
diff --git a/railties/CHANGELOG b/railties/CHANGELOG index 355ed3167b..77f345413a 100644 --- a/railties/CHANGELOG +++ b/railties/CHANGELOG @@ -1,5 +1,7 @@ *SVN* +* Fixed rails:freeze:gems for Windows #3274 [paul@paulbutcher.com] + * Added 'port open?' check to the spawner when running in repeat mode so we don't needlessly boot the dispatcher if the port is already in use anyway #4089 [guy.naor@famundo.com] * Add verification to generated scaffolds, don't allow get for unsafe actions [Michael Koziarski] diff --git a/railties/lib/tasks/framework.rake b/railties/lib/tasks/framework.rake index 4ac7f7ebe0..ac612b8fb5 100644 --- a/railties/lib/tasks/framework.rake +++ b/railties/lib/tasks/framework.rake @@ -4,12 +4,12 @@ namespace :rails do task :gems do deps = %w(actionpack activerecord actionmailer activesupport actionwebservice) require 'rubygems' + Gem.manage_gems + + rails = version = ENV['VERSION'] ? + Gem.cache.search('rails', "= #{version}").first : + Gem.cache.search('rails').sort_by { |g| g.version }.last - rails = if version = ENV['VERSION'] - Gem.cache.search('rails', "= #{version}").first - else - Gem.cache.search('rails').sort_by { |g| g.version }.last - end version ||= rails.version unless rails @@ -21,12 +21,15 @@ namespace :rails do rm_rf "vendor/rails" mkdir_p "vendor/rails" - rails.dependencies.select { |g| deps.include? g.name }.each do |g| - system "cd vendor/rails; gem unpack -v '#{g.version_requirements}' #{g.name}; mv #{g.name}* #{g.name}" + 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 + + Gem::GemRunner.new.run(["unpack", "-v", "=#{version}", "rails"]) + FileUtils.mv(Dir.glob("rails*").first, "railties") end - system "cd vendor/rails; gem unpack -v '=#{version}' rails" - - FileUtils.mv(Dir.glob("vendor/rails/rails*").first, "vendor/rails/railties") end desc "Lock this application to latest Edge Rails. Lock a specific revision with REVISION=X" |