diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2012-03-06 02:26:40 +0400 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2012-03-06 02:26:40 +0400 |
commit | cb59aade4e568e6146a966362385ac41af4dc604 (patch) | |
tree | 5b755ded0186a81c15d8da2b7b4ce865a5b73a0d /lib | |
parent | 74f8bc7298f112c2d414c6f71be054adce01012a (diff) |
Cleaning and refactoring
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlabhq/gitolite.rb | 8 | ||||
-rw-r--r-- | lib/tasks/bulk_import.rake | 3 |
2 files changed, 9 insertions, 2 deletions
diff --git a/lib/gitlabhq/gitolite.rb b/lib/gitlabhq/gitolite.rb index 4f911113ea0..701b9a8f8b4 100644 --- a/lib/gitlabhq/gitolite.rb +++ b/lib/gitlabhq/gitolite.rb @@ -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}") diff --git a/lib/tasks/bulk_import.rake b/lib/tasks/bulk_import.rake index de00a68ad4d..607250f1770 100644 --- a/lib/tasks/bulk_import.rake +++ b/lib/tasks/bulk_import.rake @@ -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 ) |