2013-07-17 13:35:36 +01:00
|
|
|
json.project do
|
2014-01-21 04:51:49 +00:00
|
|
|
json.partial! 'project', project: @project
|
2016-03-20 09:24:23 +00:00
|
|
|
json.(@project, :ancestry, :default_branch, :is_package, :publish_i686_into_x86_64)
|
2012-09-05 14:47:25 +01:00
|
|
|
json.created_at @project.created_at.to_i
|
|
|
|
json.updated_at @project.updated_at.to_i
|
2014-01-21 04:51:49 +00:00
|
|
|
json.partial! 'api/v1/shared/owner', owner: @project.owner
|
2013-07-17 13:35:36 +01:00
|
|
|
json.maintainer do
|
2014-11-27 12:21:39 +00:00
|
|
|
if @project.maintainer
|
|
|
|
json.partial! 'api/v1/maintainers/maintainer', maintainer: @project.maintainer
|
|
|
|
end
|
2012-08-17 14:40:57 +01:00
|
|
|
end
|
2013-07-31 14:17:40 +01:00
|
|
|
|
|
|
|
json.project_statistics @project.project_statistics do |statistic|
|
|
|
|
json.(statistic, :average_build_time, :build_count, :arch_id)
|
|
|
|
end
|
|
|
|
|
2013-07-17 13:35:36 +01:00
|
|
|
json.repositories @project.repositories do |repo|
|
|
|
|
json.(repo, :id, :name)
|
2014-01-21 04:51:49 +00:00
|
|
|
json.url api_v1_repository_path(repo.name, format: :json)
|
2013-07-17 13:35:36 +01:00
|
|
|
json.platform do
|
|
|
|
json.(repo.platform, :id, :name)
|
2014-01-21 04:51:49 +00:00
|
|
|
json.url api_v1_platform_path(repo.platform, format: :json)
|
2012-10-08 13:47:02 +01:00
|
|
|
end
|
|
|
|
end
|
2012-10-17 11:35:33 +01:00
|
|
|
end
|