summaryrefslogtreecommitdiffstats
path: root/lib/puppet/network/http/mongrel.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/puppet/network/http/mongrel.rb')
-rw-r--r--lib/puppet/network/http/mongrel.rb16
1 files changed, 10 insertions, 6 deletions
diff --git a/lib/puppet/network/http/mongrel.rb b/lib/puppet/network/http/mongrel.rb
index ab1e616b1..5b14d93c9 100644
--- a/lib/puppet/network/http/mongrel.rb
+++ b/lib/puppet/network/http/mongrel.rb
@@ -14,10 +14,10 @@ class Puppet::Network::HTTP::Mongrel
@protocols = args[:protocols]
@handlers = args[:handlers]
-
- setup_handlers
-
@server = Mongrel::HttpServer.new(args[:address], args[:port])
+
+ setup_handlers
+
@server.run
@listening = true
end
@@ -37,12 +37,16 @@ class Puppet::Network::HTTP::Mongrel
def setup_handlers
@protocols.each do |protocol|
@handlers.each do |handler|
- class_for_protocol_handler(protocol, handler).new
+ class_for_protocol(protocol).new(:server => @server, :handler => handler)
end
end
end
- def class_for_protocol_handler(protocol, handler)
- Class.new
+ # TODO/FIXME: need a spec which forces delegation to the real class
+ def class_for_protocol(protocol)
+ Class.new do
+ def initialize(args = {})
+ end
+ end
end
end