Provide a path to repo archive. gitlab_git up to 1.0.5

This commit is contained in:
Dmitriy Zaporozhets 2013-04-29 09:15:18 +03:00
parent ad6bcb1396
commit 348eb12598
3 changed files with 6 additions and 4 deletions

View File

@ -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'

View File

@ -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)

View File

@ -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