Skip to content
Snippets Groups Projects
Select Git revision
20 results

rack_middleware_spec.rb

Blame
Forked from GitLab.org / GitLab FOSS
Source project has a limited visibility.
  • Paco Guzman's avatar
    509082ba
    Instrument Grape Endpoint with Metrics::RackMiddleware · 509082ba
    Paco Guzman authored
    Generating the following tags
    
    Grape#GET /projects/:id/archive
    
    from Grape::Route objects like
    
    { :path => /:version/projects/:id/archive(.:format)
      :version => “v3”,
      :method => “GET” }
    
    Use an instance variable to cache raw_path transformations.
    This variable is only going to growth to the number of 
    endpoints of the API, not with exact different requests
    
    We can store this cache as an instance variable because 
    middleware are initialised only once
    509082ba
    History
    Instrument Grape Endpoint with Metrics::RackMiddleware
    Paco Guzman authored
    Generating the following tags
    
    Grape#GET /projects/:id/archive
    
    from Grape::Route objects like
    
    { :path => /:version/projects/:id/archive(.:format)
      :version => “v3”,
      :method => “GET” }
    
    Use an instance variable to cache raw_path transformations.
    This variable is only going to growth to the number of 
    endpoints of the API, not with exact different requests
    
    We can store this cache as an instance variable because 
    middleware are initialised only once