diff options
-rw-r--r-- | lib/gitlab/dependency_linker/cartfile_linker.rb | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/lib/gitlab/dependency_linker/cartfile_linker.rb b/lib/gitlab/dependency_linker/cartfile_linker.rb index f65577588f8..4f69f2c4ab2 100644 --- a/lib/gitlab/dependency_linker/cartfile_linker.rb +++ b/lib/gitlab/dependency_linker/cartfile_linker.rb @@ -6,14 +6,8 @@ module Gitlab private def link_dependencies - link_method_call(%w[github git binary]) do |value| - case value - when %r{\A#{REPO_REGEX}\z} - github_url(value) - when /\A#{URL_REGEX}\z/ - value - end - end + link_method_call('github', REPO_REGEX, &method(:github_url)) + link_method_call(%w[github git binary], URL_REGEX, &:itself) end end end |