Rails 2.1 RC1
Updated Instiki to Rails 2.1 RC1 (aka 2.0.991).
This commit is contained in:
parent
14afed5893
commit
5292899c9a
971 changed files with 46318 additions and 17450 deletions
48
vendor/rails/railties/lib/tasks/framework.rake
vendored
48
vendor/rails/railties/lib/tasks/framework.rake
vendored
|
@ -38,37 +38,33 @@ namespace :rails do
|
|||
end
|
||||
end
|
||||
|
||||
desc "Lock to latest Edge Rails or a specific revision with REVISION=X (ex: REVISION=4021) or a tag with TAG=Y (ex: TAG=rel_1-1-0)"
|
||||
desc 'Lock to latest Edge Rails, for a specific release use RELEASE=1.2.0'
|
||||
task :edge do
|
||||
$verbose = false
|
||||
`svn --version` rescue nil
|
||||
unless !$?.nil? && $?.success?
|
||||
$stderr.puts "ERROR: Must have subversion (svn) available in the PATH to lock this application to Edge Rails"
|
||||
exit 1
|
||||
end
|
||||
|
||||
rm_rf "vendor/rails"
|
||||
mkdir_p "vendor/rails"
|
||||
|
||||
svn_root = "http://dev.rubyonrails.org/svn/rails/"
|
||||
require 'open-uri'
|
||||
version = ENV["RELEASE"] || "edge"
|
||||
target = "rails_#{version}.zip"
|
||||
url = "http://dev.rubyonrails.org/archives/#{target}"
|
||||
|
||||
if ENV['TAG']
|
||||
rails_svn = "#{svn_root}/tags/#{ENV['TAG']}"
|
||||
touch "vendor/rails/TAG_#{ENV['TAG']}"
|
||||
else
|
||||
rails_svn = "#{svn_root}/trunk"
|
||||
|
||||
if ENV['REVISION'].nil?
|
||||
ENV['REVISION'] = /^r(\d+)/.match(%x{svn -qr HEAD log #{svn_root}})[1]
|
||||
puts "REVISION not set. Using HEAD, which is revision #{ENV['REVISION']}."
|
||||
chdir 'vendor' do
|
||||
puts "Downloading Rails from #{url}"
|
||||
File.open('rails.zip', 'wb') do |dst|
|
||||
open url do |src|
|
||||
while chunk = src.read(4096)
|
||||
dst << chunk
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
touch "vendor/rails/REVISION_#{ENV['REVISION']}"
|
||||
puts 'Unpacking Rails'
|
||||
rm_rf 'rails'
|
||||
`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
|
||||
|
||||
for framework in %w(railties actionpack activerecord actionmailer activesupport activeresource)
|
||||
system "svn export #{rails_svn}/#{framework} vendor/rails/#{framework}" + (ENV['REVISION'] ? " -r #{ENV['REVISION']}" : "")
|
||||
end
|
||||
puts 'Updating current scripts, javascripts, and configuration settings'
|
||||
Rake::Task['rails:update'].invoke
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -105,7 +101,7 @@ namespace :rails do
|
|||
require 'railties_path'
|
||||
project_dir = RAILS_ROOT + '/public/javascripts/'
|
||||
scripts = Dir[RAILTIES_PATH + '/html/javascripts/*.js']
|
||||
scripts.reject!{|s| File.basename(s) == 'application.js'} if File.exists?(project_dir + 'application.js')
|
||||
scripts.reject!{|s| File.basename(s) == 'application.js'} if File.exist?(project_dir + 'application.js')
|
||||
FileUtils.cp(scripts, project_dir)
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue