summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouwe Maan <douwe@selenight.nl>2017-05-25 08:43:47 -0500
committerDouwe Maan <douwe@selenight.nl>2017-05-25 08:43:47 -0500
commit4ba547809fd8fd228ea463e4f107242d1966c892 (patch)
treeacfd50b2c2280f7836b993f87036f43e19e33cfc
parentd9f13db3a1f4e4ddfad129f1db6b462f88a347e4 (diff)
downloadgitlab-ce-4ba547809fd8fd228ea463e4f107242d1966c892.tar.gz
Cartfile git and binary methods cannot take a GitHub repo
-rw-r--r--lib/gitlab/dependency_linker/cartfile_linker.rb10
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