rails_performance 1.0.5 → 1.0.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 437c85fdb48db55caa5da3b41a7b0344d05e27094637cca6f3e8f28f8a15d284
4
- data.tar.gz: c4bf8df35605e2cef8de589be79cde872d1a5d5210883140855eb0cf877562d7
3
+ metadata.gz: 16944d271c265950a6ae9af433eb09952b6dc57926ed16e90c66c74b41127621
4
+ data.tar.gz: e95b62049ce646554b3b034ed859b05ecea24027a9dcbcb4e077e0e707edace8
5
5
  SHA512:
6
- metadata.gz: e54cd14676bde4b86de76a1cc73b482f51dfa9cd7529a658b70bec638e7f0d7eae1af22d60d00e959fbfbd4f3912cce2f6a5c545e8358c949bd0ba0c844e633e
7
- data.tar.gz: 7c459ccf377434021fc0d2a4348e95e49ea9ef4e741cc7d768e8f9185121bf7fe36c0cd0b6475aa03fd208cb518f764467880542eb38d994baa8484810e5074f
6
+ metadata.gz: 8b97df87dfff3097e8ec6f81ab328dd9da4b866b8fa7bcba9f6af0825f0f81dcabef02ae42d6350bb4e814a18a6dd3ef95bfa0bb43eabb1854523c32c7a2ded2
7
+ data.tar.gz: ff22cd674271a832430a0f485b37db88e05ee9c7f9cb742f960365cba56b729ebc791465cc20e5e84e63466952fbea183ba7e9bb7cc5b6b58170b795af37e9f7
data/README.md CHANGED
@@ -135,6 +135,13 @@ Rails.application.routes.draw do
135
135
  end
136
136
  ```
137
137
 
138
+ ### Custom data
139
+
140
+ You need to configure `config.custom_data_proc`. And you can capture current_user, HTTP User Agent, etc. This proc is executed inside middleware, and you have access to Rack "env".
141
+
142
+ ![Custom Data](docs/custom_data.png)
143
+
144
+
138
145
  ### Custom events
139
146
 
140
147
  ```ruby
data/config/routes.rb CHANGED
@@ -1,6 +1,4 @@
1
1
  RailsPerformance::Engine.routes.draw do
2
- devise_for :users
3
-
4
2
  get '/' => 'rails_performance#index', as: :rails_performance
5
3
 
6
4
  get '/requests' => 'rails_performance#requests', as: :rails_performance_requests
@@ -1,4 +1,4 @@
1
1
  module RailsPerformance
2
- VERSION = '1.0.5'
2
+ VERSION = '1.0.5.2'
3
3
  SCHEMA = '1.0.1'
4
4
  end
@@ -79,7 +79,7 @@ module RailsPerformance
79
79
 
80
80
  # add custom payload to the request
81
81
  mattr_accessor :custom_data_proc
82
- @@custom_data_proc = []
82
+ @@custom_data_proc = nil
83
83
 
84
84
  def RailsPerformance.setup
85
85
  yield(self)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_performance
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.5
4
+ version: 1.0.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Igor Kasyanchuk
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-04-01 00:00:00.000000000 Z
11
+ date: 2023-04-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails