Sha256: be32f5e1fd1850fa38a04809e570fc877208dec54c9a1981610ad55ba6c2c27d

Contents?: true

Size: 337 Bytes

Versions: 12

Compression:

Stored size: 337 Bytes

Contents

module Zookeeper
  def self.spawn_zookeeper?
    !!ENV['SPAWN_ZOOKEEPER']
  end

  def self.default_cnx_host
    ENV['ZK_DEFAULT_HOST'] || 'localhost'
  end

  @test_port ||= spawn_zookeeper? ? 21811 : 2181

  class << self
    attr_accessor :test_port
  end

  def self.default_cnx_str
    "#{default_cnx_host}:#{test_port}"
  end
end

Version data entries

12 entries across 12 versions & 2 rubygems

Version Path
zookeeper-1.5.5 spec/support/10_spawn_zookeeper.rb
zookeeper-1.5.5-java spec/support/10_spawn_zookeeper.rb
zookeeper-1.5.4 spec/support/10_spawn_zookeeper.rb
zookeeper-1.5.4-java spec/support/10_spawn_zookeeper.rb
zookeeper-1.5.3 spec/support/10_spawn_zookeeper.rb
zookeeper-1.5.3-java spec/support/10_spawn_zookeeper.rb
zookeeper-ng-1.5.2.1 spec/support/10_spawn_zookeeper.rb
zookeeper-ng-1.5.2.1-java spec/support/10_spawn_zookeeper.rb
zookeeper-1.5.1-java spec/support/10_spawn_zookeeper.rb
zookeeper-1.5.1 spec/support/10_spawn_zookeeper.rb
zookeeper-1.5.0-java spec/support/10_spawn_zookeeper.rb
zookeeper-1.5.0 spec/support/10_spawn_zookeeper.rb