travis-api/lib/travis/api/app/responders/badge.rb
2014-03-19 15:05:11 +01:00

21 lines
341 B
Ruby

module Travis::Api::App::Responders
class Badge < Image
def format
'svg'
end
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