prosopite 1.2.0 → 1.2.1

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: ee61188281e95718d5a0b8faf642f6db6356befb1b126ede3f6fe26a032b0ba9
4
- data.tar.gz: 78596f3e5de98c354631229752fe42f3d682646782a3d633e24260100b7b4113
3
+ metadata.gz: 708963d4cc79982fc4345088cf7a60449ee2964f0065cc2adadccd41c804dc54
4
+ data.tar.gz: 9f7e85e4a52286339b16399125be61d3c91815b01d036d7512b224eec1cd8c9d
5
5
  SHA512:
6
- metadata.gz: 4d0b66d7d06563f6832008f0191ce68041d050c0d46d7baee591aead407d5e5789b08056cac7e1aa09034494c11ac84672b3163b831a3338a8483fd44f7262d4
7
- data.tar.gz: 651de4487b98786ba0de927e1b9edef804b7d40037a2c54cf2a007e8e74cf1ee84abd6bde9fad9997bfb8f04fce13d2c063ffe27c479d578f0f487a82c299acf
6
+ metadata.gz: d35c2ca3bd71b1bdc1f3ad00cf81a570b86648ac8b939220804f8538bd916cda82f4899e7ba9d72845df0a3d334c22be934f0688b15e03b496b4169f49d46d6d
7
+ data.tar.gz: b27b3c3babb72f29882e024db65303cf35243da04af0c89d093519d9f35f00aebfd047f13c63f00bfaf67c51ab18c9cbe65d73a589df650c311153a2c0a99954
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- prosopite (1.2.0)
4
+ prosopite (1.2.1)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Prosopite
4
- VERSION = "1.2.0"
4
+ VERSION = "1.2.1"
5
5
  end
data/lib/prosopite.rb CHANGED
@@ -92,7 +92,7 @@ module Prosopite
92
92
 
93
93
  tc[:prosopite_query_counter].each do |location_key, count|
94
94
  if count >= @min_n_queries
95
- fingerprints = tc[:prosopite_query_holder][location_key].map do |q|
95
+ fingerprints = tc[:prosopite_query_holder][location_key].group_by do |q|
96
96
  begin
97
97
  fingerprint(q)
98
98
  rescue
@@ -100,15 +100,18 @@ module Prosopite
100
100
  end
101
101
  end
102
102
 
103
- next unless fingerprints.uniq.size == 1
103
+ queries = fingerprints.values.select { |q| q.size >= @min_n_queries }
104
+
105
+ next unless queries.any?
104
106
 
105
107
  kaller = tc[:prosopite_query_caller][location_key]
106
108
  allow_list = (@allow_stack_paths + DEFAULT_ALLOW_LIST)
107
109
  is_allowed = kaller.any? { |f| allow_list.any? { |s| f.match?(s) } }
108
110
 
109
111
  unless is_allowed
110
- queries = tc[:prosopite_query_holder][location_key]
111
- tc[:prosopite_notifications][queries] = kaller
112
+ queries.each do |q|
113
+ tc[:prosopite_notifications][q] = kaller
114
+ end
112
115
  end
113
116
  end
114
117
  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.0
4
+ version: 1.2.1
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-10-27 00:00:00.000000000 Z
11
+ date: 2022-11-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pry