debian/0000755000000000000000000000000012212007624007162 5ustar debian/ruby-tests.rb0000644000000000000000000000007412212007624011631 0ustar $: << "./test/" Dir["test/unit/*.rb"].each { |f| require f} debian/examples0000644000000000000000000000002212212007624010715 0ustar bin/mongo_console debian/source/0000755000000000000000000000000012212007624010462 5ustar debian/source/format0000644000000000000000000000001412212007624011670 0ustar 3.0 (quilt) debian/control0000644000000000000000000000171312212007624010567 0ustar Source: ruby-mongo Section: ruby Priority: optional Maintainer: Debian Ruby Extras Maintainers Uploaders: Prach Pongpanich Build-Depends: debhelper (>= 7.0.50~), gem2deb (>= 0.3.0~), ruby-bson (>= 1.9.2), ruby-bson-ext (>= 1.9.2), ruby-mocha (>= 0.13.3), ruby-shoulda Standards-Version: 3.9.4 Vcs-Git: git://anonscm.debian.org/pkg-ruby-extras/ruby-mongo.git Vcs-Browser: http://anonscm.debian.org/gitweb?p=pkg-ruby-extras/ruby-mongo.git;a=summary Homepage: http://www.mongodb.org XS-Ruby-Versions: all Package: ruby-mongo Architecture: all XB-Ruby-Versions: ${ruby:Versions} Depends: ruby | ruby-interpreter, ruby-bson (>= 1.9.2), ruby-bson-ext (>=1.9.2), ${misc:Depends}, ${shlibs:Depends} Description: Ruby driver for MongoDB This package provides an interface for communicating with the MongoDB database in Ruby . For more information about Mongo, see http://www.mongodb.org. debian/rules0000755000000000000000000000101712212007624010241 0ustar #!/usr/bin/make -f #export DH_VERBOSE=1 # # Uncomment to ignore all test failures (but the tests will run anyway) #export DH_RUBY_IGNORE_TESTS=all # # Uncomment to ignore some test failures (but the tests will run anyway). # Valid values: #export DH_RUBY_IGNORE_TESTS=ruby1.8 ruby1.9.1 require-rubygems # # If you need to specify the .gemspec (eg there is more than one) #export DH_RUBY_GEMSPEC=gem.gemspec %: dh $@ --buildsystem=ruby --with ruby override_dh_auto_install: dh_auto_install rm -rf debian/ruby-mongo/usr/bin debian/compat0000644000000000000000000000000212212007624010360 0ustar 7 debian/watch0000644000000000000000000000013712212007624010214 0ustar version=3 http://pkg-ruby-extras.alioth.debian.org/cgi-bin/gemwatch/mongo .*/mongo-(.*).tar.gz debian/patches/0000755000000000000000000000000012212007624010611 5ustar debian/patches/enable_run_tests.patch0000644000000000000000000000632712212007624015176 0ustar Description: for enable run tests at build time Author: Prach Pongpanich --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -19,116 +19,10 @@ rescue LoadError # failed to load, skipping pry end -# SimpleCov must load before our code - A coverage report summary line will print after each test suite -if RUBY_VERSION >= '1.9.0' && RUBY_ENGINE == 'ruby' - if ENV.key?('COVERAGE') - require 'simplecov' - SimpleCov.start do - add_group "Mongo", 'lib/mongo' - add_group "BSON", 'lib/bson' - add_filter "/test/" - merge_timeout 3600 - command_name ENV['SIMPLECOV_COMMAND_NAME'] if ENV.has_key?('SIMPLECOV_COMMAND_NAME') - end - end -end -gem 'test-unit' # Do NOT remove this line - gem version is needed for Test::Unit::TestCase.shutdown require 'test/unit' require 'tools/mongo_config' - -class Test::Unit::TestCase - - TEST_DATA = File.join(File.dirname(__FILE__), 'fixtures/data') - - def ensure_cluster(kind=nil, opts={}) - @@cluster ||= nil - - unless @@cluster - if kind == :rs - cluster_opts = Mongo::Config::DEFAULT_REPLICA_SET.dup - else - cluster_opts = Mongo::Config::DEFAULT_SHARDED_SIMPLE.dup - end - - cluster_opts.merge!(opts) - - dbpath = ENV['DBPATH'] || 'data' - cluster_opts.merge!(:dbpath => dbpath) - - #debug 1, opts - config = Mongo::Config.cluster(cluster_opts) - #debug 1, config - @@cluster = Mongo::Config::ClusterManager.new(config) - - Test::Unit::TestCase.class_eval do - @@force_shutdown = false - - def self.shutdown - if @@force_shutdown || /rake_test_loader/ !~ $0 - @@cluster.stop - @@cluster.clobber - end - end - end - end - - @@cluster.start - instance_variable_set("@#{kind}", @@cluster) - end - - # Generic code for rescuing connection failures and retrying operations. - # This could be combined with some timeout functionality. - def rescue_connection_failure(max_retries=30) - retries = 0 - begin - yield - rescue Mongo::ConnectionFailure => ex - #puts "Rescue attempt #{retries}: from #{ex}" - retries += 1 - raise ex if retries > max_retries - sleep(2) - retry - end - end -end - -def silently - warn_level = $VERBOSE - $VERBOSE = nil - begin - result = yield - ensure - $VERBOSE = warn_level - end - result -end - -begin - silently { require 'shoulda' } - silently { require 'mocha/setup' } -rescue LoadError - puts < License: Apache-2.0 License: Apache-2.0 Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at . http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. . On Debian systems, the full text of the Apache License version 2.0 can be found in the file `/usr/share/common-licenses/Apache-2.0'. debian/changelog0000644000000000000000000000104512212007624011034 0ustar ruby-mongo (1.9.2-1) unstable; urgency=low * Imported Upstream version 1.9.2 * Bump dependency on ruby-bson and ruby-bson-ext to 1.9.2 -- Prach Pongpanich Thu, 05 Sep 2013 11:58:33 +0700 ruby-mongo (1.9.1-1) unstable; urgency=low * New upstream release * Bump dependency version -- Prach Pongpanich Fri, 12 Jul 2013 20:54:08 +0700 ruby-mongo (1.9.0-1) unstable; urgency=low * Initial release (Closes: #705501) -- Prach Pongpanich Tue, 11 Jun 2013 23:03:11 +0700