Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
c9ae679c
Commit
c9ae679c
authored
Aug 01, 2017
by
Gabriel Mazetto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename ensure_dir_exist -> ensure_storage_path_exist
parent
5516886b
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
8 additions
and
8 deletions
+8
-8
app/models/concerns/storage/legacy_project.rb
app/models/concerns/storage/legacy_project.rb
+1
-1
app/models/project.rb
app/models/project.rb
+2
-2
app/services/geo/move_repository_service.rb
app/services/geo/move_repository_service.rb
+1
-1
app/workers/geo_repository_create_worker.rb
app/workers/geo_repository_create_worker.rb
+1
-1
lib/backup/repository.rb
lib/backup/repository.rb
+1
-1
spec/migrations/cleanup_namespaceless_pending_delete_projects_spec.rb
...ons/cleanup_namespaceless_pending_delete_projects_spec.rb
+1
-1
spec/workers/namespaceless_project_destroy_worker_spec.rb
spec/workers/namespaceless_project_destroy_worker_spec.rb
+1
-1
No files found.
app/models/concerns/storage/legacy_project.rb
View file @
c9ae679c
...
@@ -6,7 +6,7 @@ module Storage
...
@@ -6,7 +6,7 @@ module Storage
full_path
full_path
end
end
def
ensure_
dir
_exist
def
ensure_
storage_path
_exist
gitlab_shell
.
add_namespace
(
repository_storage_path
,
namespace
.
full_path
)
gitlab_shell
.
add_namespace
(
repository_storage_path
,
namespace
.
full_path
)
end
end
...
...
app/models/project.rb
View file @
c9ae679c
...
@@ -47,7 +47,7 @@ class Project < ActiveRecord::Base
...
@@ -47,7 +47,7 @@ class Project < ActiveRecord::Base
default_value_for
:snippets_enabled
,
gitlab_config_features
.
snippets
default_value_for
:snippets_enabled
,
gitlab_config_features
.
snippets
default_value_for
:only_allow_merge_if_all_discussions_are_resolved
,
false
default_value_for
:only_allow_merge_if_all_discussions_are_resolved
,
false
after_create
:ensure_
dir
_exist
after_create
:ensure_
storage_path
_exist
after_create
:create_project_feature
,
unless: :project_feature
after_create
:create_project_feature
,
unless: :project_feature
after_save
:update_project_statistics
,
if: :namespace_id_changed?
after_save
:update_project_statistics
,
if: :namespace_id_changed?
...
@@ -72,7 +72,7 @@ class Project < ActiveRecord::Base
...
@@ -72,7 +72,7 @@ class Project < ActiveRecord::Base
# Legacy Storage specific hooks
# Legacy Storage specific hooks
after_save
:ensure_
dir
_exist
,
if: :namespace_id_changed?
after_save
:ensure_
storage_path
_exist
,
if: :namespace_id_changed?
acts_as_taggable
acts_as_taggable
...
...
app/services/geo/move_repository_service.rb
View file @
c9ae679c
...
@@ -16,7 +16,7 @@ module Geo
...
@@ -16,7 +16,7 @@ module Geo
project
.
expire_caches_before_rename
(
old_path_with_namespace
)
project
.
expire_caches_before_rename
(
old_path_with_namespace
)
# Make sure target directory exists (used when transfering repositories)
# Make sure target directory exists (used when transfering repositories)
project
.
ensure_
dir
_exist
project
.
ensure_
storage_path
_exist
if
gitlab_shell
.
mv_repository
(
project
.
repository_storage_path
,
if
gitlab_shell
.
mv_repository
(
project
.
repository_storage_path
,
old_path_with_namespace
,
new_path_with_namespace
)
old_path_with_namespace
,
new_path_with_namespace
)
...
...
app/workers/geo_repository_create_worker.rb
View file @
c9ae679c
...
@@ -5,7 +5,7 @@ class GeoRepositoryCreateWorker
...
@@ -5,7 +5,7 @@ class GeoRepositoryCreateWorker
def
perform
(
id
)
def
perform
(
id
)
project
=
Project
.
find
(
id
)
project
=
Project
.
find
(
id
)
project
.
ensure_
dir
_exist
project
.
ensure_
storage_path
_exist
project
.
create_repository
unless
project
.
repository_exists?
||
project
.
import?
project
.
create_repository
unless
project
.
repository_exists?
||
project
.
import?
end
end
end
end
lib/backup/repository.rb
View file @
c9ae679c
...
@@ -75,7 +75,7 @@ module Backup
...
@@ -75,7 +75,7 @@ module Backup
path_to_project_repo
=
path_to_repo
(
project
)
path_to_project_repo
=
path_to_repo
(
project
)
path_to_project_bundle
=
path_to_bundle
(
project
)
path_to_project_bundle
=
path_to_bundle
(
project
)
project
.
ensure_
dir
_exist
project
.
ensure_
storage_path
_exist
cmd
=
if
File
.
exist?
(
path_to_project_bundle
)
cmd
=
if
File
.
exist?
(
path_to_project_bundle
)
%W(
#{
Gitlab
.
config
.
git
.
bin_path
}
clone --bare
#{
path_to_project_bundle
}
#{
path_to_project_repo
}
)
%W(
#{
Gitlab
.
config
.
git
.
bin_path
}
clone --bare
#{
path_to_project_bundle
}
#{
path_to_project_repo
}
)
...
...
spec/migrations/cleanup_namespaceless_pending_delete_projects_spec.rb
View file @
c9ae679c
...
@@ -4,7 +4,7 @@ require Rails.root.join('db', 'post_migrate', '20170502101023_cleanup_namespacel
...
@@ -4,7 +4,7 @@ require Rails.root.join('db', 'post_migrate', '20170502101023_cleanup_namespacel
describe
CleanupNamespacelessPendingDeleteProjects
do
describe
CleanupNamespacelessPendingDeleteProjects
do
before
do
before
do
# Stub after_save callbacks that will fail when Project has no namespace
# Stub after_save callbacks that will fail when Project has no namespace
allow_any_instance_of
(
Project
).
to
receive
(
:ensure_
dir
_exist
).
and_return
(
nil
)
allow_any_instance_of
(
Project
).
to
receive
(
:ensure_
storage_path
_exist
).
and_return
(
nil
)
allow_any_instance_of
(
Project
).
to
receive
(
:update_project_statistics
).
and_return
(
nil
)
allow_any_instance_of
(
Project
).
to
receive
(
:update_project_statistics
).
and_return
(
nil
)
end
end
...
...
spec/workers/namespaceless_project_destroy_worker_spec.rb
View file @
c9ae679c
...
@@ -5,7 +5,7 @@ describe NamespacelessProjectDestroyWorker do
...
@@ -5,7 +5,7 @@ describe NamespacelessProjectDestroyWorker do
before
do
before
do
# Stub after_save callbacks that will fail when Project has no namespace
# Stub after_save callbacks that will fail when Project has no namespace
allow_any_instance_of
(
Project
).
to
receive
(
:ensure_
dir
_exist
).
and_return
(
nil
)
allow_any_instance_of
(
Project
).
to
receive
(
:ensure_
storage_path
_exist
).
and_return
(
nil
)
allow_any_instance_of
(
Project
).
to
receive
(
:update_project_statistics
).
and_return
(
nil
)
allow_any_instance_of
(
Project
).
to
receive
(
:update_project_statistics
).
and_return
(
nil
)
end
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment