This commit is contained in:
Vokhmin Alexey V 2013-04-11 16:07:29 +04:00
parent 73bb177764
commit cb00f301ba
1 changed files with 2 additions and 2 deletions

View File

@ -8,8 +8,8 @@ module GitHelper
url = node.url(treeish).gsub(/.git$/, '') url = node.url(treeish).gsub(/.git$/, '')
if url =~ /^git:/ if url =~ /^git:/
url.gsub!(/^git/, 'http') url.gsub!(/^git/, 'http')
else elsif str = /git@.*:.*/.match(url)
str = /git@.*:.*/.match(url)[0].gsub(/^git@/, '') str = str[0].gsub(/^git@/, '')
domen = str.gsub(/:.*/, '') domen = str.gsub(/:.*/, '')
owner = str.gsub(/^#{domen}:/, '').gsub(/\/.*/, '') owner = str.gsub(/^#{domen}:/, '').gsub(/\/.*/, '')
project = str.gsub(/.*\//, '') project = str.gsub(/.*\//, '')