diff --git a/app/models/project.rb b/app/models/project.rb index add54eb..b022bb4 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -201,7 +201,7 @@ class Project < ActiveRecord::Base [Gitlab.config.gitlab.url, path_with_namespace].join("/") end - def web_url_without_scheme + def web_url_without_protocol web_url.split("://")[1] end diff --git a/app/views/layouts/_head.html.haml b/app/views/layouts/_head.html.haml index 2fe3148..6d8139a 100644 --- a/app/views/layouts/_head.html.haml +++ b/app/views/layouts/_head.html.haml @@ -23,5 +23,5 @@ -# Go repository retrieval support. - if controller_name == 'projects' && action_name == 'show' - %meta{name: "go-import", content: "#{@project.web_url_without_scheme} git #{@project.web_url}.git"} + %meta{name: "go-import", content: "#{@project.web_url_without_protocol} git #{@project.web_url}.git"} -- libgit2 0.21.2