Commit 348eb12598afb7f61b438da5e2240b709b17402f
1 parent
ad6bcb13
Exists in
master
and in
4 other branches
Provide a path to repo archive. gitlab_git up to 1.0.5
Showing
3 changed files
with
6 additions
and
4 deletions
Show diff stats
Gemfile
... | ... | @@ -24,7 +24,7 @@ gem 'omniauth-github' |
24 | 24 | # Extracting information from a git repository |
25 | 25 | # We cannot use original git since some bugs |
26 | 26 | gem "grit", '~> 2.5.0', git: 'https://github.com/gitlabhq/grit.git', ref: '42297cdcee16284d2e4eff23d41377f52fc28b9d' |
27 | -gem 'gitlab_git', '~> 1.0.4' | |
27 | +gem 'gitlab_git', '~> 1.0.5' | |
28 | 28 | |
29 | 29 | # Ruby/Rack Git Smart-HTTP Server Handler |
30 | 30 | gem 'gitlab-grack', '~> 1.0.0', require: 'grack' | ... | ... |
Gemfile.lock
... | ... | @@ -164,7 +164,7 @@ GEM |
164 | 164 | gitlab-pygments.rb (0.3.2) |
165 | 165 | posix-spawn (~> 0.3.6) |
166 | 166 | yajl-ruby (~> 1.1.0) |
167 | - gitlab_git (1.0.4) | |
167 | + gitlab_git (1.0.5) | |
168 | 168 | activesupport (~> 3.2.13) |
169 | 169 | github-linguist (~> 2.3.4) |
170 | 170 | grit (~> 2.5.0) |
... | ... | @@ -506,7 +506,7 @@ DEPENDENCIES |
506 | 506 | github-markup (~> 0.7.4) |
507 | 507 | gitlab-grack (~> 1.0.0) |
508 | 508 | gitlab-pygments.rb (~> 0.3.2) |
509 | - gitlab_git (~> 1.0.4) | |
509 | + gitlab_git (~> 1.0.5) | |
510 | 510 | gitlab_meta (= 5.0) |
511 | 511 | gitlab_omniauth-ldap (= 1.0.2) |
512 | 512 | gollum-lib (~> 1.0.0) | ... | ... |
app/controllers/repositories_controller.rb
... | ... | @@ -27,7 +27,9 @@ class RepositoriesController < ProjectResourceController |
27 | 27 | end |
28 | 28 | |
29 | 29 | |
30 | - file_path = @repository.archive_repo(params[:ref]) | |
30 | + storage_path = Rails.root.join("tmp", "repositories") | |
31 | + | |
32 | + file_path = @repository.archive_repo(params[:ref], storage_path) | |
31 | 33 | |
32 | 34 | if file_path |
33 | 35 | # Send file to user | ... | ... |