Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Kozono <mkozono@gmail.com>2017-11-24 11:52:16 +0300
committerMichael Kozono <mkozono@gmail.com>2017-12-02 02:26:42 +0300
commit6e36452e96139658ff8eae88209710438dd14eba (patch)
treebf746012995ddc5cc8edc79d95696952e6be60ae
parent473ddfb453d820f1a32fb48477e17ba45bdbd2f0 (diff)
Refactor
-rw-r--r--lib/gitlab/background_migration/populate_untracked_uploads.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/gitlab/background_migration/populate_untracked_uploads.rb b/lib/gitlab/background_migration/populate_untracked_uploads.rb
index 50ec2260c60..f06b4ac1940 100644
--- a/lib/gitlab/background_migration/populate_untracked_uploads.rb
+++ b/lib/gitlab/background_migration/populate_untracked_uploads.rb
@@ -98,12 +98,6 @@ module Gitlab
Digest::SHA256.file(absolute_path).hexdigest
end
- # Not including a leading slash
- def path_relative_to_upload_dir
- base = %r{\A#{Regexp.escape(Gitlab::BackgroundMigration::PrepareUntrackedUploads::RELATIVE_UPLOAD_DIR)}/}
- @path_relative_to_upload_dir ||= path.sub(base, '')
- end
-
private
def matching_pattern_map
@@ -127,6 +121,12 @@ module Gitlab
project.id
end
+ # Not including a leading slash
+ def path_relative_to_upload_dir
+ base = %r{\A#{Regexp.escape(Gitlab::BackgroundMigration::PrepareUntrackedUploads::RELATIVE_UPLOAD_DIR)}/}
+ @path_relative_to_upload_dir ||= path.sub(base, '')
+ end
+
def absolute_path
File.join(CarrierWave.root, path)
end