query_track 0.0.14 → 0.0.15

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: 8197c6bba66dd16c05725308b8f6328c4cdb8fc229702d890349c811e95c6c9d
4
- data.tar.gz: f96d28405e72a5bd8c7becf9734c5ea14c1568a1917b91de5e71cda52c0cb59a
3
+ metadata.gz: 8841fd11f6eb4107e94f6ee20aaccd391979eef229914ba4b3c7d276321f5104
4
+ data.tar.gz: e43046301ade79437c0c901f5b3ad63db719f0146ce9fbcfac31a4c47d1746ff
5
5
  SHA512:
6
- metadata.gz: 2df5cb72106ba7c93331f469147f01f6d4075d74d069187adf1bb3c9a804075a117e1b29ed76ad79c04c391a8b9885a33192f4a0ced9e5793235587178dbac21
7
- data.tar.gz: 2b148435851766d7155b6b0f46901b8461587824db5905ba87f1f1280ce7d1748e1dd4e38dbb24444b63f5874efb7eac3eb5bedc05941efe54e114a1b290074f
6
+ metadata.gz: 845fd93af4fcebdf21a7279a8861d280669e732dd6e4d85a0599827fc2a03c080960fe01baaf589d4b5ab01cfaf9fb860f2e7c98999dac4d97a4e02ab375eb8b
7
+ data.tar.gz: 7959b14e859f1ac51bf0f8105597f814aaed4e336f011a800d3aeb0c14b34167ae7170165f08ea97f0f8175c94e6503f900071344db9faa1078c410ed1076b5a
@@ -8,11 +8,10 @@ jobs:
8
8
  matrix:
9
9
  include:
10
10
  - ruby: 3.3
11
- - ruby: 2.7
12
11
  steps:
13
12
  - uses: actions/checkout@v4
14
13
  - uses: ruby/setup-ruby@v1
15
14
  with:
16
15
  ruby-version: ${{ matrix.ruby }}
17
16
  bundler-cache: true
18
- - run: bundle exec rake test
17
+ - run: bundle exec rspec
data/.rubocop.yml CHANGED
@@ -2,18 +2,18 @@ AllCops:
2
2
  DisplayCopNames: true
3
3
  DisplayStyleGuide: true
4
4
  StyleGuideCopsOnly: true
5
- TargetRubyVersion: 2.5
5
+ TargetRubyVersion: 3.4
6
6
 
7
- Metrics/LineLength:
7
+ Layout/LineLength:
8
8
  Max: 120
9
9
 
10
- Documentation:
10
+ Style/Documentation:
11
11
  Enabled: false
12
12
 
13
- FrozenStringLiteralComment:
13
+ Style/FrozenStringLiteralComment:
14
14
  Enabled: false
15
15
 
16
- Style/FileName:
16
+ Naming/FileName:
17
17
  Enabled: false
18
18
 
19
19
  Metrics/ModuleLength:
data/Gemfile.lock CHANGED
@@ -9,79 +9,88 @@ PATH
9
9
  GEM
10
10
  remote: https://rubygems.org/
11
11
  specs:
12
- activesupport (7.1.3)
12
+ activesupport (8.0.2.1)
13
13
  base64
14
+ benchmark (>= 0.3)
14
15
  bigdecimal
15
- concurrent-ruby (~> 1.0, >= 1.0.2)
16
+ concurrent-ruby (~> 1.0, >= 1.3.1)
16
17
  connection_pool (>= 2.2.5)
17
18
  drb
18
19
  i18n (>= 1.6, < 2)
20
+ logger (>= 1.4.2)
19
21
  minitest (>= 5.1)
20
- mutex_m
21
- tzinfo (~> 2.0)
22
- ast (2.4.2)
23
- base64 (0.2.0)
24
- bigdecimal (3.1.6)
25
- byebug (11.1.3)
26
- concurrent-ruby (1.2.3)
27
- connection_pool (2.4.1)
28
- diff-lcs (1.5.1)
29
- drb (2.2.0)
30
- ruby2_keywords
31
- dry-configurable (1.1.0)
32
- dry-core (~> 1.0, < 2)
22
+ securerandom (>= 0.3)
23
+ tzinfo (~> 2.0, >= 2.0.5)
24
+ uri (>= 0.13.1)
25
+ ast (2.4.3)
26
+ base64 (0.3.0)
27
+ benchmark (0.4.1)
28
+ bigdecimal (3.2.2)
29
+ byebug (12.0.0)
30
+ concurrent-ruby (1.3.5)
31
+ connection_pool (2.5.3)
32
+ diff-lcs (1.6.2)
33
+ drb (2.2.3)
34
+ dry-configurable (1.3.0)
35
+ dry-core (~> 1.1)
33
36
  zeitwerk (~> 2.6)
34
- dry-core (1.0.1)
37
+ dry-core (1.1.0)
35
38
  concurrent-ruby (~> 1.0)
39
+ logger
36
40
  zeitwerk (~> 2.6)
37
- i18n (1.14.1)
41
+ i18n (1.14.7)
38
42
  concurrent-ruby (~> 1.0)
39
- json (2.7.1)
40
- language_server-protocol (3.17.0.3)
41
- minitest (5.22.2)
42
- mutex_m (0.2.0)
43
- parallel (1.24.0)
44
- parser (3.3.0.5)
43
+ json (2.13.2)
44
+ language_server-protocol (3.17.0.5)
45
+ lint_roller (1.1.0)
46
+ logger (1.7.0)
47
+ minitest (5.25.5)
48
+ parallel (1.27.0)
49
+ parser (3.3.9.0)
45
50
  ast (~> 2.4.1)
46
51
  racc
