roqua-support 0.1.30 → 0.1.31
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
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ed3f4fd495ac70793c3205d0ef1d26c30660c7e8
|
|
4
|
+
data.tar.gz: 673b3bee6a8251f9cb0f2c8700f9e42c0444a5c9
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: cc14ae28e46cc910743f30789d8aa133a662353272b1a2650dabb905cf69b39fd1feb5a3b8b71db03655d0bdc5246b806ac5c616f1154815dc2702b1e55b6a91
|
|
7
|
+
data.tar.gz: e4bdbcae705a0c8b1879602ed920c1798106b0c9458ea6a55b3e4f4cb52602466ba7a5db78faccbd823cbdeb96daaf7673ce117cb580fdd091d4a01bb30edd0c
|
data/Gemfile.lock
CHANGED
|
@@ -2,10 +2,8 @@ module Roqua
|
|
|
2
2
|
module StatusChecks
|
|
3
3
|
module CheckDbConnection
|
|
4
4
|
def self.connected?
|
|
5
|
-
ActiveRecord::Base.
|
|
6
|
-
|
|
7
|
-
ActiveRecord::Base.connected?
|
|
8
|
-
rescue
|
|
5
|
+
ActiveRecord::Base.connection.active?
|
|
6
|
+
rescue StandardError
|
|
9
7
|
false # Check must return boolean, not an exception.
|
|
10
8
|
end
|
|
11
9
|
end
|
|
@@ -2,14 +2,11 @@ require 'spec_helper'
|
|
|
2
2
|
|
|
3
3
|
describe 'Roqua::StatusChecks::CheckDbConnection' do
|
|
4
4
|
it 'returns true when there is a db connection' do
|
|
5
|
-
allow(ActiveRecord::Base).to receive(:establish_connection).and_return(true)
|
|
6
|
-
allow(ActiveRecord::Base).to receive(:connection).and_return(true)
|
|
7
|
-
allow(ActiveRecord::Base).to receive(:connected?).and_return(true)
|
|
8
|
-
|
|
9
5
|
expect(Roqua::StatusChecks::CheckDbConnection.connected?).to be_truthy
|
|
10
6
|
end
|
|
11
7
|
|
|
12
8
|
it 'returns false when there is no db configured' do
|
|
9
|
+
allow(ActiveRecord::Base).to receive_message_chain(:connection, :active?).and_return(false)
|
|
13
10
|
expect(Roqua::StatusChecks::CheckDbConnection.connected?).to be_falsey
|
|
14
11
|
end
|
|
15
12
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: roqua-support
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.31
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Marten Veldthuis
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2018-04-
|
|
11
|
+
date: 2018-04-19 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: active_interaction
|