Refactor
This commit is contained in:
parent
473ddfb453
commit
6e36452e96
1 changed files with 6 additions and 6 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue