cellect-client 0.0.5 → 0.0.6

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: d7f53935b9eef4548e6e3887e48350be43f639be
4
- data.tar.gz: 8e397e85876ea09b375aff057656dcb4ef78ef41
3
+ metadata.gz: 8d448a374ace74bd7bd7d19df1af369446ccc13e
4
+ data.tar.gz: 2abee2c7e1334107a6fe00fa2c24bc684db5eed4
5
5
  SHA512:
6
- metadata.gz: e98b91839414e7bdc54ad16b5feaf3788d0bc0d5a3701977b20bdcb4cf55260a024d33f9c77e58d2bcf21a2b44506cdaf1a881fb694e1fbe5a87e793aeba76a2
7
- data.tar.gz: a5243534696310ee3618c4168ca929eecc3e7d5ee307b01ff26334b32d2ffef58abace65a23e3e009d0e0240697cb77f7ac8b9c5d8c0a2e3959309f7881317f6
6
+ metadata.gz: b39539587809b17605c5eb3f24961473d1411985a65d46c903cd936ef80d2b7e0a38d8f7a57cecd593442f1a88a1e2ee7a2ea3df5768b3b190778b63a80bd0b9
7
+ data.tar.gz: f18e1d343e353733fe18ffd30c0995c8fc1166e8b9b87e5e45696512a1a88aa2f81733631134a1ac55db935927598c628f6f98d5a32aca7990f571fcee258356
@@ -22,10 +22,6 @@ module Cellect
22
22
  node_set.nodes.values.sample
23
23
  end
24
24
 
25
- def self.mock_zookeeper?
26
- false
27
- end
28
-
29
25
  if defined?(::Rails)
30
26
  require 'cellect/client/railtie'
31
27
  else
@@ -9,7 +9,7 @@ module Cellect
9
9
  ensure_config_environment config
10
10
  config = config[Rails.env].symbolize_keys
11
11
  ensure_config_url config
12
- connect_zookeeper config if Client.mock_zookeeper?
12
+ connect_zookeeper config if load_zookeeper
13
13
  end
14
14
 
15
15
  private
@@ -37,6 +37,12 @@ module Cellect
37
37
  Client.node_set config[:zk_url]
38
38
  Client.connection = Connection.pool size: config.fetch(:pool_size, 100)
39
39
  end
40
+
41
+ def load_zookeeper
42
+ !Client.mock_zookeeper?
43
+ rescue NoMethodError
44
+ true
45
+ end
40
46
  end
41
47
  end
42
48
  end
@@ -1,3 +1,3 @@
1
1
  module Cellect
2
- VERSION = '0.0.5'
2
+ VERSION = '0.0.6'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cellect-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Parrish