query_track 0.0.9 → 0.0.12
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 +20 -0
- data/CHANGELOG.md +8 -0
- data/Gemfile.lock +30 -28
- data/README.md +14 -3
- data/lib/query_track/notifications/log.rb +1 -1
- data/lib/query_track/settings.rb +6 -4
- data/lib/query_track/trace.rb +1 -1
- data/lib/query_track/version.rb +1 -1
- data/query_track.gemspec +1 -1
- metadata +11 -11
- data/.circleci/config.yml +0 -25
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 1a7da881dd897d86fe014b68275d69003d57ea09cbe7d84b8d6bb5d63881b0d0
|
|
4
|
+
data.tar.gz: 0b5e1839ebcb65ba40d8454834d1943c370951aab33a9a868abf173594166718
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 165058e3fb8bfaf14ea0212389b66f5392984469845bbf472cb8eadb7542acac82ceac4deb59c7ee7405c49f8c6aef187bf2fba0eb5d242d76b8fa40b71ba3c4
|
|
7
|
+
data.tar.gz: 8a9b74c76ccbc5ba66d28f73d2e7db245f664ad44002b282af811275a19fda1abf6bf131bfce5cb1dfb514642c1faba3155a8f0fd812cb61fc4bbbd3e82a7841
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
name: Ruby
|
|
2
|
+
|
|
3
|
+
on: [push]
|
|
4
|
+
|
|
5
|
+
jobs:
|
|
6
|
+
build:
|
|
7
|
+
|
|
8
|
+
runs-on: ubuntu-latest
|
|
9
|
+
|
|
10
|
+
steps:
|
|
11
|
+
- uses: actions/checkout@v1
|
|
12
|
+
- name: Set up Ruby 2.6
|
|
13
|
+
uses: actions/setup-ruby@v1
|
|
14
|
+
with:
|
|
15
|
+
ruby-version: 2.6.x
|
|
16
|
+
- name: Build and test with Rake
|
|
17
|
+
run: |
|
|
18
|
+
gem install bundler
|
|
19
|
+
bundle install --jobs 4 --retry 3
|
|
20
|
+
bundle exec rake
|
data/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
# v0.0.10 2020-08-07
|
|
2
|
+
|
|
3
|
+
Added custom app directory ([evanboho](https://github.com/kirillshevch/query_track/pull/60))
|
|
4
|
+
|
|
5
|
+
# v0.0.9 2019-12-21
|
|
6
|
+
|
|
7
|
+
Added custom handles ([kirillshevch](https://github.com/kirillshevch/query_track/pull/29))
|
|
8
|
+
|
|
1
9
|
# v0.0.8 2019-08-17
|
|
2
10
|
|
|
3
11
|
Added enabled/disable config ([kirillshevch](https://github.com/kirillshevch/query_track/pull/13))
|
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.12)
|
|
5
5
|
activesupport
|
|
6
6
|
dry-configurable
|
|
7
7
|
slack_hook
|
|
@@ -9,30 +9,30 @@ PATH
|
|
|
9
9
|
GEM
|
|
10
10
|
remote: https://rubygems.org/
|
|
11
11
|
specs:
|
|
12
|
-
activesupport (
|
|
12
|
+
activesupport (7.0.3.1)
|
|
13
13
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
|
14
|
-
i18n (>=
|
|
15
|
-
minitest (
|
|
16
|
-
tzinfo (~>
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
concurrent-ruby (1.1.5)
|
|
14
|
+
i18n (>= 1.6, < 2)
|
|
15
|
+
minitest (>= 5.1)
|
|
16
|
+
tzinfo (~> 2.0)
|
|
17
|
+
ast (2.4.1)
|
|
18
|
+
byebug (11.1.3)
|
|
19
|
+
concurrent-ruby (1.1.10)
|
|
21
20
|
diff-lcs (1.3)
|
|
22
|
-
dry-configurable (0.
|
|
21
|
+
dry-configurable (0.15.0)
|
|
23
22
|
concurrent-ruby (~> 1.0)
|
|
24
|
-
dry-core (~> 0.
|
|
25
|
-
dry-core (0.
|
|
23
|
+
dry-core (~> 0.6)
|
|
24
|
+
dry-core (0.8.1)
|
|
26
25
|
concurrent-ruby (~> 1.0)
|
|
27
|
-
i18n (1.
|
|
26
|
+
i18n (1.12.0)
|
|
28
27
|
concurrent-ruby (~> 1.0)
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
ast (~> 2.4.0)
|
|
28
|
+
minitest (5.16.2)
|
|
29
|
+
parallel (1.19.2)
|
|
30
|
+
parser (2.7.1.4)
|
|
31
|
+
ast (~> 2.4.1)
|
|
34
32
|
rainbow (3.0.0)
|
|
35
33
|
rake (13.0.1)
|
|
34
|
+
regexp_parser (1.7.1)
|
|
35
|
+
rexml (3.2.5)
|
|
36
36
|
rspec (3.9.0)
|
|
37
37
|
rspec-core (~> 3.9.0)
|
|
38
38
|
rspec-expectations (~> 3.9.0)
|
|
@@ -46,26 +46,28 @@ GEM
|
|
|
46
46
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
47
47
|
rspec-support (~> 3.9.0)
|
|
48
48
|
rspec-support (3.9.0)
|
|
49
|
-
rubocop (0.
|
|
50
|
-
jaro_winkler (~> 1.5.1)
|
|
49
|
+
rubocop (0.87.1)
|
|
51
50
|
parallel (~> 1.10)
|
|
52
|
-
parser (>= 2.
|
|
51
|
+
parser (>= 2.7.1.1)
|
|
53
52
|
rainbow (>= 2.2.2, < 4.0)
|
|
53
|
+
regexp_parser (>= 1.7)
|
|
54
|
+
rexml
|
|
55
|
+
rubocop-ast (>= 0.1.0, < 1.0)
|
|
54
56
|
ruby-progressbar (~> 1.7)
|
|
55
|
-
unicode-display_width (>= 1.4.0, <
|
|
57
|
+
unicode-display_width (>= 1.4.0, < 2.0)
|
|
58
|
+
rubocop-ast (0.1.0)
|
|
59
|
+
parser (>= 2.7.0.1)
|
|
56
60
|
ruby-progressbar (1.10.1)
|
|
57
61
|
slack_hook (0.1.2)
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
unicode-display_width (1.6.0)
|
|
62
|
-
zeitwerk (2.2.2)
|
|
62
|
+
tzinfo (2.0.5)
|
|
63
|
+
concurrent-ruby (~> 1.0)
|
|
64
|
+
unicode-display_width (1.7.0)
|
|
63
65
|
|
|
64
66
|
PLATFORMS
|
|
65
67
|
ruby
|
|
66
68
|
|
|
67
69
|
DEPENDENCIES
|
|
68
|
-
bundler
|
|
70
|
+
bundler
|
|
69
71
|
byebug
|
|
70
72
|
query_track!
|
|
71
73
|
rake
|
data/README.md
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
# QueryTrack
|
|
2
2
|
|
|
3
3
|
[](https://badge.fury.io/rb/query_track)
|
|
4
|
-
[](https://circleci.com/gh/kirillshevch/query_track)
|
|
5
4
|
[](https://codeclimate.com/github/kirillshevch/query_track/maintainability)
|
|
6
5
|
|
|
7
6
|
Tool for finding time-consuming database queries for ActiveRecord-based Rails Apps. Provides Slack notifications with backtrace, raw SQL, time duration, etc.
|
|
@@ -41,7 +40,7 @@ end
|
|
|
41
40
|
|
|
42
41
|
### Filters
|
|
43
42
|
|
|
44
|
-
To avoid noisy warnings from used gems, and places where fat queries are justified, you can filters SQL by backtrace.
|
|
43
|
+
To avoid noisy warnings from used gems, and places where fat queries are justified, you can filters SQL by backtrace.
|
|
45
44
|
For example, you have installed `activeadmin` and want to skip everything from `app/admin`:
|
|
46
45
|
|
|
47
46
|
```ruby
|
|
@@ -50,10 +49,22 @@ QueryTrack::Settings.configure do |config|
|
|
|
50
49
|
config.filters = ['app/admin']
|
|
51
50
|
end
|
|
52
51
|
```
|
|
52
|
+
### App Directory
|
|
53
|
+
|
|
54
|
+
QueryTrack finds the trace by filtering the caller by the app directory.
|
|
55
|
+
By default, the app directory is set to 'app', the default for Rails apps.
|
|
56
|
+
For apps that have a non-stanard app directory, this can be set with the `app_dir` config field:
|
|
57
|
+
|
|
58
|
+
```ruby
|
|
59
|
+
QueryTrack::Settings.configure do |config|
|
|
60
|
+
config.duration = 0.5
|
|
61
|
+
config.app_dir = 'backend'
|
|
62
|
+
end
|
|
63
|
+
```
|
|
53
64
|
|
|
54
65
|
### Enable/Disable toggle
|
|
55
66
|
|
|
56
|
-
Enable/disable with ENV variables to turn it on/off without code push. By default *QueryTrack* is enabled.
|
|
67
|
+
Enable/disable with ENV variables to turn it on/off without code push. By default *QueryTrack* is enabled.
|
|
57
68
|
|
|
58
69
|
```ruby
|
|
59
70
|
QueryTrack::Settings.configure do |config|
|
data/lib/query_track/settings.rb
CHANGED
|
@@ -5,14 +5,16 @@ module QueryTrack
|
|
|
5
5
|
setting :duration
|
|
6
6
|
|
|
7
7
|
setting :notifications do
|
|
8
|
-
setting :slack, ''
|
|
8
|
+
setting :slack, default: ''
|
|
9
9
|
setting :custom_handler
|
|
10
10
|
end
|
|
11
11
|
|
|
12
|
-
setting :logs, false
|
|
12
|
+
setting :logs, default: false
|
|
13
13
|
|
|
14
|
-
setting :filters, []
|
|
14
|
+
setting :filters, default: []
|
|
15
15
|
|
|
16
|
-
setting :enabled, true
|
|
16
|
+
setting :enabled, default: true
|
|
17
|
+
|
|
18
|
+
setting :app_dir, default: 'app'
|
|
17
19
|
end
|
|
18
20
|
end
|
data/lib/query_track/trace.rb
CHANGED
data/lib/query_track/version.rb
CHANGED
data/query_track.gemspec
CHANGED
|
@@ -26,7 +26,7 @@ Gem::Specification.new do |spec|
|
|
|
26
26
|
spec.add_dependency 'slack_hook'
|
|
27
27
|
spec.add_dependency 'dry-configurable'
|
|
28
28
|
|
|
29
|
-
spec.add_development_dependency 'bundler'
|
|
29
|
+
spec.add_development_dependency 'bundler'
|
|
30
30
|
spec.add_development_dependency 'rubocop'
|
|
31
31
|
spec.add_development_dependency 'rake'
|
|
32
32
|
spec.add_development_dependency 'rspec'
|
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.12
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Kirill Shevchenko
|
|
8
|
-
autorequire:
|
|
8
|
+
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2022-08-03 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activesupport
|
|
@@ -56,16 +56,16 @@ dependencies:
|
|
|
56
56
|
name: bundler
|
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
|
58
58
|
requirements:
|
|
59
|
-
- - "
|
|
59
|
+
- - ">="
|
|
60
60
|
- !ruby/object:Gem::Version
|
|
61
|
-
version: '
|
|
61
|
+
version: '0'
|
|
62
62
|
type: :development
|
|
63
63
|
prerelease: false
|
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
|
65
65
|
requirements:
|
|
66
|
-
- - "
|
|
66
|
+
- - ">="
|
|
67
67
|
- !ruby/object:Gem::Version
|
|
68
|
-
version: '
|
|
68
|
+
version: '0'
|
|
69
69
|
- !ruby/object:Gem::Dependency
|
|
70
70
|
name: rubocop
|
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -129,7 +129,7 @@ executables: []
|
|
|
129
129
|
extensions: []
|
|
130
130
|
extra_rdoc_files: []
|
|
131
131
|
files:
|
|
132
|
-
- ".
|
|
132
|
+
- ".github/workflows/ruby.yml"
|
|
133
133
|
- ".gitignore"
|
|
134
134
|
- ".rspec"
|
|
135
135
|
- ".rubocop.yml"
|
|
@@ -158,7 +158,7 @@ homepage: https://github.com/kirillshevch/query_track
|
|
|
158
158
|
licenses:
|
|
159
159
|
- MIT
|
|
160
160
|
metadata: {}
|
|
161
|
-
post_install_message:
|
|
161
|
+
post_install_message:
|
|
162
162
|
rdoc_options: []
|
|
163
163
|
require_paths:
|
|
164
164
|
- lib
|
|
@@ -173,8 +173,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
173
173
|
- !ruby/object:Gem::Version
|
|
174
174
|
version: '0'
|
|
175
175
|
requirements: []
|
|
176
|
-
rubygems_version: 3.
|
|
177
|
-
signing_key:
|
|
176
|
+
rubygems_version: 3.3.7
|
|
177
|
+
signing_key:
|
|
178
178
|
specification_version: 4
|
|
179
179
|
summary: Finding time-consuming database queries for ActiveRecord-based Rails Apps
|
|
180
180
|
test_files: []
|
data/.circleci/config.yml
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
version: 2
|
|
2
|
-
jobs:
|
|
3
|
-
build:
|
|
4
|
-
docker:
|
|
5
|
-
- image: circleci/ruby:2.5-node
|
|
6
|
-
|
|
7
|
-
steps:
|
|
8
|
-
- checkout
|
|
9
|
-
|
|
10
|
-
- restore_cache:
|
|
11
|
-
keys:
|
|
12
|
-
- query-track-bundle-v2-{{ checksum "query_track.gemspec" }}
|
|
13
|
-
|
|
14
|
-
- run:
|
|
15
|
-
name: Bundle Install
|
|
16
|
-
command: bundle check || bundle install
|
|
17
|
-
|
|
18
|
-
- save_cache:
|
|
19
|
-
key: query-track-bundle-v2-{{ checksum "query_track.gemspec" }}
|
|
20
|
-
paths:
|
|
21
|
-
- vendor/bundle
|
|
22
|
-
|
|
23
|
-
- run:
|
|
24
|
-
name: Run Rspec
|
|
25
|
-
command: bundle exec rspec
|