Cleaning and refactoring
This commit is contained in:
parent
74f8bc7298
commit
cb59aade4e
12 changed files with 135 additions and 232 deletions
|
@ -6,6 +6,14 @@ module Gitlabhq
|
|||
class Gitolite
|
||||
class AccessDenied < StandardError; end
|
||||
|
||||
def self.update_project(path, project)
|
||||
self.new.configure { |git| git.update_project(path, project) }
|
||||
end
|
||||
|
||||
def self.destroy_project(project)
|
||||
self.new.configure { |git| git.destroy_project(project) }
|
||||
end
|
||||
|
||||
def pull
|
||||
# create tmp dir
|
||||
@local_dir = File.join(Dir.tmpdir,"gitlabhq-gitolite-#{Time.now.to_i}")
|
||||
|
|
|
@ -90,8 +90,7 @@ def create_repo_project(project_name, user_email)
|
|||
|
||||
# Add user as admin for project
|
||||
project.users_projects.create!(
|
||||
:repo_access => Repository::REPO_RW,
|
||||
:project_access => Project::PROJECT_RWA,
|
||||
:project_access => UsersProject::MASTER,
|
||||
:user => user
|
||||
)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue