travis-api/lib/travis/api/app/responders/badge.rb
Konstantin Haase de9348a14e Revert "Revert "instrument responders""
This reverts commit 01ec5e152a.
2015-01-14 19:41:37 +01:00

22 lines
363 B
Ruby

module Travis::Api::App::Responders
class Badge < Image
def format
'svg'
end
instrument_method
def apply
set_headers
send_file(filename, type: :svg, last_modified: last_modified)
end
def content_type
"image/svg+xml"
end
def filename
"#{root}/public/images/result/#{result}.svg"
end
end
end