clickhouse-rails 0.1.2 → 0.1.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
  SHA256:
3
- metadata.gz: fb4718899c50eee5d790b88331caa67e07cdc38eac66ea865aeee62401db37b0
4
- data.tar.gz: 15b86279df212a677bccf8437d1e4e52715fb0e515b3b8fcaaf8a5cad3bcd9d0
3
+ metadata.gz: da6cfbbd9674a758979e7cb1192414f8fde8c9ede786b2bea503e56b529b7a8d
4
+ data.tar.gz: b696d944f694c58b9d16e74a249bd62bbe08cd6a5c9b76772a3e919401478d41
5
5
  SHA512:
6
- metadata.gz: 887ed3d0538f74d8ea648445d04fcb1d941ee2009a8baf5ad05ff3c4783c9dd2f63b08d4f96b8a41578c8d0016e1799df2bfb5a3d7252ff1788fb0b86a5aebf1
7
- data.tar.gz: 2d2dc371a8fa84e164505913a6151dd479d82918ec8b54f4b7b042cee8432e0993d3371109097b65008de0694bcce10a9d28099caf22eb0d531e0984d4823927
6
+ metadata.gz: 2147c69cb904f442f8a72b5d6647f1f7d64d6f2efb3c98d5b96794213df8795cb609fb9a2ef25d31e44d8b6c0e2b82cf0a3b7539a1cf76928a756f3c9e3a687d
7
+ data.tar.gz: e81e714fbd80f81fdccd967f4573528ed08be28a8d79b9b1112a38a3507ed538976c2cc6e176eeabb0cbee6830e7f401cc3454f8c72a9a713c52a3f6c031d415
@@ -4,7 +4,7 @@ require 'clickhouse/rails/config'
4
4
  module Clickhouse
5
5
  module Rails
6
6
  def self.init!
7
- Clickhouse.establish_connection(config)
7
+ config && Clickhouse.establish_connection(config)
8
8
  end
9
9
 
10
10
  def self.config(config_path = nil)
@@ -22,8 +22,10 @@ module Clickhouse
22
22
  end
23
23
 
24
24
  def self.config_mapper(source)
25
+ return nil if source.nil?
26
+
25
27
  {
26
- urls: source['hosts'].split(','),
28
+ urls: source['hosts']&.split(','),
27
29
  username: source['username'],
28
30
  password: source['password']
29
31
  }
@@ -1,5 +1,5 @@
1
1
  module Clickhouse
2
2
  module Rails
3
- VERSION = '0.1.2'.freeze
3
+ VERSION = '0.1.3'.freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: clickhouse-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vsevolod Avramov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-05-02 00:00:00.000000000 Z
11
+ date: 2019-05-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: clickhouse