Sha256: 7f9600e21959370d82c4f3181d91f325f7d77862bc47ceca14b853d06b9b3047
Contents?: true
Size: 835 Bytes
Versions: 13
Compression:
Stored size: 835 Bytes
Contents
module Instrumental class Middleware class Rails23 < Stack def self.create if (defined?(::RAILS_VERSION) && const_get(:RAILS_VERSION).to_s =~ /^2\.3/) || (defined?(Rails) && Rails.respond_to?(:version) && Rails.version.to_s =~ /^2\.3/) new end end def install_middleware Rails.configuration.middleware.use Instrumental::Middleware end def log(msg) Rails.logger.error msg end def recognize_uri(request) params = ActionController::Routing::Routes.recognize_path(request.path, request.env.merge(:method => request.env["REQUEST_METHOD"].downcase.to_sym)) ["controller", params[:controller], params[:action]] rescue ActionController::RoutingError => e ["controller", "unknown"] end end end end
Version data entries
13 entries across 13 versions & 1 rubygems