47
- racc (1.7.3)
52
+ prism (1.4.0)
53
+ racc (1.8.1)
48
54
  rainbow (3.1.1)
49
- rake (13.1.0)
50
- regexp_parser (2.9.0)
51
- rexml (3.2.6)
52
- rspec (3.13.0)
55
+ rake (13.3.0)
56
+ regexp_parser (2.11.2)
57
+ rspec (3.13.1)
53
58
  rspec-core (~> 3.13.0)
54
59
  rspec-expectations (~> 3.13.0)
55
60
  rspec-mocks (~> 3.13.0)
56
- rspec-core (3.13.0)
61
+ rspec-core (3.13.5)
57
62
  rspec-support (~> 3.13.0)
58
- rspec-expectations (3.13.0)
63
+ rspec-expectations (3.13.5)
59
64
  diff-lcs (>= 1.2.0, < 2.0)
60
65
  rspec-support (~> 3.13.0)
61
- rspec-mocks (3.13.0)
66
+ rspec-mocks (3.13.5)
62
67
  diff-lcs (>= 1.2.0, < 2.0)
63
68
  rspec-support (~> 3.13.0)
64
- rspec-support (3.13.0)
65
- rubocop (1.60.2)
69
+ rspec-support (3.13.5)
70
+ rubocop (1.79.2)
66
71
  json (~> 2.3)
67
- language_server-protocol (>= 3.17.0)
72
+ language_server-protocol (~> 3.17.0.2)
73
+ lint_roller (~> 1.1.0)
68
74
  parallel (~> 1.10)
69
75
  parser (>= 3.3.0.2)
70
76
  rainbow (>= 2.2.2, < 4.0)
71
- regexp_parser (>= 1.8, < 3.0)
72
- rexml (>= 3.2.5, < 4.0)
73
- rubocop-ast (>= 1.30.0, < 2.0)
77
+ regexp_parser (>= 2.9.3, < 3.0)
78
+ rubocop-ast (>= 1.46.0, < 2.0)
74
79
  ruby-progressbar (~> 1.7)
75
- unicode-display_width (>= 2.4.0, < 3.0)
76
- rubocop-ast (1.30.0)
77
- parser (>= 3.2.1.0)
80
+ unicode-display_width (>= 2.4.0, < 4.0)
81
+ rubocop-ast (1.46.0)
82
+ parser (>= 3.3.7.2)
83
+ prism (~> 1.4)
78
84
  ruby-progressbar (1.13.0)
79
- ruby2_keywords (0.0.5)
85
+ securerandom (0.4.1)
80
86
  slack_hook (0.1.2)
81
87
  tzinfo (2.0.6)
82
88
  concurrent-ruby (~> 1.0)
83
- unicode-display_width (2.5.0)
84
- zeitwerk (2.6.13)
89
+ unicode-display_width (3.1.5)
90
+ unicode-emoji (~> 4.0, >= 4.0.4)
91
+ unicode-emoji (4.0.4)
92
+ uri (1.0.3)
93
+ zeitwerk (2.7.3)
85
94
 
86
95
  PLATFORMS
87
96
  ruby
@@ -13,11 +13,11 @@ module QueryTrack
13
13
 
14
14
  return if under_filter?(caller)
15
15
 
16
- if duration_seconds > QueryTrack::Settings.config.duration
17
- QueryTrack::Notifications::Slack.new(event.payload[:sql], duration_seconds).call
18
- QueryTrack::Notifications::Log.new(event.payload[:sql], duration_seconds).call
19
- QueryTrack::Notifications::Custom.new(event.payload[:sql], duration_seconds).call
20
- end
16
+ return unless duration_seconds > QueryTrack::Settings.config.duration
17
+
18
+ QueryTrack::Notifications::Slack.new(event.payload[:sql], duration_seconds).call
19
+ QueryTrack::Notifications::Log.new(event.payload[:sql], duration_seconds).call
20
+ QueryTrack::Notifications::Custom.new(event.payload[:sql], duration_seconds).call
21
21
  end
22
22
 
23
23
  private
@@ -32,7 +32,7 @@ module QueryTrack
32
32
  event.duration / 1000
33
33
  end
34
34
 
35
- def under_filter?(trace)
35
+ def under_filter?(_trace)
36
36
  QueryTrack::Filters.new(caller).call
37
37
  end
38
38
  end
@@ -7,8 +7,8 @@ module QueryTrack
7
7
  end
8
8
 
9
9
  def call
10
- QueryTrack::Settings.config.filters.find do |filter|
11
- full_trace.select { |v| v =~ %r{#{filter}} }[0]
10
+ QueryTrack::Settings.config.filters.find do |filter|
11
+ full_trace.select { |v| v =~ /#{filter}/ }[0]
12
12
  end
13
13
  end
14
14
  end
@@ -1,3 +1,3 @@
1
1
  module QueryTrack
2
- VERSION = '0.0.14'
2
+ VERSION = '0.0.15'
3
3
  end
data/lib/query_track.rb CHANGED
@@ -18,7 +18,7 @@ module QueryTrack
18
18
 
19
19
  def logger
20
20
  @logger ||= Logger.new($stdout).tap do |log|
21
- log.progname = self.name
21
+ log.progname = name
22
22
  end
23
23
  end
24
24
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: query_track
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.14
4
+ version: 0.0.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kirill Shevchenko
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-02-16 00:00:00.000000000 Z
11
+ date: 2025-08-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -173,7 +173,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
173
173
  - !ruby/object:Gem::Version
174
174
  version: '0'
175
175
  requirements: []
176
- rubygems_version: 3.4.10
176
+ rubygems_version: 3.5.11
177
177
  signing_key:
178
178
  specification_version: 4
179
179
  summary: Finding time-consuming database queries for ActiveRecord-based Rails Apps