rosa-build/app/models/project/has_repository.rb

15 lines
318 B
Ruby
Raw Normal View History

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)
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')
end
2011-03-10 13:38:50 +00:00
end