1. Improved admin -> new project form

2. Fixed bug: post-receive file was not added when create project via admin
This commit is contained in:
Dmitriy Zaporozhets 2012-04-17 20:27:18 +03:00
parent f1795a4911
commit 3250a024ef
6 changed files with 20 additions and 8 deletions

View file

@ -47,6 +47,11 @@ module Project::RepositoryTrait
File.chmod(0775, hook_file)
end
def has_post_receive_file?
hook_file = File.join(path_to_repo, 'hooks', 'post-receive')
File.exists?(hook_file)
end
def tags
repo.tags.map(&:name).sort.reverse
end