summaryrefslogtreecommitdiff
path: root/app/models/concerns
diff options
context:
space:
mode:
authorKamil Trzcinski <ayufan@ayufan.eu>2017-11-23 16:57:27 +0100
committerKamil Trzcinski <ayufan@ayufan.eu>2017-12-03 12:04:49 +0100
commit871de0f18581bb03fed5c0d800f8183598a0195f (patch)
tree5b5ac2aadd2a7d58f5e4c845ee85141ee96241a3 /app/models/concerns
parente2242cdf75d2734f78f694ab3191fcbb31947a6f (diff)
downloadgitlab-ce-871de0f18581bb03fed5c0d800f8183598a0195f.tar.gz
Rename artifacts_* to legacy_artifacts_*
Diffstat (limited to 'app/models/concerns')
-rw-r--r--app/models/concerns/artifact_migratable.rb14
1 files changed, 9 insertions, 5 deletions
diff --git a/app/models/concerns/artifact_migratable.rb b/app/models/concerns/artifact_migratable.rb
index 8e331617cfa..5c647bacf1b 100644
--- a/app/models/concerns/artifact_migratable.rb
+++ b/app/models/concerns/artifact_migratable.rb
@@ -3,11 +3,15 @@
# Meant to be prepended so the interface can stay the same
module ArtifactMigratable
def artifacts_file
- job_archive&.file || super
+ job_archive&.file || legacy_artifacts_file
+ end
+
+ def artifacts_file?
+ job_archive&.file? || legacy_artifacts_file?
end
def artifacts_metadata
- job_metadata&.file || super
+ job_metadata&.file || legacy_artifacts_metadata
end
def artifacts?
@@ -19,14 +23,14 @@ module ArtifactMigratable
end
def artifacts_file_changed?
- job_archive&.file_changed? || super
+ job_archive&.file_changed? || attribute_changed?(:artifacts_file)
end
def remove_artifacts_file!
if job_archive
job_archive.destroy
else
- super
+ remove_legacy_artifacts_file!
end
end
@@ -34,7 +38,7 @@ module ArtifactMigratable
if job_metadata
job_metadata.destroy
else
- super
+ remove_legacy_artifacts_metadata!
end
end