lib/mongo.rb in mongo-1.3.1 vs lib/mongo.rb in mongo-1.4.0
- old
+ new
@@ -16,13 +16,11 @@
# limitations under the License.
# ++
$:.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
-module Mongo
- VERSION = "1.3.1"
-end
+require 'mongo/version'
module Mongo
ASCENDING = 1
DESCENDING = -1
GEO2D = '2d'
@@ -56,12 +54,16 @@
require 'bson'
require 'mongo/util/conversions'
require 'mongo/util/support'
require 'mongo/util/core_ext'
+require 'mongo/util/logging'
+require 'mongo/util/node'
require 'mongo/util/pool'
+require 'mongo/util/pool_manager'
require 'mongo/util/server_version'
+require 'mongo/util/ssl_socket'
require 'mongo/util/uri_parser'
require 'mongo/collection'
require 'mongo/connection'
require 'mongo/repl_set_connection'
@@ -74,24 +76,7 @@
if RUBY_PLATFORM =~ /java/
require 'mongo/gridfs/grid_io_fix'
end
require 'mongo/gridfs/grid_file_system'
-# Use SystemTimer on Ruby 1.8
-if !defined?(RUBY_ENGINE) || (RUBY_ENGINE == 'ruby' && RUBY_VERSION < '1.9.0')
- begin
- require 'system_timer'
- if SystemTimer.method(:timeout).arity.abs != 2
- raise LoadError
- end
- Mongo::TimeoutHandler = SystemTimer
- rescue LoadError
- warn "Could not load SystemTimer >= v1.2.0. Falling back to timeout.rb. " +
- "SystemTimer is STRONGLY recommended for timeouts in Ruby 1.8.7. " +
- "See http://ph7spot.com/blog/system-timer-1-2-release for details."
- require 'timeout'
- Mongo::TimeoutHandler = Timeout
- end
-else
- require 'timeout'
- Mongo::TimeoutHandler = Timeout
-end
+require 'timeout'
+Mongo::TimeoutHandler = Timeout