diff options
author | Zeger-Jan van de Weg <git@zjvandeweg.nl> | 2020-06-09 11:34:39 +0300 |
---|---|---|
committer | Zeger-Jan van de Weg <git@zjvandeweg.nl> | 2020-06-09 11:34:39 +0300 |
commit | d459fc26ea1db5842766daf41834b1f0042686a2 (patch) | |
tree | 2f6b89d4073b755ad2daf73bfdec02d242401939 | |
parent | 69a57726530829a46429c8f41c9bf4ec6d751234 (diff) | |
parent | 9f35659c07e5c4cdbc4660292ea6b812e740f109 (diff) |
Merge branch 'development' into 'master'
Fix warnings for upcoming ruby version
See merge request gitlab-org/gitaly!2227
-rw-r--r-- | ruby/gitlab-shell/lib/gitlab_net.rb | 2 | ||||
-rw-r--r-- | ruby/gitlab-shell/lib/httpunix.rb | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/ruby/gitlab-shell/lib/gitlab_net.rb b/ruby/gitlab-shell/lib/gitlab_net.rb index 812be9ae8..f9f7e8bc5 100644 --- a/ruby/gitlab-shell/lib/gitlab_net.rb +++ b/ruby/gitlab-shell/lib/gitlab_net.rb @@ -60,7 +60,7 @@ class GitlabNet # rubocop:disable Metrics/ClassLength end def pre_receive(gl_repository) - resp = post("#{internal_api_endpoint}/pre_receive", gl_repository: gl_repository) + resp = post("#{internal_api_endpoint}/pre_receive", { gl_repository: gl_repository }) raise NotFound if resp.code == '404' diff --git a/ruby/gitlab-shell/lib/httpunix.rb b/ruby/gitlab-shell/lib/httpunix.rb index 7d00f71d5..060af8bbb 100644 --- a/ruby/gitlab-shell/lib/httpunix.rb +++ b/ruby/gitlab-shell/lib/httpunix.rb @@ -4,7 +4,7 @@ # http://fixall.online/theres-no-need-to-reinvent-the-wheelhttpsgithubcommsabramorequests-unixsocketurl/241810/ # https://github.com/msabramo/requests-unixsocket -require 'uri' +require 'cgi' require 'net/http' module URI @@ -12,7 +12,7 @@ module URI def hostname # decode %XX from path to file v = host - URI.decode(v) + CGI.unescape(v) end # port is not allowed in URI |