diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-06-03 17:17:36 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-06-03 17:17:36 +0300 |
commit | e414463d9efba4a53531410fa21fde8412de9398 (patch) | |
tree | b9775a65f76fa383adcf8b17e5e47f7399ec5d64 /lib | |
parent | 15b1bb47ba219bfaa50509aacefd796f41a68537 (diff) | |
parent | 58ab8a4a9d0e051cf6355c1b9a4d8dc13fc892cc (diff) |
Merge branch 'repo-remove'
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Conflicts:
spec/features/projects_spec.rb
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/backend/shell.rb | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/lib/gitlab/backend/shell.rb b/lib/gitlab/backend/shell.rb index 530f9d93de4..172d4902add 100644 --- a/lib/gitlab/backend/shell.rb +++ b/lib/gitlab/backend/shell.rb @@ -244,6 +244,16 @@ module Gitlab end end + # Check if such directory exists in repositories. + # + # Usage: + # exists?('gitlab') + # exists?('gitlab/cookies.git') + # + def exists?(dir_name) + File.exists?(full_path(dir_name)) + end + protected def gitlab_shell_path @@ -264,10 +274,6 @@ module Gitlab File.join(repos_path, dir_name) end - def exists?(dir_name) - File.exists?(full_path(dir_name)) - end - def gitlab_shell_projects_path File.join(gitlab_shell_path, 'bin', 'gitlab-projects') end |