2012-08-08 14:02:51 +01:00
|
|
|
json.build_list do |json|
|
2012-08-17 15:01:10 +01:00
|
|
|
json.(@build_list, :id, :name, :container_path, :status, :duration)
|
2013-01-19 14:10:09 +00:00
|
|
|
json.(@build_list, :is_circle, :update_type, :priority, :new_core)
|
2012-10-04 16:38:33 +01:00
|
|
|
json.(@build_list, :advisory, :mass_build)
|
2012-12-04 10:40:05 +00:00
|
|
|
json.(@build_list, :auto_publish, :package_version, :commit_hash, :last_published_commit_hash)
|
2012-10-04 16:38:33 +01:00
|
|
|
json.build_log_url log_build_list_path(@build_list)
|
2012-08-17 15:01:10 +01:00
|
|
|
|
2012-10-04 16:30:31 +01:00
|
|
|
json.arch do |json_arch|
|
|
|
|
json_arch.(@build_list.arch, :id, :name)
|
|
|
|
end
|
2012-08-17 15:01:10 +01:00
|
|
|
json.created_at @build_list.created_at.to_i
|
|
|
|
json.updated_at @build_list.updated_at.to_i
|
|
|
|
|
|
|
|
json.project do |json_project|
|
2012-10-19 15:24:28 +01:00
|
|
|
json.partial! 'api/v1/projects/project',
|
|
|
|
:project => @build_list.project, :json => json_project
|
2012-08-17 15:01:10 +01:00
|
|
|
end
|
|
|
|
|
|
|
|
json.save_to_repository do |json_save_to_repository|
|
2012-10-19 15:24:28 +01:00
|
|
|
json.partial! 'api/v1/repositories/repository',
|
|
|
|
:repository => @build_list.save_to_repository,
|
|
|
|
:json => json_save_to_repository
|
2012-08-17 15:01:10 +01:00
|
|
|
|
|
|
|
json_save_to_repository.platform do |json_str_platform|
|
2012-10-19 15:24:28 +01:00
|
|
|
json.partial! 'api/v1/platforms/platform',
|
|
|
|
:platform => @build_list.save_to_repository.platform,
|
|
|
|
:json => json_str_platform
|
2012-08-17 15:01:10 +01:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
json.build_for_platform do |json_build_for_platform|
|
2012-10-19 15:24:28 +01:00
|
|
|
json.partial! 'api/v1/platforms/platform',
|
|
|
|
:platform => @build_list.build_for_platform,
|
|
|
|
:json => json_build_for_platform
|
2012-08-17 15:01:10 +01:00
|
|
|
end
|
|
|
|
|
2012-10-17 13:35:56 +01:00
|
|
|
json.partial! 'api/v1/shared/owner', :owner => @build_list.project.owner
|
2012-08-17 15:01:10 +01:00
|
|
|
|
|
|
|
inc_repos = Repository.includes(:platform).where(:id => @build_list.include_repos)
|
|
|
|
json.include_repos inc_repos do |json_include_repos, repo|
|
2012-10-19 15:24:28 +01:00
|
|
|
json.partial! 'api/v1/repositories/repository',
|
|
|
|
:repository => repo,
|
|
|
|
:json => json_include_repos
|
|
|
|
|
|
|
|
json_include_repos.platform do |json_str_platform|
|
|
|
|
json.partial! 'api/v1/platforms/platform',
|
|
|
|
:platform => repo.platform,
|
|
|
|
:json => json_str_platform
|
|
|
|
end
|
2012-08-17 15:01:10 +01:00
|
|
|
end
|
|
|
|
|
|
|
|
json.advisory do |json_advisory|
|
|
|
|
json_advisory.name @build_list.advisory.advisory_id
|
|
|
|
json_advisory.(@build_list.advisory, :description)
|
|
|
|
end if @build_list.advisory
|
|
|
|
|
|
|
|
json.mass_build do |json_mass_build|
|
|
|
|
json_mass_build.(@build_list.mass_build, :id, :name)
|
|
|
|
end if @build_list.mass_build
|
|
|
|
|
2012-08-08 14:02:51 +01:00
|
|
|
json.url api_v1_build_list_path(@build_list, :format => :json)
|
|
|
|
end
|