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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d7fe6bcb2e50a0d51ae186f60566422043ab6a8dbb159a1cc26221654954521f
4
- data.tar.gz: 9ed63e719d938fdbc94c1f44d2f304532dcc5ee28bedaef449b92db8a5ab38ab
3
+ metadata.gz: 287963cc1eff0c73997b9d8ef4fbcefebce45b2799a6406041e1ec100961cabf
4
+ data.tar.gz: a19370274527d317538a587055e6b9dd1924d3c19f1e9434e0ce7a48161fabd0
5
5
  SHA512:
6
- metadata.gz: 6c36e3858fd1dfdc83ab06538a245d0061721054bb2e17bcd5d9774a6fab23561cd7eedc0ae463f79c92eda415a52d2c430d4946dade83544fa8126382f1692f
7
- data.tar.gz: d79894d45d4c62765e56bbd3b749a3d5f772366f4e91836eda77161bc45e6dab5cf6d7be91a48e5b6847faa1ffc4339261db72a17008109ab40e99c156b8a57d
6
+ metadata.gz: be06e6c37a51d3e8d60634a6a7be338ea4bcf66d01108ee84bc7d2c2f31995b4dc1d49eef51b9908733282dad7c3168eb0d38c643164570e941c80baec2ad2c7
7
+ data.tar.gz: df4712e2a6dc8f202d272f9faa3121a17935ace86ffb6d0c21b5f8c14cde2abee8cfec7aff6f934098146e17732f737f8c30b82bfe4410cbde22aa1e00676872
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- sql_spy (0.4.0)
4
+ sql_spy (0.5.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
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
- yield
44
- ActiveSupport::Notifications.unsubscribe(tracker)
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
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = "sql_spy"
3
- spec.version = "0.4.0"
3
+ spec.version = "0.5.0"
4
4
  spec.authors = ["Florin Lipan"]
5
5
  spec.email = ["florinlipan@gmail.com"]
6
6
 
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.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: 2020-10-09 00:00:00.000000000 Z
11
+ date: 2023-01-27 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email: