add job renderer

This commit is contained in:
Konstantin Haase 2015-05-27 15:17:26 +02:00
parent be64e36102
commit 2455cf3c42

View File

@ -0,0 +1,15 @@
require 'travis/api/v3/renderer/model_renderer'
module Travis::API::V3
class Renderer::Build < Renderer::ModelRenderer
representation(:minimal, :id, :number, :state, :duration, :started_at, :finished_at, :allow_failure, :queue)
representation(:standard, *representations[:minimal], :repository, :build, :commit)
def queue
{
:@type => 'queue'.freeze,
:name => model.queue
}
end
end
end