summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBob Van Landuyt <bob@vanlanduyt.co>2019-06-11 16:11:21 +0200
committerBob Van Landuyt <bob@vanlanduyt.co>2019-06-11 16:11:21 +0200
commitc70f7ec77bdf8469bcb64ba3b235d68320280b9c (patch)
treed386f5e431f68c95b5a83478755ee542b7859a4e
parent0899537e2d3bd4b481bd71c04a0186108ad9c39f (diff)
downloadgitlab-ce-c70f7ec77bdf8469bcb64ba3b235d68320280b9c.tar.gz
Rename `BatchCommitLoader` to `BatchLfsOidLoader`
Since we're not actually loading commits in that loader, but we're loading blobs with LFS oids in batch and returning only the oids.
-rw-r--r--app/graphql/types/tree/blob_type.rb2
-rw-r--r--lib/gitlab/graphql/loaders/batch_lfs_oid_loader.rb (renamed from lib/gitlab/graphql/loaders/batch_commit_loader.rb)2
-rw-r--r--spec/lib/gitlab/graphql/loaders/batch_lfs_oid_loader_spec.rb (renamed from spec/lib/gitlab/graphql/loaders/batch_commit_loader_spec.rb)2
3 files changed, 3 insertions, 3 deletions
diff --git a/app/graphql/types/tree/blob_type.rb b/app/graphql/types/tree/blob_type.rb
index ba191b59132..760781f3612 100644
--- a/app/graphql/types/tree/blob_type.rb
+++ b/app/graphql/types/tree/blob_type.rb
@@ -10,7 +10,7 @@ module Types
field :web_url, GraphQL::STRING_TYPE, null: true
field :lfs_oid, GraphQL::STRING_TYPE, null: true, resolve: -> (blob, args, ctx) do
- Gitlab::Graphql::Loaders::BatchCommitLoader.new(blob.repository, blob.id).find
+ Gitlab::Graphql::Loaders::BatchLfsOidLoader.new(blob.repository, blob.id).find
end
end
end
diff --git a/lib/gitlab/graphql/loaders/batch_commit_loader.rb b/lib/gitlab/graphql/loaders/batch_lfs_oid_loader.rb
index f410c3195f8..8f34e58a771 100644
--- a/lib/gitlab/graphql/loaders/batch_commit_loader.rb
+++ b/lib/gitlab/graphql/loaders/batch_lfs_oid_loader.rb
@@ -3,7 +3,7 @@
module Gitlab
module Graphql
module Loaders
- class BatchCommitLoader
+ class BatchLfsOidLoader
def initialize(repository, blob_id)
@repository, @blob_id = repository, blob_id
end
diff --git a/spec/lib/gitlab/graphql/loaders/batch_commit_loader_spec.rb b/spec/lib/gitlab/graphql/loaders/batch_lfs_oid_loader_spec.rb
index 0137b1029cd..46dd1777285 100644
--- a/spec/lib/gitlab/graphql/loaders/batch_commit_loader_spec.rb
+++ b/spec/lib/gitlab/graphql/loaders/batch_lfs_oid_loader_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-describe Gitlab::Graphql::Loaders::BatchCommitLoader do
+describe Gitlab::Graphql::Loaders::BatchLfsOidLoader do
include GraphqlHelpers
set(:project) { create(:project, :repository) }