Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
heptapod
heptapod
Commits
e123b0998cd5
Commit
597e6190
authored
Aug 01, 2017
by
Gabriel Mazetto
Browse files
Rename ensure_dir_exist -> ensure_storage_path_exist
parent
35b032f462b9
Changes
5
Show whitespace changes
Inline
Side-by-side
app/models/concerns/storage/legacy_project.rb
View file @
e123b099
...
@@ -6,7 +6,7 @@ def disk_path
...
@@ -6,7 +6,7 @@ def disk_path
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 @
e123b099
...
@@ -44,7 +44,7 @@ class Project < ActiveRecord::Base
...
@@ -44,7 +44,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?
...
@@ -69,7 +69,7 @@ def set_last_repository_updated_at
...
@@ -69,7 +69,7 @@ def set_last_repository_updated_at
# 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
...
...
lib/backup/repository.rb
View file @
e123b099
...
@@ -75,7 +75,7 @@ def restore
...
@@ -75,7 +75,7 @@ def restore
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 @
e123b099
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
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 @
e123b099
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
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