prosopite 1.2.0 → 1.2.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 +4 -4
- data/Gemfile.lock +1 -1
- data/lib/prosopite/version.rb +1 -1
- data/lib/prosopite.rb +11 -4
- 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: 7579093e51b4e3b1cf5c3ca8d5b5a072fcc7cc92750a2f2daa263eb937e091ae
|
|
4
|
+
data.tar.gz: 77314c08c37d6c0bde6fe68143ab9c0520a3e36eb9046565a962379a743f1bd4
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 463ffb84a224f48d143c2fc5867342ae83db230b742ed35e722069aa12c988fa04c1c4377eabbaa3e1ee3574c51c505ba303c36b18b43408c62f8861209e5ef5
|
|
7
|
+
data.tar.gz: b6adbcf4b7785c90c4f937f10eb51429bf50d09a98420ccc7836ef7467abfbe8a59ac5247e9fb369fe876ecec1311d25db637566ec72f8421ea4db2f21ef261d
|
data/Gemfile.lock
CHANGED
data/lib/prosopite/version.rb
CHANGED
data/lib/prosopite.rb
CHANGED
|
@@ -85,6 +85,10 @@ module Prosopite
|
|
|
85
85
|
|
|
86
86
|
create_notifications
|
|
87
87
|
send_notifications if tc[:prosopite_notifications].present?
|
|
88
|
+
|
|
89
|
+
tc[:prosopite_query_counter] = nil
|
|
90
|
+
tc[:prosopite_query_holder] = nil
|
|
91
|
+
tc[:prosopite_query_caller] = nil
|
|
88
92
|
end
|
|
89
93
|
|
|
90
94
|
def create_notifications
|
|
@@ -92,7 +96,7 @@ module Prosopite
|
|
|
92
96
|
|
|
93
97
|
tc[:prosopite_query_counter].each do |location_key, count|
|
|
94
98
|
if count >= @min_n_queries
|
|
95
|
-
fingerprints = tc[:prosopite_query_holder][location_key].
|
|
99
|
+
fingerprints = tc[:prosopite_query_holder][location_key].group_by do |q|
|
|
96
100
|
begin
|
|
97
101
|
fingerprint(q)
|
|
98
102
|
rescue
|
|
@@ -100,15 +104,18 @@ module Prosopite
|
|
|
100
104
|
end
|
|
101
105
|
end
|
|
102
106
|
|
|
103
|
-
|
|
107
|
+
queries = fingerprints.values.select { |q| q.size >= @min_n_queries }
|
|
108
|
+
|
|
109
|
+
next unless queries.any?
|
|
104
110
|
|
|
105
111
|
kaller = tc[:prosopite_query_caller][location_key]
|
|
106
112
|
allow_list = (@allow_stack_paths + DEFAULT_ALLOW_LIST)
|
|
107
113
|
is_allowed = kaller.any? { |f| allow_list.any? { |s| f.match?(s) } }
|
|
108
114
|
|
|
109
115
|
unless is_allowed
|
|
110
|
-
queries
|
|
111
|
-
|
|
116
|
+
queries.each do |q|
|
|
117
|
+
tc[:prosopite_notifications][q] = kaller
|
|
118
|
+
end
|
|
112
119
|
end
|
|
113
120
|
end
|
|
114
121
|
end
|
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.2.
|
|
4
|
+
version: 1.2.2
|
|
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-11-02 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: pry
|