Sha256: 94c25aa932f338aee60313408101c87420adec880bbd92e5c88c4ef8857c9aa8
Contents?: true
Size: 1.21 KB
Versions: 20
Compression:
Stored size: 1.21 KB
Contents
module Skylight module Normalizers module ActionController enabled = true # Temporary hacks begin require "action_dispatch/http/mime_type" require "action_dispatch/http/mime_types" require "rack/utils" rescue LoadError enabled = false end if enabled class SendFile < Normalizer register "send_file.action_controller" CAT = "app.controller.send_file".freeze TITLE = "send file".freeze def normalize(_trace, _name, _payload) title = TITLE # depending on normalization, we probably want this to eventually # include the full path, but we need to make sure we have a good # deduping strategy first. desc = nil [CAT, title, desc] end private OCTET_STREAM = "application/octet-stream".freeze ATTACHMENT = "attachment".freeze def initialize(*) super @mimes = Mime::SET.each_with_object({}) do |mime, hash| hash[mime.symbol] = mime.to_s.dup.freeze hash end end end end end end end
Version data entries
20 entries across 20 versions & 1 rubygems