query_diet 0.7.0 → 0.7.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/lib/query_diet/active_record_ext.rb +11 -3
- data/lib/query_diet/version.rb +1 -1
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: adc811cbb6edd8cca833ee1aa21c21bffd0462033efcc285ee823f60cc11fcb5
|
4
|
+
data.tar.gz: faf9dc0518a10f0809c6412b724abc35739d9a42228667f4a9061a1e70279e14
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c6dce92be326127f4bdff50baa94df1fb483be0819071a691cc76bc516aa46175c94b5394d5753a4018298b658c5d30a24003134dae0f609f5c6f77ff70be7bd
|
7
|
+
data.tar.gz: 1e532fa2a7d53732881cfccdaed64e3d2bddfd0ba0f484cd0a02e598d0cebf4d1d2183eff0481034e7e710df629e2f8282cb3608d01db4d7b2f7e257186bf2fd
|
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
Query Diet [![
|
1
|
+
Query Diet [![Tests](https://github.com/makandra/query_diet/workflows/Tests/badge.svg)](https://github.com/makandra/query_diet/actions)
|
2
2
|
==========
|
3
3
|
|
4
4
|
Query Diet counts the number of database queries for the last request and *subtly* displays it in the upper right corner of your screen.
|
@@ -67,7 +67,7 @@ Rails.application.config.content_security_policy do |policy|
|
|
67
67
|
|
68
68
|
### Rails compatibility
|
69
69
|
|
70
|
-
The gem is tested to work with Rails 3.2+ and Ruby 2.
|
70
|
+
The gem is tested to work with Rails 3.2+ and Ruby 2.5.8+.
|
71
71
|
|
72
72
|
For Rails 2.3 and Ruby 1.8.7 support, use a version < 0.6.
|
73
73
|
|
@@ -1,9 +1,17 @@
|
|
1
1
|
module QueryDiet
|
2
2
|
module ActiveRecordExt
|
3
|
-
|
4
|
-
|
3
|
+
if RUBY_VERSION >= '3'
|
4
|
+
def log(query, *, **)
|
5
|
+
QueryDiet::Logger.log(query) { super }
|
6
|
+
end
|
7
|
+
else
|
8
|
+
def log(query, *)
|
9
|
+
QueryDiet::Logger.log(query) { super }
|
10
|
+
end
|
5
11
|
end
|
6
12
|
end
|
7
13
|
end
|
8
14
|
|
9
|
-
|
15
|
+
ActiveSupport.on_load(:active_record) do
|
16
|
+
ActiveRecord::ConnectionAdapters::AbstractAdapter.send(:prepend, QueryDiet::ActiveRecordExt)
|
17
|
+
end
|
data/lib/query_diet/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: query_diet
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Henning Koch
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2024-08-21 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: Rails database query counter that stays out of your way
|
15
15
|
email: github@makandra.de
|
@@ -28,7 +28,8 @@ files:
|
|
28
28
|
homepage: https://github.com/makandra/query_diet
|
29
29
|
licenses:
|
30
30
|
- MIT
|
31
|
-
metadata:
|
31
|
+
metadata:
|
32
|
+
rubygems_mfa_required: 'true'
|
32
33
|
post_install_message:
|
33
34
|
rdoc_options: []
|
34
35
|
require_paths:
|
@@ -44,7 +45,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
44
45
|
- !ruby/object:Gem::Version
|
45
46
|
version: '0'
|
46
47
|
requirements: []
|
47
|
-
rubygems_version: 3.
|
48
|
+
rubygems_version: 3.5.11
|
48
49
|
signing_key:
|
49
50
|
specification_version: 4
|
50
51
|
summary: Rails database query counter that stays out of your way
|