lib/ refactoring. Module Gitlabhq renamed to Gitlab
This commit is contained in:
parent
8ceb94081a
commit
3272620f72
20 changed files with 87 additions and 85 deletions
21
lib/gitlab/git_host.rb
Normal file
21
lib/gitlab/git_host.rb
Normal file
|
@ -0,0 +1,21 @@
|
|||
require File.join(Rails.root, "lib", "gitlab", "gitolite")
|
||||
|
||||
module Gitlab
|
||||
class GitHost
|
||||
def self.system
|
||||
Gitlab::Gitolite
|
||||
end
|
||||
|
||||
def self.admin_uri
|
||||
GIT_HOST["admin_uri"]
|
||||
end
|
||||
|
||||
def self.url_to_repo(path)
|
||||
if !GIT_HOST["port"] or GIT_HOST["port"] == 22
|
||||
"#{GIT_HOST["git_user"]}@#{GIT_HOST["host"]}:#{path}.git"
|
||||
else
|
||||
"ssh://#{GIT_HOST["git_user"]}@#{GIT_HOST["host"]}:#{GIT_HOST["port"]}/#{path}.git"
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue