roqua-support 0.1.30 → 0.1.31

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: 2a7e7e17065382daf49bff625d1a8008a0a4c0ba
4
- data.tar.gz: 9a6b746e175193312045d7a94dc67a57d55577bb
3
+ metadata.gz: ed3f4fd495ac70793c3205d0ef1d26c30660c7e8
4
+ data.tar.gz: 673b3bee6a8251f9cb0f2c8700f9e42c0444a5c9
5
5
  SHA512:
6
- metadata.gz: b507ccf0d36fc1941ad3bfb8f4a2714ce0da6e435a6c7356016ecdaffd7d77a6617822803b8ec8e4521b349d9befc228220f1f311248690f87880cfb2a46cfa8
7
- data.tar.gz: 9140cb6bc4ea4b6c7b0e13276b0474b4cb3365238cb7e9166d717e85cc80d3eed2f47d7f0997c706cfe6be91afbb662d8abfa09f6dc2a7f536738718e1dd2374
6
+ metadata.gz: cc14ae28e46cc910743f30789d8aa133a662353272b1a2650dabb905cf69b39fd1feb5a3b8b71db03655d0bdc5246b806ac5c616f1154815dc2702b1e55b6a91
7
+ data.tar.gz: e4bdbcae705a0c8b1879602ed920c1798106b0c9458ea6a55b3e4f4cb52602466ba7a5db78faccbd823cbdeb96daaf7673ce117cb580fdd091d4a01bb30edd0c
data/Gemfile.lock CHANGED
@@ -8,7 +8,7 @@ GIT
8
8
  PATH
9
9
  remote: .
10
10
  specs:
11
- roqua-support (0.1.30)
11
+ roqua-support (0.1.31)
12
12
  active_interaction (~> 3.0)
13
13
  activesupport (>= 3.2, < 6)
14
14
  naught (~> 1.0)
@@ -1,5 +1,5 @@
1
1
  module Roqua
2
2
  module Support
3
- VERSION = '0.1.30'.freeze
3
+ VERSION = '0.1.31'.freeze
4
4
  end
5
5
  end
@@ -2,10 +2,8 @@ module Roqua
2
2
  module StatusChecks
3
3
  module CheckDbConnection
4
4
  def self.connected?
5
- ActiveRecord::Base.establish_connection
6
- ActiveRecord::Base.connection
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.30
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-16 00:00:00.000000000 Z
11
+ date: 2018-04-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: active_interaction