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 +4 -4
- data/.github/workflows/ruby.yml +1 -2
- data/.rubocop.yml +5 -5
- data/Gemfile.lock +52 -43
- 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 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8841fd11f6eb4107e94f6ee20aaccd391979eef229914ba4b3c7d276321f5104
|
4
|
+
data.tar.gz: e43046301ade79437c0c901f5b3ad63db719f0146ce9fbcfac31a4c47d1746ff
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 845fd93af4fcebdf21a7279a8861d280669e732dd6e4d85a0599827fc2a03c080960fe01baaf589d4b5ab01cfaf9fb860f2e7c98999dac4d97a4e02ab375eb8b
|
7
|
+
data.tar.gz: 7959b14e859f1ac51bf0f8105597f814aaed4e336f011a800d3aeb0c14b34167ae7170165f08ea97f0f8175c94e6503f900071344db9faa1078c410ed1076b5a
|
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/Gemfile.lock
CHANGED
@@ -9,79 +9,88 @@ PATH
|
|
9
9
|
GEM
|
10
10
|
remote: https://rubygems.org/
|
11
11
|
specs:
|
12
|
-
activesupport (
|
12
|
+
activesupport (8.0.2.1)
|
13
13
|
base64
|
14
|
+
benchmark (>= 0.3)
|
14
15
|
bigdecimal
|
15
|
-
concurrent-ruby (~> 1.0, >= 1.
|
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
|
-
|
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
|
+
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
|
37
|
+
dry-core (1.1.0)
|
35
38
|
concurrent-ruby (~> 1.0)
|
39
|
+
logger
|
36
40
|
zeitwerk (~> 2.6)
|
37
|
-
i18n (1.14.
|
41
|
+
i18n (1.14.7)
|
38
42
|
concurrent-ruby (~> 1.0)
|
39
|
-
json (2.
|
40
|
-
language_server-protocol (3.17.0.
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
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
|
-
|
52
|
+
prism (1.4.0)
|
53
|
+
racc (1.8.1)
|
48
54
|
rainbow (3.1.1)
|
49
|
-
rake (13.
|
50
|
-
regexp_parser (2.
|
51
|
-
|
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.
|
61
|
+
rspec-core (3.13.5)
|
57
62
|
rspec-support (~> 3.13.0)
|
58
|
-
rspec-expectations (3.13.
|
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.
|
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.
|
65
|
-
rubocop (1.
|
69
|
+
rspec-support (3.13.5)
|
70
|
+
rubocop (1.79.2)
|
66
71
|
json (~> 2.3)
|
67
|
-
language_server-protocol (
|
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 (>=
|
72
|
-
|
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, <
|
76
|
-
rubocop-ast (1.
|
77
|
-
parser (>= 3.
|
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
|
-
|
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 (
|
84
|
-
|
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
|
-
|
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,14 @@
|
|
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.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:
|
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.
|
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
|