Revert "Revert "instrument responders""
This reverts commit 01ec5e152a
.
This commit is contained in:
parent
01ec5e152a
commit
de9348a14e
|
@ -44,6 +44,7 @@ module Travis::Api::App::Responders
|
|||
super && resource.is_a?(ActiveRecord::Relation) && resource.first.is_a?(Build)
|
||||
end
|
||||
|
||||
instrument_method
|
||||
def apply
|
||||
super
|
||||
|
||||
|
|
|
@ -4,6 +4,7 @@ module Travis::Api::App::Responders
|
|||
'svg'
|
||||
end
|
||||
|
||||
instrument_method
|
||||
def apply
|
||||
set_headers
|
||||
send_file(filename, type: :svg, last_modified: last_modified)
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
module Travis::Api::App::Responders
|
||||
class Base
|
||||
include Skylight::Helpers
|
||||
attr_reader :endpoint, :resource, :options
|
||||
|
||||
def initialize(endpoint, resource, options = {})
|
||||
|
|
|
@ -10,6 +10,7 @@ module Travis::Api::App::Responders
|
|||
headers['Content-Disposition'] = %(inline; filename="#{File.basename(filename)}")
|
||||
end
|
||||
|
||||
instrument_method
|
||||
def apply
|
||||
set_headers
|
||||
send_file(filename, type: :png, last_modified: last_modified)
|
||||
|
|
|
@ -7,6 +7,7 @@ class Travis::Api::App
|
|||
super && !resource.is_a?(String) && !resource.nil? && accepts_log?
|
||||
end
|
||||
|
||||
instrument_method
|
||||
def apply
|
||||
super
|
||||
|
||||
|
|
|
@ -13,6 +13,7 @@ module Travis::Api::App::Responders
|
|||
super && (resource.is_a?(Log) || resource.is_a?(String))
|
||||
end
|
||||
|
||||
instrument_method
|
||||
def apply
|
||||
super
|
||||
|
||||
|
|
|
@ -10,6 +10,7 @@ module Travis::Api
|
|||
resource.respond_to?(:run)
|
||||
end
|
||||
|
||||
instrument_method
|
||||
def apply
|
||||
cache_control
|
||||
result = normalize(resource.run)
|
||||
|
|
|
@ -37,6 +37,7 @@ module Travis::Api::App::Responders
|
|||
super && @resource.first.is_a?(Repository)
|
||||
end
|
||||
|
||||
instrument_method
|
||||
def apply
|
||||
super
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user