Update uses of Gitolite.config.foo settings

This commit is contained in:
Riyad Preukschas 2012-12-15 01:16:25 +01:00
parent b2e46f44ce
commit 19eb637419
33 changed files with 95 additions and 95 deletions

View file

@ -2,7 +2,7 @@ class PostReceive
@queue = :post_receive
def self.perform(repo_path, oldrev, newrev, ref, identifier)
repo_path.gsub!(Gitlab.config.git_base_path.to_s, "")
repo_path.gsub!(Gitlab.config.gitolite.repos_path.to_s, "")
repo_path.gsub!(/.git$/, "")
repo_path.gsub!(/^\//, "")
@ -10,7 +10,7 @@ class PostReceive
return false if project.nil?
# Ignore push from non-gitlab users
user = if identifier.eql? Gitlab.config.gitolite_admin_key
user = if identifier.eql? Gitlab.config.gitolite.admin_key
email = project.commit(newrev).author.email rescue nil
User.find_by_email(email) if email
elsif /^[A-Z0-9._%a-z\-]+@(?:[A-Z0-9a-z\-]+\.)+[A-Za-z]{2,4}$/.match(identifier)