Upgrade to Rails 2.0.2

Upgraded to Rails 2.0.2, except that we maintain

   vendor/rails/actionpack/lib/action_controller/routing.rb

from Rail 1.2.6 (at least for now), so that Routes don't change. We still
get to enjoy Rails's many new features.

Also fixed a bug in Chunk-handling: disable WikiWord processing in tags (for real this time).
This commit is contained in:
Jacques Distler 2007-12-21 01:48:59 -06:00
parent 0f6889e09f
commit 6873fc8026
1083 changed files with 52810 additions and 41058 deletions

View file

@ -91,7 +91,7 @@ class RailsEnvironment
unless plugin.nil?
plugin.install
else
puts "plugin not found: #{name_uri_or_plugin}"
puts "Plugin not found: #{name_uri_or_plugin}"
end
end
@ -214,12 +214,12 @@ class Plugin
def run_install_hook
install_hook_file = "#{rails_env.root}/vendor/plugins/#{name}/install.rb"
load install_hook_file if File.exists? install_hook_file
load install_hook_file if File.exist? install_hook_file
end
def run_uninstall_hook
uninstall_hook_file = "#{rails_env.root}/vendor/plugins/#{name}/uninstall.rb"
load uninstall_hook_file if File.exists? uninstall_hook_file
load uninstall_hook_file if File.exist? uninstall_hook_file
end
def install_using_export(options = {})
@ -239,10 +239,10 @@ class Plugin
def install_using_http(options = {})
root = rails_env.root
mkdir_p "#{root}/vendor/plugins"
Dir.chdir "#{root}/vendor/plugins" do
mkdir_p "#{root}/vendor/plugins/#{@name}"
Dir.chdir "#{root}/vendor/plugins/#{@name}" do
puts "fetching from '#{uri}'" if $verbose
fetcher = RecursiveHTTPFetcher.new(uri)
fetcher = RecursiveHTTPFetcher.new(uri, -1)
fetcher.quiet = true if options[:quiet]
fetcher.fetch
end
@ -515,7 +515,7 @@ module Commands
o.on( "--local",
"List locally installed plugins.") {|@local| @remote = false}
o.on( "--remote",
"List remotely availabled plugins. This is the default behavior",
"List remotely available plugins. This is the default behavior",
"unless --local is provided.") {|@remote|}
end
end
@ -765,8 +765,9 @@ module Commands
args.each do |name|
::Plugin.find(name).install(install_method, @options)
end
rescue
rescue StandardError => e
puts "Plugin not found: #{args.inspect}"
puts e.inspect if $verbose
exit 1
end
end
@ -853,7 +854,8 @@ end
class RecursiveHTTPFetcher
attr_accessor :quiet
def initialize(urls_to_fetch, cwd = ".")
def initialize(urls_to_fetch, level = 1, cwd = ".")
@level = level
@cwd = cwd
@urls_to_fetch = urls_to_fetch.to_a
@quiet = false
@ -884,7 +886,8 @@ class RecursiveHTTPFetcher
links = []
contents.scan(/href\s*=\s*\"*[^\">]*/i) do |link|
link = link.sub(/href="/i, "")
next if link =~ /^http/i || link =~ /^\./
next if link =~ /svnindex.xsl$/
next if link =~ /^(\w*:|)\/\// || link =~ /^\./
links << File.join(base_url, link)
end
links
@ -906,12 +909,14 @@ class RecursiveHTTPFetcher
end
def fetch_dir(url)
push_d(File.basename(url))
@level += 1
push_d(File.basename(url)) if @level > 0
open(url) do |stream|
contents = stream.read
fetch(links(url, contents))
end
pop_d
pop_d if @level > 0
@level -= 1
end
end