From 4ba547809fd8fd228ea463e4f107242d1966c892 Mon Sep 17 00:00:00 2001 From: Douwe Maan Date: Thu, 25 May 2017 08:43:47 -0500 Subject: Cartfile git and binary methods cannot take a GitHub repo --- lib/gitlab/dependency_linker/cartfile_linker.rb | 10 ++-------- 1 file 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 -- cgit v1.2.1