diff options
| author | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-06-10 22:06:30 +0200 |
|---|---|---|
| committer | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-06-10 22:06:30 +0200 |
| commit | d5fac1ced3daa33a7275aff9a4be88a741ee78c9 (patch) | |
| tree | 06c308909f91d19de4c35946a678cb56b055f8e9 /lib/api/helpers.rb | |
| parent | 2fd009d23810939a77ddc1716ab4250ee18826fa (diff) | |
| parent | b4e84809e8170a43126507da0bc6a3b94c33804b (diff) | |
| download | gitlab-ce-d5fac1ced3daa33a7275aff9a4be88a741ee78c9.tar.gz | |
Merge remote-tracking branch 'origin/master' into retry-spinach-tests
Diffstat (limited to 'lib/api/helpers.rb')
| -rw-r--r-- | lib/api/helpers.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/api/helpers.rb b/lib/api/helpers.rb index 2aaa0557ea3..e1d3bbcc02d 100644 --- a/lib/api/helpers.rb +++ b/lib/api/helpers.rb @@ -408,5 +408,15 @@ module API error!(errors[:access_level], 422) if errors[:access_level].any? not_found!(errors) end + + def send_git_blob(repository, blob) + env['api.format'] = :txt + content_type 'text/plain' + header(*Gitlab::Workhorse.send_git_blob(repository, blob)) + end + + def send_git_archive(repository, ref:, format:) + header(*Gitlab::Workhorse.send_git_archive(repository, ref: ref, format: format)) + end end end |
