1
0
Fork 0
mirror of https://github.com/puma/puma.git synced 2022-11-09 13:48:40 -05:00

removed fastthread dependency and fixed some ruby1.9 syntax issues

This commit is contained in:
Matt Aimonetti 2009-03-27 02:37:55 -07:00
parent 0485c6f298
commit 55ab3440c4
2 changed files with 16 additions and 16 deletions

View file

@ -36,14 +36,14 @@ e = Echoe.new("mongrel") do |p|
when /mswin/ when /mswin/
self.files += ['lib/http11.so'] self.files += ['lib/http11.so']
self.platform = Gem::Platform::CURRENT self.platform = Gem::Platform::CURRENT
add_dependency('cgi_multipart_eof_fix', '>= 2.4') # add_dependency('cgi_multipart_eof_fix', '>= 2.4')
when /java/ when /java/
self.files += ['lib/http11.jar'] self.files += ['lib/http11.jar']
self.platform = 'jruby' # XXX Is this right? self.platform = 'jruby' # XXX Is this right?
else else
add_dependency('daemons', '>= 1.0.3') add_dependency('daemons', '>= 1.0.3')
add_dependency('fastthread', '>= 1.0.1') # add_dependency('fastthread', '>= 1.0.1')
add_dependency('cgi_multipart_eof_fix', '>= 2.4') # add_dependency('cgi_multipart_eof_fix', '>= 2.4')
end end
end end
@ -134,8 +134,8 @@ end
desc "Package Mongrel and all subprojects" desc "Package Mongrel and all subprojects"
task :package_all => [:package] do task :package_all => [:package] do
sub_project("gem_plugin", :package) sub_project("gem_plugin", :package)
sub_project("cgi_multipart_eof_fix", :package) # sub_project("cgi_multipart_eof_fix", :package)
sub_project("fastthread", :package) # sub_project("fastthread", :package)
sub_project("mongrel_status", :package) sub_project("mongrel_status", :package)
sub_project("mongrel_upload_progress", :package) sub_project("mongrel_upload_progress", :package)
sub_project("mongrel_console", :package) sub_project("mongrel_console", :package)
@ -152,8 +152,8 @@ end
task :install_requirements do task :install_requirements do
# These run before Mongrel is installed # These run before Mongrel is installed
sub_project("gem_plugin", :install) sub_project("gem_plugin", :install)
sub_project("cgi_multipart_eof_fix", :install) # sub_project("cgi_multipart_eof_fix", :install)
sub_project("fastthread", :install) # sub_project("fastthread", :install)
end end
desc "for Mongrel and all subprojects" desc "for Mongrel and all subprojects"
@ -170,11 +170,11 @@ end
desc "for Mongrel and all its subprojects" desc "for Mongrel and all its subprojects"
task :uninstall => [:clean] do task :uninstall => [:clean] do
sub_project("mongrel_status", :uninstall) sub_project("mongrel_status", :uninstall)
sub_project("cgi_multipart_eof_fix", :uninstall) # sub_project("cgi_multipart_eof_fix", :uninstall)
sub_project("mongrel_upload_progress", :uninstall) sub_project("mongrel_upload_progress", :uninstall)
sub_project("mongrel_console", :uninstall) sub_project("mongrel_console", :uninstall)
sub_project("gem_plugin", :uninstall) sub_project("gem_plugin", :uninstall)
sub_project("fastthread", :uninstall) # sub_project("fastthread", :uninstall)
# sub_project("mongrel_experimental", :uninstall) # sub_project("mongrel_experimental", :uninstall)
sub_project("mongrel_service", :uninstall) if RUBY_PLATFORM =~ /mswin/ sub_project("mongrel_service", :uninstall) if RUBY_PLATFORM =~ /mswin/
end end
@ -182,8 +182,8 @@ end
desc "for Mongrel and all its subprojects" desc "for Mongrel and all its subprojects"
task :clean do task :clean do
sub_project("gem_plugin", :clean) sub_project("gem_plugin", :clean)
sub_project("cgi_multipart_eof_fix", :clean) # sub_project("cgi_multipart_eof_fix", :clean)
sub_project("fastthread", :clean) # sub_project("fastthread", :clean)
sub_project("mongrel_status", :clean) sub_project("mongrel_status", :clean)
sub_project("mongrel_upload_progress", :clean) sub_project("mongrel_upload_progress", :clean)
sub_project("mongrel_console", :clean) sub_project("mongrel_console", :clean)

View file

@ -205,11 +205,11 @@ module Mongrel
# test to see if this is a conditional request, and test if # test to see if this is a conditional request, and test if
# the response would be identical to the last response # the response would be identical to the last response
same_response = case same_response = case
when modified_since && !last_response_time = Time.httpdate(modified_since) rescue nil : false when modified_since && !last_response_time = Time.httpdate(modified_since) rescue nil then false
when modified_since && last_response_time > Time.now : false when modified_since && last_response_time > Time.now then false
when modified_since && mtime > last_response_time : false when modified_since && mtime > last_response_time then false
when none_match && none_match == '*' : false when none_match && none_match == '*' then false
when none_match && !none_match.strip.split(/\s*,\s*/).include?(etag) : false when none_match && !none_match.strip.split(/\s*,\s*/).include?(etag) then false
else modified_since || none_match # validation successful if we get this far and at least one of the header exists else modified_since || none_match # validation successful if we get this far and at least one of the header exists
end end