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.10.0 spec/support/00_test_port_attr.rb
zk-1.9.6 spec/support/00_test_port_attr.rb
zk-1.9.5 spec/support/00_test_port_attr.rb
zk-1.9.4 spec/support/00_test_port_attr.rb
zk-1.9.3 spec/support/00_test_port_attr.rb
zk-1.9.2 spec/support/00_test_port_attr.rb
zk-1.9.1 spec/support/00_test_port_attr.rb
zk-1.9.0 spec/support/00_test_port_attr.rb
zk-1.8.0 spec/support/00_test_port_attr.rb
zk-1.7.5 spec/support/00_test_port_attr.rb
zk-1.7.4 spec/support/00_test_port_attr.rb
zk-1.7.3 spec/support/00_test_port_attr.rb
zk-1.7.2 spec/support/00_test_port_attr.rb
zk-1.7.1 spec/support/00_test_port_attr.rb
zk-1.7.0 spec/support/00_test_port_attr.rb
zk-1.6.5 spec/support/00_test_port_attr.rb
zk-1.6.4 spec/support/00_test_port_attr.rb
zk-1.6.3 spec/support/00_test_port_attr.rb
zk-1.6.2 spec/support/00_test_port_attr.rb
zk-1.6.1 spec/support/00_test_port_attr.rb