prosopite 1.3.2 → 1.3.3

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: c755dcf6b652f0c40d14ff94a4f6dc7beb9cc4f9612cff5ea95ce272d81b31bb
4
- data.tar.gz: 4c15915fb03a38760c93edd4fa5c12a7db3d48d1611d470f320a494c3f6673a1
3
+ metadata.gz: 8c8b1d214700a04038d35504395ed1fa721fdd5104ae1f35543e3413911c3b02
4
+ data.tar.gz: 26916d6b3aa02125a33a68c088bfc0ea6d45c7c59176fb94cba71d141262fc15
5
5
  SHA512:
6
- metadata.gz: 1048554ad84f00835366801abd599fd590512d88d1523de3434ee24eec23aac9a9f1506084244295cbd34b80808b1ade2068027e958e531028d70ea9df21b970
7
- data.tar.gz: 5acd7e945c9056875adb72cc4222ec766df17f7ff638e1307de28b8a4486067df40f736522a9dd4f10d69da859350fcb9477fe98de4027ca57b362cb9bf930b8
6
+ metadata.gz: 24e5417f68bdec3257ce28f1c0f08e3cd4c7ada8c39306e97afebde974e996655000dd6418799d0974c67793d83415c07ba3df68a19b66a37dc88f57166fb8ff
7
+ data.tar.gz: ffa1c74fb3e3d20fb0b34a68259ebe7098a54aade4224b7f4ae92fb933e33eee68e9ff6bb7f656d281874ee7b1a6447af72e8e063e6d11cae2271d451dac2905
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- prosopite (1.3.2)
4
+ prosopite (1.3.3)
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.3.2"
4
+ VERSION = "1.3.3"
5
5
  end
data/lib/prosopite.rb CHANGED
@@ -12,12 +12,13 @@ module Prosopite
12
12
  :rails_logger,
13
13
  :prosopite_logger,
14
14
  :custom_logger,
15
- :allow_stack_paths,
16
- :ignore_queries,
17
15
  :ignore_pauses,
18
- :min_n_queries,
19
16
  :backtrace_cleaner
20
17
 
18
+ attr_accessor :allow_stack_paths,
19
+ :ignore_queries,
20
+ :min_n_queries
21
+
21
22
  def allow_list=(value)
22
23
  puts "Prosopite.allow_list= is deprecated. Use Prosopite.allow_stack_paths= instead."
23
24
 
@@ -246,13 +247,14 @@ module Prosopite
246
247
  sql, name = data[:sql], data[:name]
247
248
 
248
249
  if scan? && name != "SCHEMA" && sql.include?('SELECT') && data[:cached].nil? && !ignore_query?(sql)
249
- location_key = Digest::SHA1.hexdigest(caller.join)
250
+ query_caller = caller
251
+ location_key = Digest::SHA256.hexdigest(query_caller.join)
250
252
 
251
253
  tc[:prosopite_query_counter][location_key] += 1
252
254
  tc[:prosopite_query_holder][location_key] << sql
253
255
 
254
256
  if tc[:prosopite_query_counter][location_key] > 1
255
- tc[:prosopite_query_caller][location_key] = caller.dup
257
+ tc[:prosopite_query_caller][location_key] = query_caller.dup
256
258
  end
257
259
  end
258
260
  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.3.2
4
+ version: 1.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mpampis Kostas
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-06-09 00:00:00.000000000 Z
11
+ date: 2023-08-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pry