heartcheck-activerecord 0.0.2 → 0.0.3

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
  SHA1:
3
- metadata.gz: 18f0abd45169b249c08b30bb1108b0f494798f4c
4
- data.tar.gz: dd33c24899f3a089aaf222433b7b6de6e3a2d5ae
3
+ metadata.gz: 3c68461e276639ca91c1ef9c74a1b249f64ae771
4
+ data.tar.gz: 84312b4685fd49a71aeed56cd68756115c124999
5
5
  SHA512:
6
- metadata.gz: 5259f01d257096fe43222493af78aa8850f22d75e7d500fb38b34ef22b52f3d1899bbb86605d134dbbaf1476b30a069a9ec9bb59b6d5e9c0a42fb43577177a38
7
- data.tar.gz: c093a099d2430f86b001f2e61c2f4fd1de77c264071a206bb6346eae0910952039d02f8007e0c60bc4fbc109a41459ba4d43c4f5c3398a4a1629481d32a90199
6
+ metadata.gz: 5c23fd860e5631990bc5792b319e5569a470efe79d66977e6e0a86499c4fcbc536cf47607eea924f79c8e6a87c11c8a82df1d6c2e68207d6661f6151e27f8306
7
+ data.tar.gz: f7d885c7659b45b36e57ce9bbe55fc77f4087378fc1eadb0c6443249ed827c0a277641f73e03d9cf4527f2284566734378804f6a17a3ec137eb04c6bb403859d
@@ -2,6 +2,6 @@
2
2
  module Heartcheck
3
3
  # gem version
4
4
  module Activerecord
5
- VERSION = '0.0.2'
5
+ VERSION = '0.0.3'
6
6
  end
7
7
  end
@@ -9,9 +9,12 @@ module Heartcheck
9
9
  def validate
10
10
  services.each do |service|
11
11
  begin
12
- service[:connection].execute('select 1')
12
+ connection = service[:connection]
13
+ connection.execute('select 1')
13
14
  rescue
14
15
  append_error(service)
16
+ ensure
17
+ connection.close
15
18
  end
16
19
  end
17
20
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: heartcheck-activerecord
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Locaweb