Sha256: 85a6e99337ea38af6f1ac419bf90eb6a8be95b8cafadbd579746bffa9c1138a5

Contents?: true

Size: 614 Bytes

Versions: 24

Compression:

Stored size: 614 Bytes

Contents

ENV['CASSANDRA'] ||= "/usr/local/cassandra/bin/cassandra"

if ENV['CASSANDRA_REQUIRED']
  tmp = File.expand_path(File.join(File.dirname(__FILE__), '..', 'tmp'))
  config = File.expand_path(File.join(File.dirname(__FILE__), 'config'))

  $pid = fork {
    Dir.chdir(tmp)
    puts "CASSANDRA_INCLUDE=#{config}/cassandra.in.sh #{ENV['CASSANDRA']} -f"
  }

  # Wait for cassandra to boot
  sleep 3
end

puts "Connecting..."
CassandraObject::Base.establish_connection "CassandraObject"

if defined?($pid)
  at_exit do
    puts "Shutting down Cassandra..."
    Process.kill('INT', $pid)
    Process.wait($pid)
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
gotime-cassandra_object-2.2.0 test-old/connection.rb
gotime-cassandra_object-2.1.2 test-old/connection.rb
gotime-cassandra_object-2.1.1 test-old/connection.rb
gotime-cassandra_object-2.1.0 test-old/connection.rb
gotime-cassandra_object-2.0.0 test-old/connection.rb
gotime-cassandra_object-0.9.1 test/connection.rb
gotime-cassandra_object-0.9.0 test/connection.rb
gotime-cassandra_object-0.8.7 test/connection.rb
gotime-cassandra_object-0.8.6 test/connection.rb
gotime-cassandra_object-0.8.5 test/connection.rb
gotime-cassandra_object-0.8.4 test/connection.rb
gotime-cassandra_object-0.8.3 test/connection.rb
gotime-cassandra_object-0.8.2 test/connection.rb
gotime-cassandra_object-0.8.1 test/connection.rb
gotime-cassandra_object-0.8.0 test/connection.rb
gotime-cassandra_object-0.7.8 test/connection.rb
gotime-cassandra_object-0.7.7 test/connection.rb
gotime-cassandra_object-0.7.6 test/connection.rb
gotime-cassandra_object-0.7.5 test/connection.rb
gotime-cassandra_object-0.7.4 test/connection.rb