lib/hi/server.rb in hi-1.2.0 vs lib/hi/server.rb in hi-1.2.1

- old
+ new

@@ -11,15 +11,15 @@ def initialize(app) @app = app end def start(port = app.port, attempts = 1) - log "Starting server on port #{port}...\n\n" + app.log "Starting server on port #{port}...\n\n" start! port rescue RuntimeError => e if attempts < MAX_ATTEMPTS - log "\nUnable to start server, trying random port instead." + app.log "\nUnable to start server, trying random port instead." start random_port, attempts + 1 else raise CantStartServerError.new(e) end end @@ -30,12 +30,8 @@ private def random_port 1000 + Random.rand(9000) - end - - def log(message) - puts message unless ENV['RACK_ENV'] == 'test' end end end