1
0
Fork 0
mirror of https://github.com/puma/puma.git synced 2022-11-09 13:48:40 -05:00

Log binding on http:// for TCP bindings to make it clickable

Fix https://github.com/puma/puma/issues/2166
This commit is contained in:
Christian Bruckmayer 2020-03-09 19:29:34 +00:00
parent fc03781cf3
commit 4ecd9359a8
No known key found for this signature in database
GPG key ID: 6108073450CD2303
3 changed files with 6 additions and 5 deletions

View file

@ -10,6 +10,7 @@
* Changed #connected_port to #connected_ports (#2076)
* `--control` has been removed. Use `--control-url` (#1487)
* `worker_directory` has been removed. Use `directory`
* Log binding on http:// for TCP bindings to make it clickable
* Bugfixes
* Windows update extconf.rb for use with ssp and varied Ruby/MSYS2 combinations (#2069)

View file

@ -115,7 +115,7 @@ module Puma
i.local_address.ip_unpack.join(':')
end
logger.log "* #{log_msg} on tcp://#{addr}"
logger.log "* #{log_msg} on http://#{addr}"
end
end

View file

@ -64,7 +64,7 @@ class TestBinder < TestBinderBase
def test_correct_zero_port
@binder.parse ["tcp://localhost:0"], @events
m = %r!tcp://127.0.0.1:(\d+)!.match(@events.stdout.string)
m = %r!http://127.0.0.1:(\d+)!.match(@events.stdout.string)
port = m[1].to_i
refute_equal 0, port
@ -84,9 +84,9 @@ class TestBinder < TestBinderBase
def test_logs_all_localhost_bindings
@binder.parse ["tcp://localhost:0"], @events
assert_match %r!tcp://127.0.0.1:(\d+)!, @events.stdout.string
assert_match %r!http://127.0.0.1:(\d+)!, @events.stdout.string
if Socket.ip_address_list.any? {|i| i.ipv6_loopback? }
assert_match %r!tcp://\[::1\]:(\d+)!, @events.stdout.string
assert_match %r!http://\[::1\]:(\d+)!, @events.stdout.string
end
end
@ -271,7 +271,7 @@ class TestBinder < TestBinderBase
prepared_paths = {
ssl: "ssl://127.0.0.1:#{UniquePort.call}?#{ssl_query}",
tcp: "tcp://127.0.0.1:#{UniquePort.call}",
tcp: "http://127.0.0.1:#{UniquePort.call}",
unix: "unix://test/#{name}_server.sock"
}