query_track 0.0.9 → 0.0.10
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 +26 -19
- data/README.md +14 -3
- data/lib/query_track/notifications/log.rb +1 -1
- data/lib/query_track/settings.rb +2 -0
- data/lib/query_track/trace.rb +1 -1
- data/lib/query_track/version.rb +1 -1
- metadata +4 -4
- 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: 9a04e764f76a05fd9b2d460c5bfc80e914cc93106f82baf2fc17ea7127d3de54
|
4
|
+
data.tar.gz: 503f4c69a63a6560aa9fef9c4fc6b83cea121c096f214b5673104c7ddcdae632
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c7d581c2148d9d9ba0158e619ab8ee4da9e8dcbf97168d1a8e59b938d747f34ec858210213f42b92efe32763d4859599557529b4b5dabaf1d96ce9956216824e
|
7
|
+
data.tar.gz: ada85f10a3991b8c291285510f5eb0838eff0ee290284111af88004b8f293a5b1adadfd3f9eee1272e1d316293d1268ddb23c63808818ab100ef696bcb494c6e
|
@@ -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
@@ -9,30 +9,33 @@ PATH
|
|
9
9
|
GEM
|
10
10
|
remote: https://rubygems.org/
|
11
11
|
specs:
|
12
|
-
activesupport (6.0.2
|
12
|
+
activesupport (6.0.3.2)
|
13
13
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
14
14
|
i18n (>= 0.7, < 2)
|
15
15
|
minitest (~> 5.1)
|
16
16
|
tzinfo (~> 1.1)
|
17
|
-
zeitwerk (~> 2.2)
|
18
|
-
ast (2.4.
|
19
|
-
byebug (11.
|
20
|
-
concurrent-ruby (1.1.
|
17
|
+
zeitwerk (~> 2.2, >= 2.2.2)
|
18
|
+
ast (2.4.1)
|
19
|
+
byebug (11.1.3)
|
20
|
+
concurrent-ruby (1.1.6)
|
21
21
|
diff-lcs (1.3)
|
22
|
-
dry-configurable (0.
|
22
|
+
dry-configurable (0.11.6)
|
23
23
|
concurrent-ruby (~> 1.0)
|
24
24
|
dry-core (~> 0.4, >= 0.4.7)
|
25
|
+
dry-equalizer (~> 0.2)
|
25
26
|
dry-core (0.4.9)
|
26
27
|
concurrent-ruby (~> 1.0)
|
27
|
-
|
28
|
+
dry-equalizer (0.3.0)
|
29
|
+
i18n (1.8.3)
|
28
30
|
concurrent-ruby (~> 1.0)
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
ast (~> 2.4.0)
|
31
|
+
minitest (5.14.1)
|
32
|
+
parallel (1.19.2)
|
33
|
+
parser (2.7.1.4)
|
34
|
+
ast (~> 2.4.1)
|
34
35
|
rainbow (3.0.0)
|
35
36
|
rake (13.0.1)
|
37
|
+
regexp_parser (1.7.1)
|
38
|
+
rexml (3.2.4)
|
36
39
|
rspec (3.9.0)
|
37
40
|
rspec-core (~> 3.9.0)
|
38
41
|
rspec-expectations (~> 3.9.0)
|
@@ -46,20 +49,24 @@ GEM
|
|
46
49
|
diff-lcs (>= 1.2.0, < 2.0)
|
47
50
|
rspec-support (~> 3.9.0)
|
48
51
|
rspec-support (3.9.0)
|
49
|
-
rubocop (0.
|
50
|
-
jaro_winkler (~> 1.5.1)
|
52
|
+
rubocop (0.87.1)
|
51
53
|
parallel (~> 1.10)
|
52
|
-
parser (>= 2.
|
54
|
+
parser (>= 2.7.1.1)
|
53
55
|
rainbow (>= 2.2.2, < 4.0)
|
56
|
+
regexp_parser (>= 1.7)
|
57
|
+
rexml
|
58
|
+
rubocop-ast (>= 0.1.0, < 1.0)
|
54
59
|
ruby-progressbar (~> 1.7)
|
55
|
-
unicode-display_width (>= 1.4.0, <
|
60
|
+
unicode-display_width (>= 1.4.0, < 2.0)
|
61
|
+
rubocop-ast (0.1.0)
|
62
|
+
parser (>= 2.7.0.1)
|
56
63
|
ruby-progressbar (1.10.1)
|
57
64
|
slack_hook (0.1.2)
|
58
65
|
thread_safe (0.3.6)
|
59
|
-
tzinfo (1.2.
|
66
|
+
tzinfo (1.2.7)
|
60
67
|
thread_safe (~> 0.1)
|
61
|
-
unicode-display_width (1.
|
62
|
-
zeitwerk (2.
|
68
|
+
unicode-display_width (1.7.0)
|
69
|
+
zeitwerk (2.3.0)
|
63
70
|
|
64
71
|
PLATFORMS
|
65
72
|
ruby
|
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
data/lib/query_track/trace.rb
CHANGED
data/lib/query_track/version.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.10
|
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: 2020-08-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -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"
|
@@ -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.0.
|
176
|
+
rubygems_version: 3.0.6
|
177
177
|
signing_key:
|
178
178
|
specification_version: 4
|
179
179
|
summary: Finding time-consuming database queries for ActiveRecord-based Rails Apps
|
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
|