diff --git a/lib/puppet/network/http/mongrel.rb b/lib/puppet/network/http/mongrel.rb index 4593f6569..d948836cd 100644 --- a/lib/puppet/network/http/mongrel.rb +++ b/lib/puppet/network/http/mongrel.rb @@ -1,7 +1,6 @@ require 'mongrel' if Puppet.features.mongrel? require 'puppet/network/http/mongrel/rest' -require 'puppet/network/http/mongrel/xmlrpc' class Puppet::Network::HTTP::Mongrel def initialize(args = {}) @@ -47,7 +46,6 @@ class Puppet::Network::HTTP::Mongrel def class_for_protocol(protocol) return Puppet::Network::HTTP::MongrelREST if protocol.to_sym == :rest - return Puppet::Network::HTTP::MongrelXMLRPC if protocol.to_sym == :xmlrpc raise ArgumentError, "Unknown protocol [#{protocol}]." end end diff --git a/lib/puppet/network/http/mongrel/xmlrpc.rb b/lib/puppet/network/http/mongrel/xmlrpc.rb deleted file mode 100644 index 92acd4f0e..000000000 --- a/lib/puppet/network/http/mongrel/xmlrpc.rb +++ /dev/null @@ -1,4 +0,0 @@ -class Puppet::Network::HTTP::MongrelXMLRPC - def initialize(args = {}) - end -end diff --git a/lib/puppet/network/http/webrick.rb b/lib/puppet/network/http/webrick.rb index c4b2ed3c6..894e12473 100644 --- a/lib/puppet/network/http/webrick.rb +++ b/lib/puppet/network/http/webrick.rb @@ -1,7 +1,6 @@ require 'webrick' require 'webrick/https' require 'puppet/network/http/webrick/rest' -require 'puppet/network/http/webrick/xmlrpc' class Puppet::Network::HTTP::WEBrick def initialize(args = {}) @@ -45,7 +44,6 @@ class Puppet::Network::HTTP::WEBrick def class_for_protocol(protocol) return Puppet::Network::HTTP::WEBrickREST if protocol.to_sym == :rest - return Puppet::Network::HTTP::WEBrickXMLRPC if protocol.to_sym == :xmlrpc raise ArgumentError, "Unknown protocol [#{protocol}]." end end diff --git a/lib/puppet/network/http/webrick/xmlrpc.rb b/lib/puppet/network/http/webrick/xmlrpc.rb deleted file mode 100644 index 793708f8a..000000000 --- a/lib/puppet/network/http/webrick/xmlrpc.rb +++ /dev/null @@ -1,4 +0,0 @@ -class Puppet::Network::HTTP::WEBrickXMLRPC - def initialize(args = {}) - end -end diff --git a/spec/spec.opts b/spec/spec.opts index 2f9bf0d0a..695852c2f 100644 --- a/spec/spec.opts +++ b/spec/spec.opts @@ -1,3 +1,5 @@ +--format +s --colour --loadby mtime diff --git a/spec/unit/network/http/mongrel.rb b/spec/unit/network/http/mongrel.rb index a39e7354a..a837c9daa 100644 --- a/spec/unit/network/http/mongrel.rb +++ b/spec/unit/network/http/mongrel.rb @@ -23,7 +23,7 @@ describe Puppet::Network::HTTP::Mongrel, "when turning on listening" do @mock_mongrel.stubs(:run) @mock_mongrel.stubs(:register) Mongrel::HttpServer.stubs(:new).returns(@mock_mongrel) - @listen_params = { :address => "127.0.0.1", :port => 31337, :handlers => [ :node, :catalog ], :protocols => [ :rest, :xmlrpc ] } + @listen_params = { :address => "127.0.0.1", :port => 31337, :handlers => [ :node, :catalog ], :protocols => [ :rest ] } end it "should fail if already listening" do @@ -82,11 +82,6 @@ describe Puppet::Network::HTTP::Mongrel, "when turning on listening" do @server.listen(@listen_params.merge(:protocols => [:rest])) end - it "should use a Mongrel + XMLRPC class to configure Mongrel when XMLRPC services are requested" do - Puppet::Network::HTTP::MongrelXMLRPC.expects(:new).at_least_once - @server.listen(@listen_params.merge(:protocols => [:xmlrpc])) - end - it "should fail if services from an unknown protocol are requested" do Proc.new { @server.listen(@listen_params.merge(:protocols => [ :foo ]))}.should raise_error(ArgumentError) end @@ -102,7 +97,7 @@ describe Puppet::Network::HTTP::Mongrel, "when turning off listening" do @mock_mongrel.stubs(:register) Mongrel::HttpServer.stubs(:new).returns(@mock_mongrel) @server = Puppet::Network::HTTP::Mongrel.new - @listen_params = { :address => "127.0.0.1", :port => 31337, :handlers => [ :node, :catalog ], :protocols => [ :rest, :xmlrpc ] } + @listen_params = { :address => "127.0.0.1", :port => 31337, :handlers => [ :node, :catalog ], :protocols => [ :rest ] } end it "should fail unless listening" do diff --git a/spec/unit/network/http/webrick.rb b/spec/unit/network/http/webrick.rb index 0689b1b6b..6a4c50142 100644 --- a/spec/unit/network/http/webrick.rb +++ b/spec/unit/network/http/webrick.rb @@ -18,7 +18,7 @@ describe Puppet::Network::HTTP::WEBrick, "when turning on listening" do [:mount, :start, :shutdown].each {|meth| @mock_webrick.stubs(meth)} WEBrick::HTTPServer.stubs(:new).returns(@mock_webrick) @server = Puppet::Network::HTTP::WEBrick.new - @listen_params = { :address => "127.0.0.1", :port => 31337, :handlers => [ :node, :catalog ], :protocols => [ :rest, :xmlrpc ] } + @listen_params = { :address => "127.0.0.1", :port => 31337, :handlers => [ :node, :catalog ], :protocols => [ :rest ] } end it "should fail if already listening" do @@ -78,11 +78,6 @@ describe Puppet::Network::HTTP::WEBrick, "when turning on listening" do @server.listen(@listen_params.merge(:protocols => [:rest])) end - it "should use a WEBrick + XMLRPC class to configure WEBrick when XMLRPC services are requested" do - Puppet::Network::HTTP::WEBrickXMLRPC.expects(:new).at_least_once - @server.listen(@listen_params.merge(:protocols => [:xmlrpc])) - end - it "should fail if services from an unknown protocol are requested" do Proc.new { @server.listen(@listen_params.merge(:protocols => [ :foo ]))}.should raise_error(ArgumentError) end @@ -94,7 +89,7 @@ describe Puppet::Network::HTTP::WEBrick, "when turning off listening" do [:mount, :start, :shutdown].each {|meth| @mock_webrick.stubs(meth)} WEBrick::HTTPServer.stubs(:new).returns(@mock_webrick) @server = Puppet::Network::HTTP::WEBrick.new - @listen_params = { :address => "127.0.0.1", :port => 31337, :handlers => [ :node, :catalog ], :protocols => [ :rest, :xmlrpc ] } + @listen_params = { :address => "127.0.0.1", :port => 31337, :handlers => [ :node, :catalog ], :protocols => [ :rest ] } end it "should fail unless listening" do