18 lines
865 B
Ruby
18 lines
865 B
Ruby
json.project do |json|
|
|
json.partial! 'project', :project => @project, :json => json
|
|
json.(@project, :visibility, :description, :ancestry, :has_issues, :has_wiki, :default_branch, :is_package, :average_build_time)
|
|
json.created_at @project.created_at.to_i
|
|
json.updated_at @project.updated_at.to_i
|
|
json.partial! 'api/v1/shared/owner', :owner => @project.owner
|
|
json.maintainer do |json_maintainer|
|
|
json.partial! 'api/v1/shared/member', :member => @project.maintainer, :tag => json_maintainer
|
|
end
|
|
json.repositories @project.repositories do |json_repos, repo|
|
|
json_repos.(repo, :id, :name)
|
|
json_repos.url api_v1_repository_path(repo.name, :format => :json)
|
|
json_repos.platform do |json_platform|
|
|
json_platform.(repo.platform, :id, :name)
|
|
json_platform.url api_v1_platform_path(repo.platform, :format => :json)
|
|
end
|
|
end
|
|
end |