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

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouwe Maan <douwe@selenight.nl>2016-06-06 14:16:30 +0300
committerDouwe Maan <douwe@selenight.nl>2016-06-06 14:16:30 +0300
commit8c3ba8d6c9021f250fb1597f6b597d817af46b38 (patch)
tree0282f6ce75ad214634839ab04cc1f111af06cd35 /lib/gitlab/workhorse.rb
parent3cb69f0c0b0049426e6abad0914812a9eef87b04 (diff)
Add workhorse controller and API helpers
Diffstat (limited to 'lib/gitlab/workhorse.rb')
-rw-r--r--lib/gitlab/workhorse.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/gitlab/workhorse.rb b/lib/gitlab/workhorse.rb
index c3ddd4c2680..96e99dc0088 100644
--- a/lib/gitlab/workhorse.rb
+++ b/lib/gitlab/workhorse.rb
@@ -18,10 +18,10 @@ module Gitlab
]
end
- def send_git_archive(project, ref, format)
+ def send_git_archive(repository, ref:, format:)
format ||= 'tar.gz'
format.downcase!
- params = project.repository.archive_metadata(ref, Gitlab.config.gitlab.repository_downloads_path, format)
+ params = repository.archive_metadata(ref, Gitlab.config.gitlab.repository_downloads_path, format)
raise "Repository or ref not found" if params.empty?
[
@@ -29,9 +29,9 @@ module Gitlab
"git-archive:#{encode(params)}",
]
end
-
+
protected
-
+
def encode(hash)
Base64.urlsafe_encode64(JSON.dump(hash))
end