Commit d22993b4 authored by Gabriel Mazetto's avatar Gabriel Mazetto

Refactor EE gitlab routing helper

parent 937b8d03
module Ee
module GitlabRoutingHelper
def geo_primary_web_url(project)
File.join(::Gitlab::Geo.primary_node.url, ::Gitlab::Routing.url_helpers.namespace_project_path(project.namespace, project))
end
def geo_primary_http_url_to_repo(project)
"#{geo_primary_web_url(project)}.git"
end
def geo_primary_default_url_to_repo(project)
case default_clone_protocol
when 'http'
geo_primary_http_url_to_repo(project)
end
end
end
end
module EeGitlabRoutingHelper
def geo_primary_web_url(project)
File.join(::Gitlab::Geo.primary_node.url, ::Gitlab::Routing.url_helpers.namespace_project_path(project.namespace, project))
end
def geo_primary_http_url_to_repo(project)
"#{geo_primary_web_url(project)}.git"
end
def geo_primary_default_url_to_repo(project)
case default_clone_protocol
when 'http'
geo_primary_http_url_to_repo(project)
end
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment