From 348eb12598afb7f61b438da5e2240b709b17402f Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Mon, 29 Apr 2013 09:15:18 +0300 Subject: [PATCH] Provide a path to repo archive. gitlab_git up to 1.0.5 --- Gemfile | 2 +- Gemfile.lock | 4 ++-- app/controllers/repositories_controller.rb | 4 +++- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Gemfile b/Gemfile index d790e515afe..2f0575e93ca 100644 --- a/Gemfile +++ b/Gemfile @@ -24,7 +24,7 @@ gem 'omniauth-github' # Extracting information from a git repository # We cannot use original git since some bugs gem "grit", '~> 2.5.0', git: 'https://github.com/gitlabhq/grit.git', ref: '42297cdcee16284d2e4eff23d41377f52fc28b9d' -gem 'gitlab_git', '~> 1.0.4' +gem 'gitlab_git', '~> 1.0.5' # Ruby/Rack Git Smart-HTTP Server Handler gem 'gitlab-grack', '~> 1.0.0', require: 'grack' diff --git a/Gemfile.lock b/Gemfile.lock index a70b3c7e09a..64d351a1f98 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -164,7 +164,7 @@ GEM gitlab-pygments.rb (0.3.2) posix-spawn (~> 0.3.6) yajl-ruby (~> 1.1.0) - gitlab_git (1.0.4) + gitlab_git (1.0.5) activesupport (~> 3.2.13) github-linguist (~> 2.3.4) grit (~> 2.5.0) @@ -506,7 +506,7 @@ DEPENDENCIES github-markup (~> 0.7.4) gitlab-grack (~> 1.0.0) gitlab-pygments.rb (~> 0.3.2) - gitlab_git (~> 1.0.4) + gitlab_git (~> 1.0.5) gitlab_meta (= 5.0) gitlab_omniauth-ldap (= 1.0.2) gollum-lib (~> 1.0.0) diff --git a/app/controllers/repositories_controller.rb b/app/controllers/repositories_controller.rb index 6fba2518306..a7d393af82b 100644 --- a/app/controllers/repositories_controller.rb +++ b/app/controllers/repositories_controller.rb @@ -27,7 +27,9 @@ class RepositoriesController < ProjectResourceController end - file_path = @repository.archive_repo(params[:ref]) + storage_path = Rails.root.join("tmp", "repositories") + + file_path = @repository.archive_repo(params[:ref], storage_path) if file_path # Send file to user