lib/yard/server/rack_adapter.rb in yard-0.6.0 vs lib/yard/server/rack_adapter.rb in yard-0.6.1

- old
+ new

@@ -22,11 +22,23 @@ end def start server = Rack::Server.new(server_options) server.instance_variable_set("@app", self) - trap("INT") { server.shutdown } + print_start_message(server) server.start + end + + private + + def print_start_message(server) + opts = server.default_options.merge(server.options) + puts ">> YARD #{YARD::VERSION} documentation server at http://#{opts[:Host]}:#{opts[:Port]}" + + # Only happens for Mongrel + return unless server.server.to_s == "Rack::Handler::Mongrel" + puts ">> #{server.server.class_name} web server (running on Rack)" + puts ">> Listening on #{opts[:Host]}:#{opts[:Port]}, CTRL+C to stop" end end end end