Sha256: d8271a75778e69306607a598a3514043ccbeab2a158d544caa15d2d837ee733a

Contents?: true

Size: 613 Bytes

Versions: 6

Compression:

Stored size: 613 Bytes

Contents

#!/usr/bin/env ruby

require File.join(File.dirname(__FILE__), '_common.rb')
db = Connection.new(DEFAULT_HOST, DEFAULT_PORT).db(DEFAULT_DB)

db.collection('test').insert({'test' => 1})
admin = db.admin

if $DEBUG
  db.drop_collection('tester')
  admin.profiling_level = :slow_only
end

['test', 'pdlskwmf', '$'].each { |name|
  begin
    admin.validate_collection(name)
    puts 'true'
  rescue => ex
    puts 'false'
  end
}

level_xlation = {:off => 'off', :all => 'all', :slow_only => 'slowOnly'}
puts level_xlation[admin.profiling_level]
admin.profiling_level = :off
puts level_xlation[admin.profiling_level]

Version data entries

6 entries across 6 versions & 3 rubygems

Version Path
mongodb-mongo-0.13 test/mongo-qa/admin
mongodb-mongo-0.14.1 test/mongo-qa/admin
mongodb-mongo-0.14 test/mongo-qa/admin
pahagon-mongo-abd-0.14.1 test/mongo-qa/admin
mongo-0.15.1 test/mongo-qa/admin
mongo-0.15 test/mongo-qa/admin