summaryrefslogtreecommitdiff
path: root/spec/scripts/ssl-serve.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/scripts/ssl-serve.rb')
-rw-r--r--spec/scripts/ssl-serve.rb22
1 files changed, 11 insertions, 11 deletions
diff --git a/spec/scripts/ssl-serve.rb b/spec/scripts/ssl-serve.rb
index 3f4e343926..5677e94d0a 100644
--- a/spec/scripts/ssl-serve.rb
+++ b/spec/scripts/ssl-serve.rb
@@ -20,26 +20,26 @@ key = OpenSSL::PKey::RSA.new(key_text)
server_opts = {}
if $ssl
- server_opts.merge!( { :SSLEnable => true,
- :SSLVerifyClient => OpenSSL::SSL::VERIFY_NONE,
- :SSLCertificate => cert,
- :SSLPrivateKey => key })
+ server_opts.merge!( { SSLEnable: true,
+ SSLVerifyClient: OpenSSL::SSL::VERIFY_NONE,
+ SSLCertificate: cert,
+ SSLPrivateKey: key })
end
# 5 == debug, 3 == warning
LOGGER = WEBrick::Log.new(STDOUT, 5)
DEFAULT_OPTIONS = {
- :server => "webrick",
- :Port => 9000,
- :Host => "localhost",
- :environment => :none,
- :Logger => LOGGER,
- :DocumentRoot => File.expand_path("#{Dir.tmpdir}/chef-118-sampledata")
+ server: "webrick",
+ Port: 9000,
+ Host: "localhost",
+ environment: :none,
+ Logger: LOGGER,
+ DocumentRoot: File.expand_path("#{Dir.tmpdir}/chef-118-sampledata")
#:AccessLog => [] # Remove this option to enable the access log when debugging.
}
webrick_opts = DEFAULT_OPTIONS.merge(server_opts)
-pp :webrick_opts => webrick_opts
+pp webrick_opts: webrick_opts
server = WEBrick::HTTPServer.new(webrick_opts)
trap("INT") { server.shutdown }