rosa-build/app/views/api/v1/projects/show.json.jbuilder

25 lines
869 B
Plaintext
Raw Normal View History

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)
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
json.maintainer do
2014-11-27 12:21:39 +00:00
if @project.maintainer
json.partial! 'api/v1/maintainers/maintainer', maintainer: @project.maintainer
end
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
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)
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
end