2011-03-10 12:38:42 +00:00
|
|
|
module Project::HasRepository
|
|
|
|
|
|
|
|
def self.included(model)
|
|
|
|
end
|
|
|
|
|
|
|
|
def git_repository
|
2011-03-10 14:27:05 +00:00
|
|
|
@repository ||= Git::Repository.new(git_repo_path)
|
2011-03-10 12:38:42 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
protected
|
|
|
|
def git_repo_path
|
2011-03-10 13:38:50 +00:00
|
|
|
@git_repo_path ||= File.join(APP_CONFIG['root_path'], platform.unixname, project.unixname, project.unixname + '.git')
|
2011-03-10 12:38:42 +00:00
|
|
|
end
|
2011-03-10 13:38:50 +00:00
|
|
|
end
|