tzispa_data 0.1.3 → 0.1.4

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: 56f610a3cf7106c34bd45ab2d5da905b89a08e4b
4
- data.tar.gz: 278804286b42bc08b41058355bb01ebd2a77fc62
3
+ metadata.gz: 01f0dadd4b7adc9d99c80f8f394ba1524be42acf
4
+ data.tar.gz: b3faf8c93ce0ffa0ba43d3e9c43e2d2bfc986079
5
5
  SHA512:
6
- metadata.gz: ddbafd22150f0e6636dfb41f14f13b3e5a7f367f1292d520382d4c6551f2e2ce1af0b2ee37bc1499e725da13ab346e6002692dc787ddd8a3e5ef917638c6d30c
7
- data.tar.gz: 33089e24a3758e1f592faa11d8f76642250677886e4c9a9a6929aa54bdb732fffc0777ae744e6ae3195ea166b617d1bf4c9a90915b73d2592a70430e603596c4
6
+ metadata.gz: d88c26dcb9256d4ad41f8c06249e9b0d0f3ad9c673c0060d9542bd57ae7eb44053cf7a6a04ecc1bfbb163ca70763f1c9e39615d0ad643173751027d87d3e16fe
7
+ data.tar.gz: 1493679c1e6cec07fb809e09548092696a9182bb99602671f3ae05667ea88c68f886c4f8cf8811416b8c2eef79637726f3180040f80a197db4c08e3a6bb889df
data/CHANGELOG.md CHANGED
@@ -1,5 +1,8 @@
1
1
  Tzispa Data
2
2
 
3
+ ## v0.1.4
4
+ - add connection validation config in adapters
5
+
3
6
  ## v0.1.3
4
7
  - remove use method
5
8
 
@@ -1,4 +1,5 @@
1
1
  require 'sequel'
2
+ require 'sequel/connection_pool/threaded'
2
3
  require 'forwardable'
3
4
 
4
5
  module Tzispa
@@ -18,7 +19,12 @@ module Tzispa
18
19
  @default = default || config.first[0].to_sym
19
20
  @pool = Hash.new.tap { |hpool|
20
21
  config.each { |key, value|
21
- hpool[key.to_sym] = Sequel.connect value.adapter
22
+ conn = Sequel.connect value.adapter, :pool_class => Sequel::ThreadedConnectionPool
23
+ if value.connection_validation
24
+ conn.extension(:connection_validator)
25
+ conn.pool.connection_validation_timeout = value.connection_validation_timeout
26
+ end
27
+ hpool[key.to_sym] = conn
22
28
  }
23
29
  }
24
30
  end
@@ -3,7 +3,7 @@
3
3
  module Tzispa
4
4
  module Data
5
5
 
6
- VERSION = '0.1.3'
6
+ VERSION = '0.1.4'
7
7
  NAME = 'Tzispa Data'
8
8
  GEM_NAME = 'tzispa_data'
9
9
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tzispa_data
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Juan Antonio Piñero