query_track 0.0.14 → 0.0.16

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: 226f590c46336aa73e51bc6f17e61347df9dd22b971e55971d6dc58bcaf7092f
4
+ data.tar.gz: 84753f10901260d1d12b965de4f22419178010834b9f9930f97de82170d6ed23
5
5
  SHA512:
6
- metadata.gz: 2df5cb72106ba7c93331f469147f01f6d4075d74d069187adf1bb3c9a804075a117e1b29ed76ad79c04c391a8b9885a33192f4a0ced9e5793235587178dbac21
7
- data.tar.gz: 2b148435851766d7155b6b0f46901b8461587824db5905ba87f1f1280ce7d1748e1dd4e38dbb24444b63f5874efb7eac3eb5bedc05941efe54e114a1b290074f
6
+ metadata.gz: '09b816d62334b24d5dc128de1776f0335c76a5504173fc0cc52279ab51f7bb09cb6d2f09320c7bfb358647a167105d11528fd1847ee36738cb999ec40ad78e80'
7
+ data.tar.gz: 1d81d21cb0df17953bc1710ce13b9eebcf3ce4d43783efcc1fb7a8d4269014ea4249e261c7e30085672b5a9f1d1be0e009f6956db41f630895069613496bbd40
@@ -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/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ # v0.0.16 2026-07-17
2
+
3
+ Dependencies version bump
4
+
1
5
  # v0.0.10 2020-08-07
2
6
 
3
7
  Added custom app directory ([evanboho](https://github.com/kirillshevch/query_track/pull/60))
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- query_track (0.0.14)
4
+ query_track (0.0.15)
5
5
  activesupport
6
6
  dry-configurable
7
7
  slack_hook
@@ -9,79 +9,93 @@ PATH
9
9
  GEM
10
10
  remote: https://rubygems.org/
11
11
  specs:
12
- activesupport (7.1.3)
12
+ activesupport (8.1.3)
13
13
  base64
14
14
  bigdecimal
15
- concurrent-ruby (~> 1.0, >= 1.0.2)
15
+ concurrent-ruby (~> 1.0, >= 1.3.1)
16
16
  connection_pool (>= 2.2.5)
17
17
  drb
18
18
  i18n (>= 1.6, < 2)
19
+ json
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
+ bigdecimal (4.1.2)
28
+ byebug (13.0.0)
29
+ reline (>= 0.6.0)
30
+ concurrent-ruby (1.3.7)
31
+ connection_pool (3.0.2)
32
+ diff-lcs (1.6.2)
33
+ drb (2.2.3)
34
+ dry-configurable (1.4.0)
35
+ dry-core (~> 1.0)
33
36
  zeitwerk (~> 2.6)
34
- dry-core (1.0.1)
37
+ dry-core (1.2.0)
35
38
  concurrent-ruby (~> 1.0)
39
+ logger
36
40
  zeitwerk (~> 2.6)
37
- i18n (1.14.1)
41
+ i18n (1.15.2)
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
+ io-console (0.8.2)
44
+ json (2.21.1)
45
+ language_server-protocol (3.17.0.6)
46
+ lint_roller (1.1.0)
47
+ logger (1.7.0)
48
+ minitest (6.0.6)
49
+ drb (~> 2.0)
50
+ prism (~> 1.5)
51
+ parallel (2.1.0)
52
+ parser (3.3.12.0)
45
53
  ast (~> 2.4.1)
46
54
  racc
47
- racc (1.7.3)
55
+ prism (1.9.0)
56
+ racc (1.8.1)
48
57
  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)
58
+ rake (13.4.2)
59
+ regexp_parser (2.12.0)
60
+ reline (0.6.3)
61
+ io-console (~> 0.5)
62
+ rspec (3.13.2)
53
63
  rspec-core (~> 3.13.0)
54
64
  rspec-expectations (~> 3.13.0)
55
65
  rspec-mocks (~> 3.13.0)
56
- rspec-core (3.13.0)
66
+ rspec-core (3.13.6)
57
67
  rspec-support (~> 3.13.0)
58
- rspec-expectations (3.13.0)
68
+ rspec-expectations (3.13.5)
59
69
  diff-lcs (>= 1.2.0, < 2.0)
60
70
  rspec-support (~> 3.13.0)
61
- rspec-mocks (3.13.0)
71
+ rspec-mocks (3.13.8)
62
72
  diff-lcs (>= 1.2.0, < 2.0)
63
73
  rspec-support (~> 3.13.0)
64
- rspec-support (3.13.0)
65
- rubocop (1.60.2)
74
+ rspec-support (3.13.7)
75
+ rubocop (1.88.2)
66
76
  json (~> 2.3)
67
- language_server-protocol (>= 3.17.0)
68
- parallel (~> 1.10)
77
+ language_server-protocol (~> 3.17.0.2)
78
+ lint_roller (~> 1.1.0)
79
+ parallel (>= 1.10)
69
80
  parser (>= 3.3.0.2)
70
81
  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)
82
+ regexp_parser (>= 2.9.3, < 3.0)
83
+ rubocop-ast (>= 1.49.0, < 2.0)
74
84
  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)
85
+ unicode-display_width (>= 2.4.0, < 4.0)
86
+ rubocop-ast (1.50.0)
87
+ parser (>= 3.3.7.2)
88
+ prism (~> 1.7)
78
89
  ruby-progressbar (1.13.0)
79
- ruby2_keywords (0.0.5)
90
+ securerandom (0.4.1)
80
91
  slack_hook (0.1.2)
81
92
  tzinfo (2.0.6)
82
93
  concurrent-ruby (~> 1.0)
83
- unicode-display_width (2.5.0)
84
- zeitwerk (2.6.13)
94
+ unicode-display_width (3.2.0)
95
+ unicode-emoji (~> 4.1)
96
+ unicode-emoji (4.2.0)
97
+ uri (1.1.1)
98
+ zeitwerk (2.8.2)
85
99
 
86
100
  PLATFORMS
87
101
  ruby
@@ -95,4 +109,4 @@ DEPENDENCIES
95
109
  rubocop
96
110
 
97
111
  BUNDLED WITH
98
- 2.4.19
112
+ 4.0.16
@@ -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.16'
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,13 @@
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.16
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kirill Shevchenko
8
- autorequire:
9
8
  bindir: exe
10
9
  cert_chain: []
11
- date: 2024-02-16 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: activesupport
@@ -158,7 +157,6 @@ homepage: https://github.com/kirillshevch/query_track
158
157
  licenses:
159
158
  - MIT
160
159
  metadata: {}
161
- post_install_message:
162
160
  rdoc_options: []
163
161
  require_paths:
164
162
  - lib
@@ -173,8 +171,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
173
171
  - !ruby/object:Gem::Version
174
172
  version: '0'
175
173
  requirements: []
176
- rubygems_version: 3.4.10
177
- signing_key:
174
+ rubygems_version: 4.0.3
178
175
  specification_version: 4
179
176
  summary: Finding time-consuming database queries for ActiveRecord-based Rails Apps
180
177
  test_files: []