From dec420feb39975fefd15460f372369071c346d53 Mon Sep 17 00:00:00 2001 From: Phil Hughes Date: Mon, 11 Dec 2017 16:22:22 +0000 Subject: fixed project homepage not having correct variable --- lib/extracts_path.rb | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/extracts_path.rb') diff --git a/lib/extracts_path.rb b/lib/extracts_path.rb index 721ed97bb6b..bab46281922 100644 --- a/lib/extracts_path.rb +++ b/lib/extracts_path.rb @@ -128,6 +128,9 @@ module ExtractsPath @hex_path = Digest::SHA1.hexdigest(@path) @logs_path = logs_file_project_ref_path(@project, @ref, @path) + blob_ids = tree.blobs.map(&:id) + @lfs_blobs = Gitlab::Git::Blob.batch_lfs_pointers(@repo, blob_ids) + rescue RuntimeError, NoMethodError, InvalidPathError render_404 end -- cgit v1.2.3 From 7d2affeff1885fb9984fed1088c8dffdc41a7320 Mon Sep 17 00:00:00 2001 From: Phil Hughes Date: Thu, 14 Dec 2017 10:10:20 +0000 Subject: moved lfs blob fetch from extractspath file --- lib/extracts_path.rb | 4 ---- 1 file changed, 4 deletions(-) (limited to 'lib/extracts_path.rb') diff --git a/lib/extracts_path.rb b/lib/extracts_path.rb index bab46281922..f576ef74603 100644 --- a/lib/extracts_path.rb +++ b/lib/extracts_path.rb @@ -127,10 +127,6 @@ module ExtractsPath @hex_path = Digest::SHA1.hexdigest(@path) @logs_path = logs_file_project_ref_path(@project, @ref, @path) - - blob_ids = tree.blobs.map(&:id) - @lfs_blobs = Gitlab::Git::Blob.batch_lfs_pointers(@repo, blob_ids) - rescue RuntimeError, NoMethodError, InvalidPathError render_404 end -- cgit v1.2.3 From cbd3ce8f41fc5691a1d23aca0ffe3221ab5d26af Mon Sep 17 00:00:00 2001 From: Phil Hughes Date: Thu, 14 Dec 2017 11:59:01 +0000 Subject: moved lfs_blob_ids method into ExtractsPath module --- lib/extracts_path.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib/extracts_path.rb') diff --git a/lib/extracts_path.rb b/lib/extracts_path.rb index f576ef74603..27c712a84d4 100644 --- a/lib/extracts_path.rb +++ b/lib/extracts_path.rb @@ -135,6 +135,11 @@ module ExtractsPath @tree ||= @repo.tree(@commit.id, @path) end + def lfs_blob_ids + blob_ids = tree.blobs.map(&:id) + @lfs_blob_ids = Gitlab::Git::Blob.batch_lfs_pointers(@project.repository, blob_ids).map(&:id) + end + private # overriden in subclasses, do not remove -- cgit v1.2.3