diff options
author | Nicholas Seckar <nseckar@gmail.com> | 2005-11-28 00:53:38 +0000 |
---|---|---|
committer | Nicholas Seckar <nseckar@gmail.com> | 2005-11-28 00:53:38 +0000 |
commit | ca7341d2a5375218a480ca4add04991c87dc7c75 (patch) | |
tree | 029ea8a19a0f37267ffbfdc3821ea267280654cc /railties/lib | |
parent | e7219e9e2a17fad73a2eaca0ffc7f118894934d8 (diff) | |
download | rails-ca7341d2a5375218a480ca4add04991c87dc7c75.tar.gz rails-ca7341d2a5375218a480ca4add04991c87dc7c75.tar.bz2 rails-ca7341d2a5375218a480ca4add04991c87dc7c75.zip |
Fix freeze_gems so that the latest rails version is dumped by default
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3191 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'railties/lib')
-rw-r--r-- | railties/lib/tasks/framework.rake | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/railties/lib/tasks/framework.rake b/railties/lib/tasks/framework.rake index 37452a37b1..59f8f51381 100644 --- a/railties/lib/tasks/framework.rake +++ b/railties/lib/tasks/framework.rake @@ -8,6 +8,7 @@ task :freeze_gems do else Gem.cache.search('rails').sort_by { |g| g.version }.last end + version ||= rails.version unless rails puts "No rails gem #{version} is installed. Do 'gem list rails' to see what you have available." @@ -21,8 +22,8 @@ task :freeze_gems do 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}" end - system "cd vendor/rails; gem unpack -v '= #{version}' rails" - + system "cd vendor/rails; gem unpack -v '=#{version}' rails" + FileUtils.mv(Dir.glob("vendor/rails/rails*").first, "vendor/rails/railties") end |