Updates
SVG-Edit -> 2.5final Vendored Rack -> 1.2.1
This commit is contained in:
parent
6338a3bcb2
commit
0d8f680d4f
82 changed files with 138 additions and 70 deletions
5
vendor/plugins/rack/README
vendored
5
vendor/plugins/rack/README
vendored
|
@ -308,6 +308,11 @@ run on port 11211) and memcache-client installed.
|
|||
* Various multipart fixes
|
||||
* Switch test suite to bacon
|
||||
|
||||
* June 15th, 2010: Eleventh public release 1.2.1.
|
||||
* Make CGI handler rewindable
|
||||
* Rename spec/ to test/ to not conflict with SPEC on lesser
|
||||
operating systems
|
||||
|
||||
== Contact
|
||||
|
||||
Please post bugs, suggestions and patches to
|
||||
|
|
11
vendor/plugins/rack/Rakefile
vendored
11
vendor/plugins/rack/Rakefile
vendored
|
@ -25,14 +25,13 @@ task :officialrelease_really => ["SPEC", :dist, :gem] do
|
|||
end
|
||||
|
||||
def release
|
||||
require File.dirname(__FILE__) + "/lib/rack"
|
||||
"rack-#{Rack.release}.0"
|
||||
"rack-#{File.read("rack.gemspec")[/s.version *= *"(.*?)"/, 1]}"
|
||||
end
|
||||
|
||||
desc "Make binaries executable"
|
||||
task :chmod do
|
||||
Dir["bin/*"].each { |binary| File.chmod(0775, binary) }
|
||||
Dir["spec/cgi/spec*"].each { |binary| File.chmod(0775, binary) }
|
||||
Dir["test/cgi/test*"].each { |binary| File.chmod(0775, binary) }
|
||||
end
|
||||
|
||||
desc "Generate a ChangeLog"
|
||||
|
@ -69,16 +68,16 @@ desc "Run all the fast tests"
|
|||
task :test do
|
||||
opts = ENV['TEST'] || '-a'
|
||||
specopts = ENV['TESTOPTS'] ||
|
||||
"-q -t '^(?!Rack::Handler|Rack::Adapter|Rack::Session::Memcache|rackup)'"
|
||||
"-q -t '^(?!Rack::Adapter|Rack::Session::Memcache|rackup)'"
|
||||
|
||||
sh "bacon -I./lib:./spec -w #{opts} #{specopts}"
|
||||
sh "bacon -I./lib:./test -w #{opts} #{specopts}"
|
||||
end
|
||||
|
||||
desc "Run all the tests"
|
||||
task :fulltest => [:chmod] do
|
||||
opts = ENV['TEST'] || '-a'
|
||||
specopts = ENV['TESTOPTS'] || '-q'
|
||||
sh "bacon -I./lib:./spec -w #{opts} #{specopts}"
|
||||
sh "bacon -I./lib:./test -w #{opts} #{specopts}"
|
||||
end
|
||||
|
||||
task :gem => ["SPEC"] do
|
||||
|
|
2
vendor/plugins/rack/lib/rack.rb
vendored
2
vendor/plugins/rack/lib/rack.rb
vendored
|
@ -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"
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
2
vendor/plugins/rack/lib/rack/lock.rb
vendored
2
vendor/plugins/rack/lib/rack/lock.rb
vendored
|
@ -1,3 +1,5 @@
|
|||
require 'thread'
|
||||
|
||||
module Rack
|
||||
class Lock
|
||||
FLAG = 'rack.multithread'.freeze
|
||||
|
|
|
@ -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
|
||||
|
|
4
vendor/plugins/rack/lib/rack/server.rb
vendored
4
vendor/plugins/rack/lib/rack/server.rb
vendored
|
@ -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",
|
||||
|
|
2
vendor/plugins/rack/lib/rack/utils.rb
vendored
2
vendor/plugins/rack/lib/rack/utils.rb
vendored
|
@ -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)
|
||||
|
|
6
vendor/plugins/rack/rack.gemspec
vendored
6
vendor/plugins/rack/rack.gemspec
vendored
|
@ -1,6 +1,6 @@
|
|||
Gem::Specification.new do |s|
|
||||
s.name = "rack"
|
||||
s.version = "1.2.0"
|
||||
s.version = "1.2.1"
|
||||
s.platform = Gem::Platform::RUBY
|
||||
s.summary = "a modular Ruby webserver interface"
|
||||
|
||||
|
@ -14,14 +14,14 @@ middleware) into a single method call.
|
|||
Also see http://rack.rubyforge.org.
|
||||
EOF
|
||||
|
||||
s.files = Dir['{bin/*,contrib/*,example/*,lib/**/*,spec/**/*}'] +
|
||||
s.files = Dir['{bin/*,contrib/*,example/*,lib/**/*,test/**/*}'] +
|
||||
%w(COPYING KNOWN-ISSUES rack.gemspec README SPEC)
|
||||
s.bindir = 'bin'
|
||||
s.executables << 'rackup'
|
||||
s.require_path = 'lib'
|
||||
s.has_rdoc = true
|
||||
s.extra_rdoc_files = ['README', 'SPEC', 'KNOWN-ISSUES']
|
||||
s.test_files = Dir['spec/spec_*.rb']
|
||||
s.test_files = Dir['test/spec_*.rb']
|
||||
|
||||
s.author = 'Christian Neukirchen'
|
||||
s.email = 'chneukirchen@gmail.com'
|
||||
|
|
|
@ -17,7 +17,7 @@ fastcgi.server = (
|
|||
"test.ru" => ("localhost" =>
|
||||
("min-procs" => 1,
|
||||
"socket" => "/tmp/rack-test-ru-fcgi",
|
||||
"bin-path" => "test.ru")),
|
||||
"bin-path" => CWD + "/rackup_stub.rb test.ru")),
|
||||
"sample_rackup.ru" => ("localhost" =>
|
||||
("min-procs" => 1,
|
||||
"socket" => "/tmp/rack-test-rackup-fcgi",
|
|
@ -1,3 +1,4 @@
|
|||
begin
|
||||
require File.expand_path('../testrequest', __FILE__)
|
||||
require 'rack/handler/cgi'
|
||||
|
||||
|
@ -7,6 +8,10 @@ describe Rack::Handler::CGI do
|
|||
@host = '0.0.0.0'
|
||||
@port = 9203
|
||||
|
||||
if `which lighttpd` && !$?.success?
|
||||
raise "lighttpd not found"
|
||||
end
|
||||
|
||||
# Keep this first.
|
||||
$pid = fork {
|
||||
ENV['RACK_ENV'] = 'deployment'
|
||||
|
@ -89,3 +94,7 @@ describe Rack::Handler::CGI do
|
|||
Process.wait($pid).should == $pid
|
||||
end
|
||||
end
|
||||
|
||||
rescue RuntimeError
|
||||
$stderr.puts "Skipping Rack::Session::FastCGI tests (lighttpd is required). Install lighttpd and try again."
|
||||
end
|
|
@ -1,3 +1,4 @@
|
|||
begin
|
||||
require File.expand_path('../testrequest', __FILE__)
|
||||
require 'rack/handler/fastcgi'
|
||||
|
||||
|
@ -7,6 +8,10 @@ describe Rack::Handler::FastCGI do
|
|||
@host = '0.0.0.0'
|
||||
@port = 9203
|
||||
|
||||
if `which lighttpd` && !$?.success?
|
||||
raise "lighttpd not found"
|
||||
end
|
||||
|
||||
# Keep this first.
|
||||
$pid = fork {
|
||||
ENV['RACK_ENV'] = 'deployment'
|
||||
|
@ -94,3 +99,9 @@ describe Rack::Handler::FastCGI do
|
|||
Process.wait($pid).should.equal $pid
|
||||
end
|
||||
end
|
||||
|
||||
rescue RuntimeError
|
||||
$stderr.puts "Skipping Rack::Session::FastCGI tests (lighttpd is required). Install lighttpd and try again."
|
||||
rescue LoadError
|
||||
$stderr.puts "Skipping Rack::Handler::FastCGI tests (FCGI is required). `gem install fcgi` and try again."
|
||||
end
|
|
@ -6,9 +6,17 @@ class RockLobster; end
|
|||
describe Rack::Handler do
|
||||
it "has registered default handlers" do
|
||||
Rack::Handler.get('cgi').should.equal Rack::Handler::CGI
|
||||
Rack::Handler.get('fastcgi').should.equal Rack::Handler::FastCGI
|
||||
Rack::Handler.get('mongrel').should.equal Rack::Handler::Mongrel
|
||||
Rack::Handler.get('webrick').should.equal Rack::Handler::WEBrick
|
||||
|
||||
begin
|
||||
Rack::Handler.get('fastcgi').should.equal Rack::Handler::FastCGI
|
||||
rescue LoadError
|
||||
end
|
||||
|
||||
begin
|
||||
Rack::Handler.get('mongrel').should.equal Rack::Handler::Mongrel
|
||||
rescue LoadError
|
||||
end
|
||||
end
|
||||
|
||||
should "raise NameError if handler doesn't exist" do
|
|
@ -177,7 +177,6 @@ describe Rack::Handler::Mongrel do
|
|||
@acc.raise Mongrel::StopServer
|
||||
end
|
||||
|
||||
rescue LoadError => ex
|
||||
warn ex
|
||||
rescue LoadError
|
||||
warn "Skipping Rack::Handler::Mongrel tests (Mongrel is required). `gem install mongrel` and try again."
|
||||
end
|
|
@ -24,6 +24,9 @@ begin
|
|||
incrementor.call(env)
|
||||
end
|
||||
|
||||
# test memcache connection
|
||||
Rack::Session::Memcache.new(incrementor)
|
||||
|
||||
it "faults on no connection" do
|
||||
if RUBY_VERSION < "1.9"
|
||||
lambda{
|
Loading…
Add table
Add a link
Reference in a new issue