Refactor abilities. Added ProjectUpdate context. Fixed few bugs with namespaces
This commit is contained in:
parent
a1ffc673b9
commit
eb1004f789
18 changed files with 127 additions and 53 deletions
|
@ -53,12 +53,14 @@ class Namespace < ActiveRecord::Base
|
|||
end
|
||||
|
||||
def move_dir
|
||||
old_path = File.join(Gitlab.config.git_base_path, path_was)
|
||||
new_path = File.join(Gitlab.config.git_base_path, path)
|
||||
if File.exists?(new_path)
|
||||
raise "Already exists"
|
||||
if path_changed?
|
||||
old_path = File.join(Gitlab.config.git_base_path, path_was)
|
||||
new_path = File.join(Gitlab.config.git_base_path, path)
|
||||
if File.exists?(new_path)
|
||||
raise "Already exists"
|
||||
end
|
||||
system("mv #{old_path} #{new_path}")
|
||||
end
|
||||
system("mv #{old_path} #{new_path}")
|
||||
end
|
||||
|
||||
def rm_dir
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue