aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--vendor/plugins/mongrel_proctitle/LICENSE10
-rw-r--r--vendor/plugins/mongrel_proctitle/README32
-rw-r--r--vendor/plugins/mongrel_proctitle/init.rb3
-rw-r--r--vendor/plugins/mongrel_proctitle/install.rb1
-rw-r--r--vendor/plugins/mongrel_proctitle/lib/mongrel_proctitle.rb122
-rw-r--r--vendor/plugins/mongrel_proctitle/uninstall.rb1
6 files changed, 0 insertions, 169 deletions
diff --git a/vendor/plugins/mongrel_proctitle/LICENSE b/vendor/plugins/mongrel_proctitle/LICENSE
deleted file mode 100644
index f958401bc..000000000
--- a/vendor/plugins/mongrel_proctitle/LICENSE
+++ /dev/null
@@ -1,10 +0,0 @@
-Copyright (c) 2007, Alexander Staubo.
-
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
- * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
- * The names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/vendor/plugins/mongrel_proctitle/README b/vendor/plugins/mongrel_proctitle/README
deleted file mode 100644
index ff0250a7a..000000000
--- a/vendor/plugins/mongrel_proctitle/README
+++ /dev/null
@@ -1,32 +0,0 @@
-Mongrel process title plugin
-============================
-
-This is a simple plugin for Rails which changes Mongrel's process title to reflect what it's currently doing. You can then determine a given Mongrel server's status using "ps". For example:
-
- mongrel_rails [10010/2/358]: handling 127.0.0.1: HEAD /feed/calendar/global/91/6de4
- | | | | | |
- | | | | | The current request (method and path)
- | | | | |
- | | | | The client IP
- | | | |
- | | | What it's doing
- | | |
- | | The number of requests processed during the server's lifetime
- | |
- | The number of requests currently queued/being processed concurrently
- |
- The port that Mongrel is serving
-
-
-Installing into a Rails Mongrel app
------------------------------------
-
-Nothing special. Just drop the plugin in vendor/plugins.
-
-
-Installing into a non-Rails Mongrel app
----------------------------------------
-
-Just require the module during startup:
-
- require "mongrel_proctitle"
diff --git a/vendor/plugins/mongrel_proctitle/init.rb b/vendor/plugins/mongrel_proctitle/init.rb
deleted file mode 100644
index e9748df5e..000000000
--- a/vendor/plugins/mongrel_proctitle/init.rb
+++ /dev/null
@@ -1,3 +0,0 @@
-if defined?(Mongrel)
- require "mongrel_proctitle"
-end
diff --git a/vendor/plugins/mongrel_proctitle/install.rb b/vendor/plugins/mongrel_proctitle/install.rb
deleted file mode 100644
index f7732d379..000000000
--- a/vendor/plugins/mongrel_proctitle/install.rb
+++ /dev/null
@@ -1 +0,0 @@
-# Install hook code here
diff --git a/vendor/plugins/mongrel_proctitle/lib/mongrel_proctitle.rb b/vendor/plugins/mongrel_proctitle/lib/mongrel_proctitle.rb
deleted file mode 100644
index 28f4b46ee..000000000
--- a/vendor/plugins/mongrel_proctitle/lib/mongrel_proctitle.rb
+++ /dev/null
@@ -1,122 +0,0 @@
-module Mongrel
-
- # Mongrel process title modification.
- class Proctitler
-
- # Initializes titler.
- def initialize(port, prefix)
- @prefix = prefix
- @port = port
- @mutex = Mutex.new
- @titles = []
- @queue_length = 0
- @request_count = 0
- end
-
- # Returns port used in title.
- def port
- @port
- end
-
- # Return port used in title.
- def port=(new_port)
- @port = new_port
- end
-
- def request(&block)
- titles, mutex = @titles, @mutex
- mutex.synchronize do
- @queue_length += 1
- titles.push(self.title)
- end
- begin
- yield
- ensure
- mutex.synchronize do
- @queue_length -= 1
- @request_count += 1
- self.title = titles.pop || "xxx"
- end
- end
- end
-
- # Reports process as being idle.
- def set_idle
- self.title = "idle"
- end
-
- # Reports process as handling a socket.
- def set_processing(socket)
- self.title = "handling #{socket.peeraddr.last}"
- end
-
- # Reports process as handling a socket.
- def set_handling(request)
- params = request.params
- address = params['REMOTE_ADDR']
- method = params['REQUEST_METHOD']
- path = params['REQUEST_PATH']
- path = "#{path[0, 60]}..." if path.length > 60
- self.title = "handling #{address}: #{method} #{path}"
- end
-
- # Returns current title
- def title
- @title
- end
-
- # Sets process title.
- def title=(title)
- @title = title
- update_process_title
- end
-
- # Updates the process title.
- def update_process_title
- title = "#{@prefix} ["
- title << (@port ? "#{@port}" : "?")
- title << "/#{@queue_length}"
- title << "/#{@request_count}"
- title << "]: #{@title}"
- $0 = title
- end
-
- end
-
- # Handler which sets process title before request.
- class ProctitleHandler < HttpHandler
- def initialize(titler)
- @titler = titler
- end
-
- def process(request, response)
- @titler.set_handling(request)
- end
- end
-
- class HttpServer
-
- def run_with_proctitle(*args)
- @titler = Proctitler.new(self.port, File.basename($0))
- @titler.set_idle
- run_without_proctitle
- end
- alias_method :run_without_proctitle, :run
- alias_method :run, :run_with_proctitle
-
- def process_client_with_proctitle(client)
- unless @handler
- @handler = ProctitleHandler.new(@titler)
- register("/", @handler, true)
- end
- @titler.request do
- @titler.set_processing(client)
- return process_client_without_proctitle(client)
- end
- end
- alias_method :process_client_without_proctitle, :process_client
- alias_method :process_client, :process_client_with_proctitle
-
- end
-
-end
diff --git a/vendor/plugins/mongrel_proctitle/uninstall.rb b/vendor/plugins/mongrel_proctitle/uninstall.rb
deleted file mode 100644
index 973833346..000000000
--- a/vendor/plugins/mongrel_proctitle/uninstall.rb
+++ /dev/null
@@ -1 +0,0 @@
-# Uninstall hook code here