lograge-sql 2.5.0 → 2.5.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3c9d368981a6231cc03eb7b015ab7847fdcc77220c881fc7dd4aa633e74c09b8
4
- data.tar.gz: aca838791bae71fff0612ac59212e7ccc70597d11cd4916572ad303a858ac811
3
+ metadata.gz: 411c0c5825eb7d03f50656e01258c6e1f496b714e52fb5accdf688fd83ad2dc8
4
+ data.tar.gz: 216a5da3c96a4e968242b67da4c1d049519ad04481282a3455d587927075fe6a
5
5
  SHA512:
6
- metadata.gz: e0f1485cbf50c44020d64730a9f7f06843f9105b5c5cb07319285185a299b02bdd669661a8ed644531feb97d61f3e7da39eea2b8918d2f16ed6c53b6cff9d506
7
- data.tar.gz: cf39a5e5af70750a6908e33d33993228000b1681d8ffb978f9fa9c64bda68e065c0017e4fafbdac389957d903b075e57a332788ac77a4db90218ce4a614e2605
6
+ metadata.gz: d1f070808821acc5193c216f1586cb41eda7dc7a411446d1fab0f29bb6948672e704a7112f5658b504386f476e5a08ae7797415f01fdf260188bb5c83aeb31c3
7
+ data.tar.gz: 3df2ef7fbc138431e8e43963f0a1ba9ca39af1165447f5dfd93c1cdf1b6a4fd84da9da9255de0ad37bc92cd1b7d6199d59c393bbfc6aa6138453336c3d72a66f
@@ -33,7 +33,7 @@ module Lograge
33
33
  end
34
34
 
35
35
  def valid?(event)
36
- return false if event.payload[:name]&.match?(Regexp.union(Lograge::Sql.query_name_denylist))
36
+ return false if event.payload[:name]&.match?(Lograge::Sql.query_name_denylist)
37
37
 
38
38
  # Only store SQL events if `event.duration` is greater than the configured +min_duration+
39
39
  # No need to check if +min_duration+ is present before as it defaults to 0
@@ -3,6 +3,6 @@
3
3
  module Lograge
4
4
  module Sql
5
5
  # Gem version
6
- VERSION = '2.5.0'
6
+ VERSION = '2.5.1'
7
7
  end
8
8
  end
data/lib/lograge/sql.rb CHANGED
@@ -19,12 +19,12 @@ module Lograge
19
19
  attr_accessor :query_name_denylist
20
20
 
21
21
  # Initialise configuration with fallback to default values
22
- def setup(config)
22
+ def setup(config) # rubocop:disable Metrics/AbcSize
23
23
  Lograge::Sql.formatter = config.formatter || default_formatter
24
24
  Lograge::Sql.extract_event = config.extract_event || default_extract_event
25
25
  Lograge::Sql.min_duration_ms = config.min_duration_ms || 0
26
26
  Lograge::Sql.query_filter = config.query_filter
27
- Lograge::Sql.query_name_denylist = config.query_name_denylist || [/\ASCHEMA\z/, /\ASolidCable::/]
27
+ Lograge::Sql.query_name_denylist = Regexp.union(config.query_name_denylist || [/\ASCHEMA\z/, /\ASolidCable::/])
28
28
 
29
29
  # Disable existing ActiveRecord logging
30
30
  unsubscribe_log_subscribers unless config.keep_default_active_record_log
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lograge-sql
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.5.0
4
+ version: 2.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mattia Giuffrida
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-11-13 00:00:00.000000000 Z
11
+ date: 2024-11-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord