Permalink
Browse files

tag 1.1

git-svn-id: svn://rubyforge.org/var/svn/mongrel/tags/rel_1-1-0@867 19e92222-5c0b-0410-8929-a290d50e31e9
  • Loading branch information...
evanweaver
evanweaver committed Nov 1, 2007
2 parents a39dea4 + 9faeddb commit 69370dc0501cccd972145a36b0e0aabfb831be7d
View
@@ -1,5 +1,7 @@
-v1.1.0. Pure Ruby URIClassifier. More modular architecture. JRuby support. Move C URIClassifier into mongrel_experimental project.
+v1.1. Pure Ruby URIClassifier. More modular architecture. JRuby support. Move C URIClassifier into mongrel_experimental project.
+
+v1.0.4. Backport fixes for versioning inconsistency, mongrel_rails bug, and DirHandler bug.
v1.0.3. Fix user-switching bug; make people upgrade to the latest from the RC.
View
@@ -46,9 +46,9 @@ lib/mongrel.rb
LICENSE
Manifest
mongrel-public_cert.pem
+mongrel.gemspec
README
setup.rb
-test/jruby_socket.rb
test/mime.yaml
test/mongrel.conf
test/test_cgi_wrapper.rb
View
@@ -1,28 +1,28 @@
require 'rubygems'
-gem 'echoe', '>=2.6.4'
+gem 'echoe', '>=2.7'
require 'echoe'
e = Echoe.new("mongrel") do |p|
p.summary = "A small fast HTTP library and server that runs Rails, Camping, Nitro and Iowa apps."
p.author ="Zed A. Shaw"
- p.clean_pattern = ['ext/http11/*.{bundle,so,o,obj,pdb,lib,def,exp}', 'ext/http11/Makefile', 'pkg', 'lib/*.bundle', '*.gem', 'site/output', '.config', 'lib/http11.jar', 'ext/http11_java/classes', 'coverage']
- p.rdoc_pattern = ['README', 'LICENSE', 'COPYING', 'lib/**/*.rb', 'doc/**/*.rdoc']
+ p.clean_pattern = ['ext/http11/*.{bundle,so,o,obj,pdb,lib,def,exp}', 'lib/*.{bundle,so,o,obj,pdb,lib,def,exp}', 'ext/http11/Makefile', 'pkg', 'lib/*.bundle', '*.gem', 'site/output', '.config', 'lib/http11.jar', 'ext/http11_java/classes', 'coverage']
+ p.rdoc_pattern = ['README', 'LICENSE', 'CHANGELOG', 'COPYING', 'lib/**/*.rb', 'doc/**/*.rdoc']
p.ignore_pattern = /^(pkg|site|projects|doc|log)|CVS|\.log/
p.ruby_version = '>= 1.8.4'
p.dependencies = ['gem_plugin >=0.2.3', 'cgi_multipart_eof_fix >=2.4']
p.need_tar_gz = false
p.need_tgz = true
- case RUBY_PLATFORM
- when /mswin/
- p.certificate_chain = ['~/gem_certificates/mongrel-public_cert.pem',
- '~/gem_certificates/luislavena-mongrel-public_cert.pem']
- else
+# case RUBY_PLATFORM
+# when /mswin/
+# p.certificate_chain = ['~/gem_certificates/mongrel-public_cert.pem',
+# '~/gem_certificates/luislavena-mongrel-public_cert.pem']
+# else
p.certificate_chain = ['~/p/configuration/gem_certificates/mongrel/mongrel-public_cert.pem',
'~/p/configuration/gem_certificates/evan_weaver-mongrel-public_cert.pem']
- end
+# end
p.eval = proc do
case RUBY_PLATFORM
@@ -72,7 +72,7 @@ end
#### XXX Hack around RubyGems and Echoe for pre-compiled extensions.
def move_extensions
- Dir["ext/**/*.#{Config::CONFIG['DLEXT']}"].each { |file| cp file, "lib/" }
+ Dir["ext/**/*.#{Config::CONFIG['DLEXT']}"].each { |file| mv file, "lib/" }
end
def java_classpath_arg
@@ -118,7 +118,9 @@ end
def sub_project(project, *targets)
targets.each do |target|
Dir.chdir "projects/#{project}" do
- sh %{rake --trace #{target.to_s} }
+ unless RUBY_PLATFORM =~ /mswin/
+ sh %{rake --trace #{target.to_s} }
+ end
end
end
end
@@ -132,6 +134,7 @@ task :package_all => [:package] do
sub_project("mongrel_upload_progress", :package)
sub_project("mongrel_console", :package)
sub_project("mongrel_cluster", :package)
+ sub_project("mongrel_experimental", :package)
sub_project("mongrel_service", :package) if RUBY_PLATFORM =~ /mswin/
sh("rake java package") unless RUBY_PLATFORM =~ /java/
# sh("rake mswin package") unless RUBY_PLATFORM =~ /mswin/
@@ -151,6 +154,7 @@ task :install => [:install_requirements] do
sub_project("mongrel_upload_progress", :install)
sub_project("mongrel_console", :install)
sub_project("mongrel_cluster", :install)
+ sub_project("mongrel_experimental", :install)
sub_project("mongrel_service", :install) if RUBY_PLATFORM =~ /mswin/
end
@@ -162,6 +166,7 @@ task :uninstall => [:clean] do
sub_project("mongrel_console", :uninstall)
sub_project("gem_plugin", :uninstall)
sub_project("fastthread", :uninstall)
+ sub_project("mongrel_experimental", :uninstall)
sub_project("mongrel_service", :uninstall) if RUBY_PLATFORM =~ /mswin/
end
@@ -174,6 +179,7 @@ task :clean do
sub_project("mongrel_upload_progress", :clean)
sub_project("mongrel_console", :clean)
sub_project("mongrel_cluster", :clean)
+ sub_project("mongrel_experimental", :clean)
sub_project("mongrel_service", :clean) if RUBY_PLATFORM =~ /mswin/
end
@@ -192,8 +198,8 @@ namespace :site do
FileList["**/*.tgz"].each {|tgz| mv tgz, "pkg/tars" }
# XXX Hack, because only Luis can package for Win32 right now
- # sh "cp ~/Downloads/mongrel-#{e.version}-mswin32.gem pkg/gems/"
- # sh "cp ~/Downloads/mongrel_service-0.3.3-mswin32.gem pkg/gems/"
+ sh "cp ~/Downloads/mongrel-#{e.version}-mswin32.gem pkg/gems/"
+ sh "cp ~/Downloads/mongrel_service-0.3.3-mswin32.gem pkg/gems/"
sh "rm -rf pkg/mongrel*"
sh "gem generate_index -d pkg"
sh "scp -r CHANGELOG pkg/* rubyforge.org:/var/www/gforge-projects/mongrel/releases/"
View
2 TODO
@@ -1,3 +1,5 @@
v1.2. Rewrite and merge mongrel cluster and mongrel_rails into something small and maintainable. Remove gem_plugin entirely.
+v1.1.1. See if Java is setting the server version string in the request properly.
+
View
@@ -124,7 +124,7 @@ module Mongrel
end
config.run
- config.log "Mongrel available at #{@address}:#{@port}"
+ config.log "Mongrel #{Mongrel::Const::MONGREL_VERSION} available at #{@address}:#{@port}"
if config.defaults[:daemon]
config.write_pid_file
View
@@ -235,13 +235,21 @@ def graceful_shutdown
def configure_socket_options
case RUBY_PLATFORM
- when /linux/
- # 9 is currently TCP_DEFER_ACCEPT
- $tcp_defer_accept_opts = [Socket::SOL_TCP, 9, 1]
- $tcp_cork_opts = [Socket::SOL_TCP, 3, 1]
+ when /linux/
+ # 9 is currently TCP_DEFER_ACCEPT
+ $tcp_defer_accept_opts = [Socket::SOL_TCP, 9, 1]
+ $tcp_cork_opts = [Socket::SOL_TCP, 3, 1]
+ when /freebsd(([1-4]\..{1,2})|5\.[0-4])/
+ # Do nothing, just closing a bug when freebsd <= 5.4
+ when /freebsd/
+ # Use the HTTP accept filter if available.
+ # The struct made by pack() is defined in /usr/include/sys/socket.h as accept_filter_arg
+ unless `/sbin/sysctl -nq net.inet.accf.http`.empty?
+ $tcp_defer_accept_opts = [Socket::SOL_SOCKET, Socket::SO_ACCEPTFILTER, ['httpready', nil].pack('a16a240')]
+ end
end
end
-
+
# Runs the thing. It returns the thread used so you can "join" it. You can also
# access the HttpServer::acceptor attribute to get the thread later.
def run
@@ -340,4 +348,4 @@ def stop(synchronous=false)
# in regular Mongrel.
$LOAD_PATH.unshift 'projects/mongrel_experimental/lib/'
-Mongrel::Gems.require 'mongrel_experimental', '=1.1'
+Mongrel::Gems.require 'mongrel_experimental', ">=#{Mongrel::Const::MONGREL_VERSION}"
View
@@ -0,0 +1,23 @@
+module Mongrel
+ module Gems
+ class << self
+
+ alias :original_require :require
+
+ def require(library, version = nil)
+ begin
+ original_require library
+ rescue LoadError, RuntimeError => e
+ unless respond_to? 'gem'
+ # ActiveSupport breaks 'require' by making it always return a true value
+ require 'rubygems'
+ gem library, version if version
+ retry
+ end
+ # Fail without reraising
+ end
+ end
+
+ end
+ end
+end
@@ -1,8 +1,6 @@
if respond_to?(:namespace)
- # Cap 2
- load 'mongrel_cluster/recipes_2'
-else
- # Cap 1
- load 'mongrel_cluster/recipes_1'
+ require 'mongrel_cluster/recipes_2' # Cap 2
+else
+ require 'mongrel_cluster/recipes_1' # Cap 1
end
@@ -1,3 +1,3 @@
require 'uri_classifier'
-STDERR.puts "** mongrel_experimental loaded"
+STDERR.puts "** Mongrel_experimental loaded"
View
@@ -1,7 +1,16 @@
<dl>
+ <dt>Nov-1-2007</dt>
+ <dd>
+ <h5><a href="{relocatable: news.html}">Mongrel 1.1, caffeinated edition</a></h5>
+
+ <p>Mongrel 1.1 is out, with JRuby support. Mongrel_cluster is also updated to 1.0.4.</p>
+ <a href="http://rubyforge.org/frs/?group_id=1306" title="Downloads">Download</a>
+ <a href="{relocatable: news.html}"><img src="{relocatable: images/li4.gif}" alt="more" /><br /></a></p>
+ </dd>
+
<dt>Oct-29-2007</dt>
<dd>
- <h5><a href="{relocatable: news.html}">Mongrel 1.0.4 released</a></h5>
+ <h5><a href="{relocatable: news.html}">Mongrel 1.0.4, bugfix release</a></h5>
<p>Mongrel 1.0.4 is out. It fixes three bugs that were introduced in 1.0.3.</p>
<a href="http://rubyforge.org/frs/?group_id=1306" title="Downloads">Download</a>
View
@@ -7,6 +7,10 @@ ordering: 2
h1. Latest News
+h2. Nov 1: Mongrel 1.1, caffeinated edition
+
+Mongrel 1.1 is out, with JRuby support. Mongrel_cluster is also updated to 1.0.4, with fixes for a Capistrano recipe bug. The URIClassifier has been updated; if you still need the old one (you don't), it's available in the mongrel_experimental gem.
+
h2. Oct 29: Mongrel 1.0.4, spooky.
Mongrel 1.0.4 is out. It fixes three bugs that were introduced in 1.0.3.
View
@@ -1,39 +0,0 @@
-
-# Minimal test to help debug JRuby socket issues
-
-require 'socket'
-
-@server = Thread.new do
- server_socket = TCPServer.new('0.0.0.0', 10101)
- this_client = server_socket.accept
- 4.times do |n|
- begin
- data = this_client.readpartial(2)
- puts "Server got: #{data}"
- if n == 0
- this_client.close
- puts "Server closed the client"
- end
- rescue IOError => e
- puts "Server has: #{e.inspect}"
- end
- sleep(1)
- end
- server_socket.close
-end
-
-sleep(3)
-client_socket = TCPSocket.new('0.0.0.0', 10101)
-4.times do |n|
- string = "X#{n}"
- begin
- client_socket.write(string)
- puts "Client said: #{string}"
- rescue Errno::EPIPE => e
- puts "Client has: #{e.inspect}"
- end
- sleep(1)
-end
-client_socket.close
-
-@server.join

0 comments on commit 69370dc

Please sign in to comment.