diff options
author | Michael Koziarski <michael@koziarski.com> | 2008-04-12 12:40:51 +1200 |
---|---|---|
committer | Michael Koziarski <michael@koziarski.com> | 2008-04-12 12:40:51 +1200 |
commit | 60be4b09f51d2560802ebd744893bb6f737ef57c (patch) | |
tree | 391bca0d96a5fb4071467350fd7fdac4e3cfd6f4 /railties/lib | |
parent | 063c393bf0a2eb762770c97f925b7c2867361ad4 (diff) | |
parent | 35904e207940386192cade3d0d871fae10da0510 (diff) | |
download | rails-60be4b09f51d2560802ebd744893bb6f737ef57c.tar.gz rails-60be4b09f51d2560802ebd744893bb6f737ef57c.tar.bz2 rails-60be4b09f51d2560802ebd744893bb6f737ef57c.zip |
Merge branch 'master' into custom_paths_for_resource_names
Diffstat (limited to 'railties/lib')
-rw-r--r-- | railties/lib/tasks/framework.rake | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/railties/lib/tasks/framework.rake b/railties/lib/tasks/framework.rake index 7955ded898..71aea09867 100644 --- a/railties/lib/tasks/framework.rake +++ b/railties/lib/tasks/framework.rake @@ -38,14 +38,17 @@ namespace :rails do end end - desc 'Lock to latest Edge Rails' + desc 'Lock to latest Edge Rails, for a specific release use RELEASE=1.2.0' task :edge do require 'open-uri' + version = ENV["RELEASE"] || "edge" + target = "rails_#{version}.zip" + url = "http://dev.rubyonrails.org/archives/#{target}" chdir 'vendor' do - puts 'Downloading Rails' - File.open('rails_edge.zip', 'wb') do |dst| - open 'http://dev.rubyonrails.org/archives/rails_edge.zip' do |src| + puts "Downloading Rails from #{url}" + File.open('rails.zip', 'wb') do |dst| + open url do |src| while chunk = src.read(4096) dst << chunk end @@ -54,8 +57,8 @@ namespace :rails do puts 'Unpacking Rails' rm_rf 'rails' - `unzip rails_edge.zip` - %w(rails_edge.zip rails/Rakefile rails/cleanlogs.sh rails/pushgems.rb rails/release.rb).each do |goner| + `unzip rails.zip` + %w(rails.zip rails/Rakefile rails/cleanlogs.sh rails/pushgems.rb rails/release.rb).each do |goner| rm_f goner end end |