From 1c765fb3389abadd83b318fc818793691e953d8f Mon Sep 17 00:00:00 2001 From: Tyler Brock Date: Mon, 6 Feb 2012 17:45:41 -0500 Subject: [PATCH] minor: fix for require failing in tests --- Rakefile | 8 ++++---- mongo.gemspec | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Rakefile b/Rakefile index 68a239f..d733ab5 100644 --- a/Rakefile +++ b/Rakefile @@ -43,7 +43,8 @@ task :test do end namespace :test do - + $:.unshift(File.join(File.dirname(__FILE__), 'lib')) + desc "Test the driver with the C extension enabled." task :c do ENV['C_EXT'] = 'TRUE' @@ -124,7 +125,7 @@ namespace :test do task :drop_databases do |t| puts "Dropping test databases..." - require './lib/mongo' + require 'mongo' con = Mongo::Connection.new(ENV['MONGO_RUBY_DRIVER_HOST'] || 'localhost', ENV['MONGO_RUBY_DRIVER_PORT'] || Mongo::Connection::DEFAULT_PORT) con.database_names.each do |name| @@ -143,8 +144,7 @@ end desc "Generate YARD documentation" task :ydoc do - $:.unshift(File.join(File.dirname(__FILE__), 'lib')) - require File.join(File.dirname(__FILE__), 'lib', 'mongo') + require 'mongo' out = File.join('ydoc', Mongo::VERSION) FileUtils.rm_rf('ydoc') system "yardoc lib/**/*.rb lib/mongo/**/*.rb lib/bson/**/*.rb -e ./yard/yard_ext.rb -p yard/templates -o #{out} --title MongoRuby-#{Mongo::VERSION} --files docs/TUTORIAL.md,docs/GridFS.md,docs/FAQ.md,docs/REPLICA_SETS.md,docs/WRITE_CONCERN.md,docs/READ_PREFERENCE.md,docs/HISTORY.md,docs/CREDITS.md,docs/RELEASES.md,docs/CREDITS.md,docs/TAILABLE_CURSORS.md" diff --git a/mongo.gemspec b/mongo.gemspec index f202c35..a0e08a2 100644 --- a/mongo.gemspec +++ b/mongo.gemspec @@ -6,7 +6,7 @@ Gem::Specification.new do |s| s.version = Mongo::VERSION s.platform = Gem::Platform::RUBY - s.summary = 'Ruby driver for the MongoDB' + s.summary = 'Ruby driver for MongoDB' s.description = 'A Ruby driver for MongoDB. For more information about Mongo, see http://www.mongodb.org.' s.require_paths = ['lib']