Skip to content

Commit 42ba8ef

Browse files
author
root
committed
Fix archive name in DownloadGitRevision
1 parent 79efb6c commit 42ba8ef

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

Diff for: app/services/download_git_revision.rb

+1-6
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ class DownloadGitRevision
44
attr_reader :repository
55
attr_reader :revision
66
attr_reader :format
7-
attr_reader :project
87
attr_reader :gitolite_repository_path
98

109
attr_reader :commit_valid
@@ -17,7 +16,6 @@ def initialize(repository, revision, format)
1716
@repository = repository
1817
@revision = revision
1918
@format = format
20-
@project = repository.project
2119
@gitolite_repository_path = repository.gitolite_repository_path
2220

2321
@commit_valid = false
@@ -74,9 +72,6 @@ def validate_revision
7472

7573

7674
def fill_data
77-
project_name = project.to_s.parameterize.to_s
78-
project_name = 'tarball' if project_name.length == 0
79-
8075
case format
8176
when 'tar' then
8277
extension = 'tar'
@@ -88,7 +83,7 @@ def fill_data
8883
extension = 'zip'
8984
@content_type = 'application/x-zip'
9085
end
91-
@filename = "#{project_name}-#{revision}.#{extension}"
86+
@filename = "#{repository.redmine_name}-#{revision}.#{extension}"
9287
end
9388

9489
end

0 commit comments

Comments
 (0)