[DRE-commits] [ruby-bson] 01/01: Drop d/patches
Apollon Oikonomopoulos
apoikos at moszumanska.debian.org
Wed Dec 21 17:48:28 UTC 2016
This is an automated email from the git hooks/post-receive script.
apoikos pushed a commit to branch master
in repository ruby-bson.
commit 6ca00f3449798338cf44c00d061e6b29a2aef812
Author: Apollon Oikonomopoulos <apoikos at debian.org>
Date: Wed Dec 21 19:47:25 2016 +0200
Drop d/patches
None of these patches have been relevant for quite some time.
---
debian/patches/add_require_rbconfig.patch | 15 --
debian/patches/add_test_helper.patch | 212 ----------------------
debian/patches/add_to_bson_code.patch | 19 --
debian/patches/change_require_activesupport.patch | 17 --
debian/patches/clean_test_helper.patch | 195 --------------------
debian/patches/series | 5 -
6 files changed, 463 deletions(-)
diff --git a/debian/patches/add_require_rbconfig.patch b/debian/patches/add_require_rbconfig.patch
deleted file mode 100644
index 87741d1..0000000
--- a/debian/patches/add_require_rbconfig.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-Description: add missing requirement on rbconfig
-Author: Cédric Boutillier <boutil at debian.org>
-Bug: https://jira.mongodb.org/browse/RUBY-570
-Last-Updated: 2013-03-20
-
---- a/test/bson/bson_test.rb
-+++ b/test/bson/bson_test.rb
-@@ -1,6 +1,7 @@
- # encoding:utf-8
- require 'test_helper'
- require 'set'
-+require 'rbconfig'
-
- if RUBY_VERSION < '1.9'
- silently do
diff --git a/debian/patches/add_test_helper.patch b/debian/patches/add_test_helper.patch
deleted file mode 100644
index 0e788e1..0000000
--- a/debian/patches/add_test_helper.patch
+++ /dev/null
@@ -1,212 +0,0 @@
-Description: add full test_helper from MondoDB github repo
-Author: Cédric Boutillier <boutil at debian.org>
-Bug: https://jira.mongodb.org/browse/RUBY-570
-Last-Updated: 2013-03-20
-
---- /dev/null
-+++ b/test/test_helper.rb
-@@ -0,0 +1,204 @@
-+require 'rubygems'
-+# 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__), '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 <<MSG
-+
-+This test suite requires shoulda and mocha.
-+You can install them as follows:
-+ gem install shoulda
-+ gem install mocha
-+
-+MSG
-+ exit
-+end
-+
-+unless defined? MONGO_TEST_DB
-+ MONGO_TEST_DB = 'ruby-test-db'
-+end
-+
-+unless defined? TEST_PORT
-+ TEST_PORT = ENV['MONGO_RUBY_DRIVER_PORT'] ? ENV['MONGO_RUBY_DRIVER_PORT'].to_i : Mongo::MongoClient::DEFAULT_PORT
-+end
-+
-+unless defined? TEST_HOST
-+ TEST_HOST = ENV['MONGO_RUBY_DRIVER_HOST'] || 'localhost'
-+end
-+
-+class Test::Unit::TestCase
-+ include Mongo
-+ include BSON
-+
-+ def self.standard_connection(options={}, legacy=false)
-+ if legacy
-+ Connection.new(TEST_HOST, TEST_PORT, options)
-+ else
-+ MongoClient.new(TEST_HOST, TEST_PORT, options)
-+ end
-+ end
-+
-+ def standard_connection(options={}, legacy=false)
-+ self.class.standard_connection(options, legacy)
-+ end
-+
-+ def self.host_port
-+ "#{mongo_host}:#{mongo_port}"
-+ end
-+
-+ def self.mongo_host
-+ TEST_HOST
-+ end
-+
-+ def self.mongo_port
-+ TEST_PORT
-+ end
-+
-+ def host_port
-+ self.class.host_port
-+ end
-+
-+ def mongo_host
-+ self.class.mongo_host
-+ end
-+
-+ def mongo_port
-+ self.class.mongo_port
-+ end
-+
-+ def method_name
-+ caller[0]=~/`(.*?)'/
-+ $1
-+ end
-+
-+ def step_down_command
-+ # Adding force=true to avoid 'no secondaries within 10 seconds of my optime' errors
-+ step_down_command = BSON::OrderedHash.new
-+ step_down_command[:replSetStepDown] = 5
-+ step_down_command[:force] = true
-+ step_down_command
-+ end
-+
-+ def new_mock_socket(host='localhost', port=27017)
-+ socket = Object.new
-+ socket.stubs(:setsockopt).with(Socket::IPPROTO_TCP, Socket::TCP_NODELAY, 1)
-+ socket.stubs(:close)
-+ socket.stubs(:closed?)
-+ socket.stubs(:checkin)
-+ socket.stubs(:pool)
-+ socket
-+ end
-+
-+ def new_mock_unix_socket(sockfile='/tmp/mongod.sock')
-+ socket = Object.new
-+ socket.stubs(:setsockopt).with(Socket::IPPROTO_TCP)
-+ socket.stubs(:close)
-+ socket.stubs(:closed?)
-+ socket
-+ end
-+
-+ def new_mock_db
-+ Object.new
-+ end
-+
-+ def assert_raise_error(klass, message=nil)
-+ begin
-+ yield
-+ rescue => e
-+ if klass.to_s != e.class.to_s
-+ flunk "Expected exception class #{klass} but got #{e.class}.\n #{e.backtrace}"
-+ end
-+
-+ if message && !e.message.include?(message)
-+ p e.backtrace
-+ flunk "#{e.message} does not include #{message}.\n#{e.backtrace}"
-+ end
-+ else
-+ flunk "Expected assertion #{klass} but none was raised."
-+ end
-+ end
-+end
diff --git a/debian/patches/add_to_bson_code.patch b/debian/patches/add_to_bson_code.patch
deleted file mode 100644
index 889c3c5..0000000
--- a/debian/patches/add_to_bson_code.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-Description: add code for to_bson_code for Strings, needed for the tests
-Author: Cédric Boutillier <boutil at debian.org>
-Bug: https://jira.mongodb.org/browse/RUBY-570
-Last-Update: 2013-03-20
-
---- a/test/bson/bson_test.rb
-+++ b/test/bson/bson_test.rb
-@@ -761,3 +761,11 @@
- end
- end
- end
-+
-+class String
-+ def to_bson_code
-+ BSON::Code.new(self)
-+ end
-+end
-+
-+
diff --git a/debian/patches/change_require_activesupport.patch b/debian/patches/change_require_activesupport.patch
deleted file mode 100644
index 005b1aa..0000000
--- a/debian/patches/change_require_activesupport.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-Description: require all active_support to ensure all needed classes/modules
- are defined
-Author: Cédric Boutillier
-Bug: https://jira.mongodb.org/browse/RUBY-570
-Last-Update: 2013-03-20
-
---- a/test/bson/bson_test.rb
-+++ b/test/bson/bson_test.rb
-@@ -29,7 +29,7 @@
- end
-
- begin
-- require 'active_support/multibyte/chars'
-+ require 'active_support'
- rescue LoadError
- warn 'Mocking ActiveSupport::Multibyte::Chars'
- module ActiveSupport
diff --git a/debian/patches/clean_test_helper.patch b/debian/patches/clean_test_helper.patch
deleted file mode 100644
index edcd31f..0000000
--- a/debian/patches/clean_test_helper.patch
+++ /dev/null
@@ -1,195 +0,0 @@
-Description: clean test_helper.rb from stuff not needed for ruby-bson
-Author: Cédric Boutillier <boutil at debian.org>
-Bug: https://jira.mongodb.org/browse/RUBY-570
-Last-Update: 2013-03-20
-
---- a/test/test_helper.rb
-+++ b/test/test_helper.rb
-@@ -1,77 +1,63 @@
--require 'rubygems'
--# 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__), '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
--
-+require 'bson'
-+#require 'tools/mongo_config'
-+#
-+#class Test::Unit::TestCase
-+#
-+# TEST_DATA = File.join(File.dirname(__FILE__), '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
-@@ -83,35 +69,23 @@
- result
- end
-
--begin
-- silently { require 'shoulda' }
-- silently { require 'mocha/setup' }
--rescue LoadError
-- puts <<MSG
--
--This test suite requires shoulda and mocha.
--You can install them as follows:
-- gem install shoulda
-- gem install mocha
--
--MSG
-- exit
--end
--
--unless defined? MONGO_TEST_DB
-- MONGO_TEST_DB = 'ruby-test-db'
--end
--
--unless defined? TEST_PORT
-- TEST_PORT = ENV['MONGO_RUBY_DRIVER_PORT'] ? ENV['MONGO_RUBY_DRIVER_PORT'].to_i : Mongo::MongoClient::DEFAULT_PORT
--end
--
--unless defined? TEST_HOST
-- TEST_HOST = ENV['MONGO_RUBY_DRIVER_HOST'] || 'localhost'
--end
-+require 'shoulda'
-+require 'mocha'
-+#
-+#unless defined? MONGO_TEST_DB
-+# MONGO_TEST_DB = 'ruby-test-db'
-+#end
-+#
-+#unless defined? TEST_PORT
-+# TEST_PORT = ENV['MONGO_RUBY_DRIVER_PORT'] ? ENV['MONGO_RUBY_DRIVER_PORT'].to_i : Mongo::MongoClient::DEFAULT_PORT
-+#end
-+#
-+#unless defined? TEST_HOST
-+# TEST_HOST = ENV['MONGO_RUBY_DRIVER_HOST'] || 'localhost'
-+#end
-
- class Test::Unit::TestCase
-- include Mongo
-+# include Mongo
- include BSON
-
- def self.standard_connection(options={}, legacy=false)
diff --git a/debian/patches/series b/debian/patches/series
deleted file mode 100644
index 9d38537..0000000
--- a/debian/patches/series
+++ /dev/null
@@ -1,5 +0,0 @@
-#add_test_helper.patch
-#clean_test_helper.patch
-#add_require_rbconfig.patch
-#change_require_activesupport.patch
-#add_to_bson_code.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/ruby-bson.git
More information about the Pkg-ruby-extras-commits
mailing list