prosopite 1.0.7 → 1.0.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +1 -1
- data/Gemfile.lock +1 -1
- data/README.md +4 -4
- data/lib/prosopite/version.rb +1 -1
- data/lib/prosopite.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1af17b69a330a3d3f6671044a52767af5f93c6245c24f8f690320bf70b863b5f
|
4
|
+
data.tar.gz: 3abb664fad375de93c92f909e42bcc68d89287271b9be57d85a1c1f9cb561cba
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: acdecfb19aff6229c9ec15dd62794b786caf21e30a96d5c8a0038412b1805938217f70380d7501054721f8a716ff40c883b12d21e888befcf434f6a503d2cf99
|
7
|
+
data.tar.gz: 5d71d8b945b92e3db0a3f9993217ab85a363b5e259134f95be03bb214e8ffdb9bd9e814983104571e698dcb1863f9bb9e3ec89bf0246ebdfbc8d15c75fa9a3b9
|
data/.github/workflows/ci.yml
CHANGED
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -128,7 +128,7 @@ Prosopite auto-detection can be enabled on all controllers:
|
|
128
128
|
class ApplicationController < ActionController::Base
|
129
129
|
unless Rails.env.production?
|
130
130
|
around_action :n_plus_one_detection
|
131
|
-
|
131
|
+
|
132
132
|
def n_plus_one_detection
|
133
133
|
Prosopite.scan
|
134
134
|
yield
|
@@ -179,10 +179,10 @@ WARNING: scan/finish should run before/after **each** test and NOT before/after
|
|
179
179
|
|
180
180
|
## Allow list
|
181
181
|
|
182
|
-
Ignore notifications for call stacks containing one or more substrings:
|
182
|
+
Ignore notifications for call stacks containing one or more substrings / regex:
|
183
183
|
|
184
184
|
```ruby
|
185
|
-
Prosopite.allow_stack_paths = ['substring_in_call_stack']
|
185
|
+
Prosopite.allow_stack_paths = ['substring_in_call_stack', /regex/]
|
186
186
|
```
|
187
187
|
|
188
188
|
Ignore notifications matching a specific SQL query:
|
@@ -201,7 +201,7 @@ Prosopite.scan
|
|
201
201
|
Prosopite.finish
|
202
202
|
```
|
203
203
|
|
204
|
-
or
|
204
|
+
or
|
205
205
|
|
206
206
|
```ruby
|
207
207
|
Prosopite.scan do
|
data/lib/prosopite/version.rb
CHANGED
data/lib/prosopite.rb
CHANGED
@@ -83,7 +83,7 @@ module Prosopite
|
|
83
83
|
|
84
84
|
kaller = tc[:prosopite_query_caller][location_key]
|
85
85
|
allow_list = (@allow_stack_paths + DEFAULT_ALLOW_LIST)
|
86
|
-
is_allowed = kaller.any? { |f| allow_list.any? { |s| f.
|
86
|
+
is_allowed = kaller.any? { |f| allow_list.any? { |s| f.match?(s) } }
|
87
87
|
|
88
88
|
unless is_allowed
|
89
89
|
queries = tc[:prosopite_query_holder][location_key]
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: prosopite
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mpampis Kostas
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-02-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pry
|