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:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-02-18 12:45:46 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-02-18 12:45:46 +0300
commita7b3560714b4d9cc4ab32dffcd1f74a284b93580 (patch)
tree7452bd5c3545c2fa67a28aa013835fb4fa071baf /app/models/dependency_proxy
parentee9173579ae56a3dbfe5afe9f9410c65bb327ca7 (diff)
Add latest changes from gitlab-org/gitlab@14-8-stable-eev14.8.0-rc42
Diffstat (limited to 'app/models/dependency_proxy')
-rw-r--r--app/models/dependency_proxy/blob.rb4
-rw-r--r--app/models/dependency_proxy/manifest.rb3
2 files changed, 7 insertions, 0 deletions
diff --git a/app/models/dependency_proxy/blob.rb b/app/models/dependency_proxy/blob.rb
index e4018ab4770..f7b08f1d077 100644
--- a/app/models/dependency_proxy/blob.rb
+++ b/app/models/dependency_proxy/blob.rb
@@ -14,6 +14,8 @@ class DependencyProxy::Blob < ApplicationRecord
validates :file, presence: true
validates :file_name, presence: true
+ scope :with_files_stored_locally, -> { where(file_store: ::DependencyProxy::FileUploader::Store::LOCAL) }
+
mount_file_store_uploader DependencyProxy::FileUploader
def self.total_size
@@ -24,3 +26,5 @@ class DependencyProxy::Blob < ApplicationRecord
find_or_initialize_by(file_name: file_name)
end
end
+
+DependencyProxy::Blob.prepend_mod_with('DependencyProxy::Blob')
diff --git a/app/models/dependency_proxy/manifest.rb b/app/models/dependency_proxy/manifest.rb
index fe887c99e81..c2587ffac9d 100644
--- a/app/models/dependency_proxy/manifest.rb
+++ b/app/models/dependency_proxy/manifest.rb
@@ -17,6 +17,7 @@ class DependencyProxy::Manifest < ApplicationRecord
validates :digest, presence: true
scope :order_id_desc, -> { reorder(id: :desc) }
+ scope :with_files_stored_locally, -> { where(file_store: ::DependencyProxy::FileUploader::Store::LOCAL) }
mount_file_store_uploader DependencyProxy::FileUploader
@@ -24,3 +25,5 @@ class DependencyProxy::Manifest < ApplicationRecord
find_by(file_name: file_name) || find_by(digest: digest)
end
end
+
+DependencyProxy::Manifest.prepend_mod_with('DependencyProxy::Manifest')