summaryrefslogtreecommitdiff
path: root/app/models/protected_branch.rb
diff options
context:
space:
mode:
authorrandx <dmitriy.zaporozhets@gmail.com>2012-08-29 00:04:06 +0300
committerrandx <dmitriy.zaporozhets@gmail.com>2012-08-29 00:04:06 +0300
commit7cdc5b9e0438c35c83fce739a764cb146d20c004 (patch)
tree42cfe847873dee51c54d32c81a8543c2d75fce50 /app/models/protected_branch.rb
parentaded7056fd3a9830215f41233ef609c0f9a3b862 (diff)
downloadgitlab-ce-7cdc5b9e0438c35c83fce739a764cb146d20c004.tar.gz
Use similar interface to access gitolite
Simplified gitolite handle logic Stubn over monkeypatch Stub only specific methods in Gitlab:Gitolite Moved grach auth to lib added specs for keys observer removes SshKey role
Diffstat (limited to 'app/models/protected_branch.rb')
-rw-r--r--app/models/protected_branch.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/models/protected_branch.rb b/app/models/protected_branch.rb
index 4da1432c1a9..7c30f7a0b6d 100644
--- a/app/models/protected_branch.rb
+++ b/app/models/protected_branch.rb
@@ -1,4 +1,6 @@
class ProtectedBranch < ActiveRecord::Base
+ include GitHost
+
belongs_to :project
validates_presence_of :project_id
validates_presence_of :name
@@ -7,7 +9,7 @@ class ProtectedBranch < ActiveRecord::Base
after_destroy :update_repository
def update_repository
- Gitlab::GitHost.system.update_project(project.path, project)
+ git_host.update_repository(project)
end
def commit