Welcome to mirror list, hosted at ThFree Co, Russian Federation.

uploads.rb « verify « gitlab « lib - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 0ffa71a6d724d683eff044641c8e20f191a327c8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
module Gitlab
  module Verify
    class Uploads < BatchVerifier
      def name
        'Uploads'
      end

      def describe(object)
        "Upload: #{object.id}"
      end

      private

      def relation
        Upload.with_files_stored_locally
      end

      def expected_checksum(upload)
        upload.checksum
      end

      def actual_checksum(upload)
        Upload.hexdigest(upload.absolute_path)
      end
    end
  end
end