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

workhorse.rb « gitlab « lib - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: a23120a41769cdb888d1bf49cb3d55974378ba06 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
require 'base64'
require 'json'

module Gitlab
  class Workhorse
    class << self
      def send_git_blob(repository, blob)
        params_hash = {
          'RepoPath' => repository.path_to_repo,
          'BlobId' => blob.id,
        }
        params = Base64.urlsafe_encode64(JSON.dump(params_hash))

        [
          'Gitlab-Workhorse-Send-Data',
          "git-blob:#{params}",
        ]
      end
    end
  end
end