Allow to configure gitlab socket just by path
@jacobvosmaer noted that from user perspective it is not very handy to have URL-encoded paths for sockets, and this way it is also not consistent with everything else in GitLab where we use just unix://path/to/socket instead of unix://path%2Fto%2Fsocket . Be friends to users and allow them to configure socket path just with paths with secondary gitlab_socket option, handler for which just encodes the path and adds http+unix:// prefix, so internal handling is always by URL. To protect from inconsistent input, configuration handler checks that only one of gitlab_url or gitlab_socket can be given at a time. NOTE CGI::escape() is used instead of URL::escape() because the latter does not escape '/' characters by default: http://stackoverflow.com/questions/14989581/ruby-1-9-3-add-unsafe-characters-to-uri-escape
Showing