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 +4 -4
- data/.github/workflows/ruby.yml +1 -2
- data/.rubocop.yml +5 -5
- data/CHANGELOG.md +4 -0
- data/Gemfile.lock +60 -46
- data/lib/query_track/event_processor.rb +6 -6
- data/lib/query_track/filters.rb +2 -2
- data/lib/query_track/version.rb +1 -1
- data/lib/query_track.rb +1 -1
- metadata +3 -6
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 226f590c46336aa73e51bc6f17e61347df9dd22b971e55971d6dc58bcaf7092f
|
|
4
|
+
data.tar.gz: 84753f10901260d1d12b965de4f22419178010834b9f9930f97de82170d6ed23
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: '09b816d62334b24d5dc128de1776f0335c76a5504173fc0cc52279ab51f7bb09cb6d2f09320c7bfb358647a167105d11528fd1847ee36738cb999ec40ad78e80'
|
|
7
|
+
data.tar.gz: 1d81d21cb0df17953bc1710ce13b9eebcf3ce4d43783efcc1fb7a8d4269014ea4249e261c7e30085672b5a9f1d1be0e009f6956db41f630895069613496bbd40
|
data/.github/workflows/ruby.yml
CHANGED
|
@@ -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
|
|
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:
|
|
5
|
+
TargetRubyVersion: 3.4
|
|
6
6
|
|
|
7
|
-
|
|
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
|
-
|
|
16
|
+
Naming/FileName:
|
|
17
17
|
Enabled: false
|
|
18
18
|
|
|
19
19
|
Metrics/ModuleLength:
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
query_track (0.0.
|
|
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 (
|
|
12
|
+
activesupport (8.1.3)
|
|
13
13
|
base64
|
|
14
14
|
bigdecimal
|
|
15
|
-
concurrent-ruby (~> 1.0, >= 1.
|
|
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
|
-
|
|
21
|
-
tzinfo (~> 2.0)
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
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
|
|
37
|
+
dry-core (1.2.0)
|
|
35
38
|
concurrent-ruby (~> 1.0)
|
|
39
|
+
logger
|
|
36
40
|
zeitwerk (~> 2.6)
|
|
37
|
-
i18n (1.
|
|
41
|
+
i18n (1.15.2)
|
|
38
42
|
concurrent-ruby (~> 1.0)
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
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
|
-
|
|
55
|
+
prism (1.9.0)
|
|
56
|
+
racc (1.8.1)
|
|
48
57
|
rainbow (3.1.1)
|
|
49
|
-
rake (13.
|
|
50
|
-
regexp_parser (2.
|
|
51
|
-
|
|
52
|
-
|
|
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.
|
|
66
|
+
rspec-core (3.13.6)
|
|
57
67
|
rspec-support (~> 3.13.0)
|
|
58
|
-
rspec-expectations (3.13.
|
|
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.
|
|
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.
|
|
65
|
-
rubocop (1.
|
|
74
|
+
rspec-support (3.13.7)
|
|
75
|
+
rubocop (1.88.2)
|
|
66
76
|
json (~> 2.3)
|
|
67
|
-
language_server-protocol (
|
|
68
|
-
|
|
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 (>=
|
|
72
|
-
|
|
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, <
|
|
76
|
-
rubocop-ast (1.
|
|
77
|
-
parser (>= 3.
|
|
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
|
-
|
|
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.
|
|
84
|
-
|
|
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
|
-
|
|
112
|
+
4.0.16
|
|
@@ -13,11 +13,11 @@ module QueryTrack
|
|
|
13
13
|
|
|
14
14
|
return if under_filter?(caller)
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
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?(
|
|
35
|
+
def under_filter?(_trace)
|
|
36
36
|
QueryTrack::Filters.new(caller).call
|
|
37
37
|
end
|
|
38
38
|
end
|
data/lib/query_track/filters.rb
CHANGED
|
@@ -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 =~
|
|
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
|
data/lib/query_track/version.rb
CHANGED
data/lib/query_track.rb
CHANGED
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.
|
|
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:
|
|
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:
|
|
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: []
|