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,7 +24,7 @@ gem 'omniauth-github' | ||
24 | # Extracting information from a git repository | 24 | # Extracting information from a git repository |
25 | # We cannot use original git since some bugs | 25 | # We cannot use original git since some bugs |
26 | gem "grit", '~> 2.5.0', git: 'https://github.com/gitlabhq/grit.git', ref: '42297cdcee16284d2e4eff23d41377f52fc28b9d' | 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 | # Ruby/Rack Git Smart-HTTP Server Handler | 29 | # Ruby/Rack Git Smart-HTTP Server Handler |
30 | gem 'gitlab-grack', '~> 1.0.0', require: 'grack' | 30 | gem 'gitlab-grack', '~> 1.0.0', require: 'grack' |
Gemfile.lock
@@ -164,7 +164,7 @@ GEM | @@ -164,7 +164,7 @@ GEM | ||
164 | gitlab-pygments.rb (0.3.2) | 164 | gitlab-pygments.rb (0.3.2) |
165 | posix-spawn (~> 0.3.6) | 165 | posix-spawn (~> 0.3.6) |
166 | yajl-ruby (~> 1.1.0) | 166 | yajl-ruby (~> 1.1.0) |
167 | - gitlab_git (1.0.4) | 167 | + gitlab_git (1.0.5) |
168 | activesupport (~> 3.2.13) | 168 | activesupport (~> 3.2.13) |
169 | github-linguist (~> 2.3.4) | 169 | github-linguist (~> 2.3.4) |
170 | grit (~> 2.5.0) | 170 | grit (~> 2.5.0) |
@@ -506,7 +506,7 @@ DEPENDENCIES | @@ -506,7 +506,7 @@ DEPENDENCIES | ||
506 | github-markup (~> 0.7.4) | 506 | github-markup (~> 0.7.4) |
507 | gitlab-grack (~> 1.0.0) | 507 | gitlab-grack (~> 1.0.0) |
508 | gitlab-pygments.rb (~> 0.3.2) | 508 | gitlab-pygments.rb (~> 0.3.2) |
509 | - gitlab_git (~> 1.0.4) | 509 | + gitlab_git (~> 1.0.5) |
510 | gitlab_meta (= 5.0) | 510 | gitlab_meta (= 5.0) |
511 | gitlab_omniauth-ldap (= 1.0.2) | 511 | gitlab_omniauth-ldap (= 1.0.2) |
512 | gollum-lib (~> 1.0.0) | 512 | gollum-lib (~> 1.0.0) |
app/controllers/repositories_controller.rb
@@ -27,7 +27,9 @@ class RepositoriesController < ProjectResourceController | @@ -27,7 +27,9 @@ class RepositoriesController < ProjectResourceController | ||
27 | end | 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 | if file_path | 34 | if file_path |
33 | # Send file to user | 35 | # Send file to user |