sql_spy 0.4.0 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/sql_spy.rb +8 -3
- data/sql_spy.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 287963cc1eff0c73997b9d8ef4fbcefebce45b2799a6406041e1ec100961cabf
|
4
|
+
data.tar.gz: a19370274527d317538a587055e6b9dd1924d3c19f1e9434e0ce7a48161fabd0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: be06e6c37a51d3e8d60634a6a7be338ea4bcf66d01108ee84bc7d2c2f31995b4dc1d49eef51b9908733282dad7c3168eb0d38c643164570e941c80baec2ad2c7
|
7
|
+
data.tar.gz: df4712e2a6dc8f202d272f9faa3121a17935ace86ffb6d0c21b5f8c14cde2abee8cfec7aff6f934098146e17732f737f8c30b82bfe4410cbde22aa1e00676872
|
data/Gemfile.lock
CHANGED
data/lib/sql_spy.rb
CHANGED
@@ -37,11 +37,16 @@ module SqlSpy
|
|
37
37
|
end
|
38
38
|
|
39
39
|
def self.track
|
40
|
+
|
40
41
|
tracker = Tracker.new
|
41
42
|
|
42
|
-
ActiveSupport::Notifications.subscribe("sql.active_record", tracker)
|
43
|
-
|
44
|
-
|
43
|
+
subscriber = ActiveSupport::Notifications.subscribe("sql.active_record", tracker)
|
44
|
+
|
45
|
+
begin
|
46
|
+
yield
|
47
|
+
ensure
|
48
|
+
ActiveSupport::Notifications.unsubscribe(subscriber)
|
49
|
+
end
|
45
50
|
|
46
51
|
tracker.queries
|
47
52
|
end
|
data/sql_spy.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sql_spy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Florin Lipan
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-01-27 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description:
|
14
14
|
email:
|