summaryrefslogtreecommitdiffstats
path: root/lib/puppet
diff options
context:
space:
mode:
authorRick Bradley <rick@rickbradley.com>2007-10-15 15:04:10 -0500
committerRick Bradley <rick@rickbradley.com>2007-10-15 15:04:10 -0500
commitef8ebe0df4da0a0cd2f599308f40bd707ab18d92 (patch)
tree75f4f9b1198342b70354fbb7a755850eea77a820 /lib/puppet
parentc34efbccf1eec9957253d4fcdcb4ea9c79837ad8 (diff)
downloadpuppet-ef8ebe0df4da0a0cd2f599308f40bd707ab18d92.tar.gz
puppet-ef8ebe0df4da0a0cd2f599308f40bd707ab18d92.tar.xz
puppet-ef8ebe0df4da0a0cd2f599308f40bd707ab18d92.zip
Implementing address & port support for new webrick server.
Diffstat (limited to 'lib/puppet')
-rw-r--r--lib/puppet/network/http/webrick.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/puppet/network/http/webrick.rb b/lib/puppet/network/http/webrick.rb
index c22bce938..b74bf441e 100644
--- a/lib/puppet/network/http/webrick.rb
+++ b/lib/puppet/network/http/webrick.rb
@@ -1,7 +1,7 @@
require 'webrick'
require 'webrick/https'
-class Puppet::Network::HTTP::WEBrick < WEBrick::HTTPServer
+class Puppet::Network::HTTP::WEBrick
def initialize(args = {})
@listening = false
end
@@ -12,8 +12,12 @@ class Puppet::Network::HTTP::WEBrick < WEBrick::HTTPServer
raise ArgumentError, ":port must be specified." unless args[:port]
raise "WEBrick server is already listening" if listening?
- # TODO / FIXME: this should be moved out of the wacky Puppet global namespace!
+ @server = WEBrick::HTTPServer.new(:BindAddress => args[:address], :Port => args[:port])
+
+ # TODO / FIXME is this really necessary? -- or can we do it in both mongrel and webrick?
+ Puppet.newservice(@server)
Puppet.start
+
@listening = true
end