summaryrefslogtreecommitdiff
path: root/app/models/concerns
diff options
context:
space:
mode:
authorDouwe Maan <douwe@selenight.nl>2017-05-02 17:45:50 -0500
committerDouwe Maan <douwe@selenight.nl>2017-05-03 10:20:05 -0500
commit720cc14a754f1e528006c28fec4110f47297fd60 (patch)
treef4ef53efd8090aad6e49916b5287ff9c1085f3c1 /app/models/concerns
parent185fd98fd4cb8f920558aea3795c4e1774cd39f5 (diff)
downloadgitlab-ce-720cc14a754f1e528006c28fec4110f47297fd60.tar.gz
Refactor Blob support of external storage in preparation of job artifact blobsdm-blob-external-storage
Diffstat (limited to 'app/models/concerns')
-rw-r--r--app/models/concerns/blob_like.rb48
1 files changed, 48 insertions, 0 deletions
diff --git a/app/models/concerns/blob_like.rb b/app/models/concerns/blob_like.rb
new file mode 100644
index 00000000000..adb81561000
--- /dev/null
+++ b/app/models/concerns/blob_like.rb
@@ -0,0 +1,48 @@
+module BlobLike
+ extend ActiveSupport::Concern
+ include Linguist::BlobHelper
+
+ def id
+ raise NotImplementedError
+ end
+
+ def name
+ raise NotImplementedError
+ end
+
+ def path
+ raise NotImplementedError
+ end
+
+ def size
+ 0
+ end
+
+ def data
+ nil
+ end
+
+ def mode
+ nil
+ end
+
+ def binary?
+ false
+ end
+
+ def load_all_data!(repository)
+ # No-op
+ end
+
+ def truncated?
+ false
+ end
+
+ def external_storage
+ nil
+ end
+
+ def external_size
+ nil
+ end
+end