Memoize GitlabShellAdapter for performance and ease of testing

Port of https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/3463#note_47990536
This commit is contained in:
Stan Hu 2017-11-20 23:28:49 -08:00
parent 9a8f094e34
commit f80654c4e1

View file

@ -5,7 +5,7 @@
module Gitlab
module ShellAdapter
def gitlab_shell
Gitlab::Shell.new
@gitlab_shell ||= Gitlab::Shell.new
end
end
end