Display https as repo clone indicator and prevent modification of web_protocol variable.

Rewrite build_url, use web_protocol for repo indicator.

Explicitly initialize custom port to make the logic obvious.
This commit is contained in:
Marin Jankovski 2012-10-02 09:54:33 +02:00 committed by Sytse Sijbrandij
parent 2ff36e74eb
commit d75cc7eafd
3 changed files with 11 additions and 9 deletions

View file

@ -31,15 +31,17 @@ class Settings < Settingslogic
end
def build_url
raw_url = self.web_protocol
raw_url << "://"
raw_url << web_host
if web_custom_port?
raw_url << ":#{web_port}"
custom_port = ":#{web_port}"
else
custom_port = nil
end
raw_url
[
web_protocol,
"://",
web_host,
custom_port
].join('')
end
def ssh_port