SVG-Edit -> 2.5final
Vendored Rack -> 1.2.1
This commit is contained in:
Jacques Distler 2010-06-17 19:27:39 -05:00
parent 6338a3bcb2
commit 0d8f680d4f
82 changed files with 138 additions and 70 deletions

View file

@ -20,7 +20,7 @@ module Rack
# Return the Rack release as a dotted string.
def self.release
"1.2"
"1.2.1"
end
autoload :Builder, "rack/builder"

View file

@ -20,7 +20,7 @@ module Rack
class FastCGI
def self.run(app, options={})
file = options[:File] and STDIN.reopen(UNIXServer.new(file))
port = options[:Port] and STDIN.reopen(TCPServer.new(port))
port = options[:Port] and STDIN.reopen(TCPServer.new(options[:Host], port))
FCGI.each { |request|
serve request, app
}

View file

@ -1,3 +1,5 @@
require 'thread'
module Rack
class Lock
FLAG = 'rack.multithread'.freeze

View file

@ -77,7 +77,8 @@ module Rack
@rewindable_io.set_encoding(Encoding::BINARY) if @rewindable_io.respond_to?(:set_encoding)
@rewindable_io.binmode
if filesystem_has_posix_semantics?
@rewindable_io.unlink
# Use ::File.unlink as 1.9.1 Tempfile has a bug where unlink closes the file!
::File.unlink @rewindable_io.path
raise 'Unlink failed. IO closed.' if @rewindable_io.closed?
@unlinked = true
end

View file

@ -69,7 +69,7 @@ module Rack
end
opts.on_tail("--version", "Show version") do
puts "Rack #{Rack.version}"
puts "Rack #{Rack.version} (Release: #{Rack.release})"
exit
end
end
@ -144,7 +144,7 @@ module Rack
def default_options
{
:environment => "development",
:environment => ENV['RACK_ENV'] || "development",
:pid => nil,
:Port => 9292,
:Host => "0.0.0.0",

View file

@ -135,7 +135,7 @@ module Rack
"'" => "'",
'"' => """,
}
ESCAPE_HTML_PATTERN = Regexp.union(ESCAPE_HTML.keys)
ESCAPE_HTML_PATTERN = Regexp.union(*ESCAPE_HTML.keys)
# Escape ampersands, brackets and quotes to their HTML/XML entities.
def escape_html(string)