Sha256: 8de3ba8beaf0d7470ec8667c69675c492ded250130039c24501f93513be22bbf

Contents?: true

Size: 466 Bytes

Versions: 28

Compression:

Stored size: 466 Bytes

Contents

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

  def self.travis?
    !!ENV['TRAVIS']
  end

  @test_port ||= spawn_zookeeper? ? 21811 : 2181

  class << self
    attr_accessor :test_port
  end

  # argh, blah, this affects ZK.new everywhere (which is kind of the point, but
  # still gross)
  self.default_port = self.test_port

  # only for testing is this done
  if host = ENV['ZK_DEFAULT_HOST']
    self.default_host = host
  end
end

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
zk-1.6.0 spec/support/00_test_port_attr.rb
zk-1.5.3 spec/support/00_test_port_attr.rb
zk-1.5.2 spec/support/00_test_port_attr.rb
zk-1.5.1 spec/support/00_test_port_attr.rb
zk-1.5.0 spec/support/00_test_port_attr.rb
zk-1.4.2 spec/support/00_test_port_attr.rb
zk-1.4.1 spec/support/00_test_port_attr.rb
zk-1.4.0 spec/support/00_test_port_attr.rb