mongo-ruby-driver/lib/mongo.rb

45 lines
1.3 KiB
Ruby
Raw Normal View History

2009-11-25 16:43:25 +00:00
$:.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
2009-10-26 19:34:45 +00:00
module Mongo
ASCENDING = 1
DESCENDING = -1
VERSION = "0.18"
end
begin
2009-12-01 22:23:24 +00:00
# Need this for running test with and without c ext in Ruby 1.9.
raise LoadError if ENV['TEST_MODE'] && !ENV['C_EXT']
require 'mongo_ext/cbson'
require 'mongo/util/bson_c'
BSON = BSON_C
BSON_SERIALIZER = CBson
rescue LoadError
require 'mongo/util/bson_ruby'
BSON = BSON_RUBY
BSON_SERIALIZER = BSON
warn "\n**Notice: C extension not loaded. This is required for optimum MongoDB Ruby driver performance."
warn " You can install the extension as follows:\n gem install mongo_ext\n"
warn " If you continue to receive this message after installing, make sure that the"
warn " mongo_ext gem is in your load path. This may mean requiring rubygems.\n"
end
2009-01-13 15:23:20 +00:00
require 'mongo/types/binary'
require 'mongo/types/code'
2009-01-13 15:23:20 +00:00
require 'mongo/types/dbref'
require 'mongo/types/objectid'
require 'mongo/types/regexp_of_holding'
require 'mongo/util/support'
2009-10-26 19:34:45 +00:00
require 'mongo/util/conversions'
require 'mongo/util/server_version'
2009-12-01 22:23:24 +00:00
require 'mongo/util/bson_ruby'
require 'mongo/errors'
require 'mongo/constants'
require 'mongo/connection'
2008-11-22 01:00:51 +00:00
require 'mongo/db'
require 'mongo/cursor'
require 'mongo/collection'
2009-01-07 20:36:12 +00:00
require 'mongo/admin'