[DRE-commits] [ruby-fakeweb] 07/13: patches: remove remove-rubygems.patch, add fix_tests_ruby2.0.patch

Cédric Boutillier boutil at alioth.debian.org
Fri Oct 4 16:36:03 UTC 2013


This is an automated email from the git hooks/post-receive script.

boutil pushed a commit to branch master
in repository ruby-fakeweb.

commit aa6c00606fcf8f002d6fe25341491f0a3468b006
Author: Cédric Boutillier <boutil at debian.org>
Date:   Fri Oct 4 16:14:45 2013 +0200

    patches: remove remove-rubygems.patch, add fix_tests_ruby2.0.patch
---
 debian/patches/fix_tests_ruby2.0.patch |   30 ++++++++++++++++++++++++++++++
 debian/patches/remove-rubygems.patch   |   17 -----------------
 debian/patches/series                  |    2 +-
 3 files changed, 31 insertions(+), 18 deletions(-)

diff --git a/debian/patches/fix_tests_ruby2.0.patch b/debian/patches/fix_tests_ruby2.0.patch
new file mode 100644
index 0000000..e7fa04c
--- /dev/null
+++ b/debian/patches/fix_tests_ruby2.0.patch
@@ -0,0 +1,30 @@
+From ac856c369445631118f4a51f73793af1ea5c5e1a Mon Sep 17 00:00:00 2001
+Description: Update test suite for Ruby 2
+Author: Josef Stribny <jstribny at redhat.com>
+Origin: https://github.com/chrisk/fakeweb/commit/ae0e2d9ce0da577262febed92e44b7a87617b88f.patch
+Bug: https://github.com/chrisk/fakeweb/pull/37
+Reviewed-by: Cédric Boutillier <boutil at debian.org>
+Last-update: 2013-02-28
+
+--- a/test/test_helper.rb
++++ b/test/test_helper.rb
+@@ -54,12 +54,18 @@
+       OpenSSL::SSL::SSLSocket.expects(:new).with(socket, instance_of(OpenSSL::SSL::SSLContext)).returns(socket).at_least_once
+       socket.stubs(:sync_close=).returns(true)
+       socket.expects(:connect).with().at_least_once
++      socket.expects(:session).with().at_least_once if RUBY_VERSION >= "2.0.0"
+     else
+       socket = mock("TCPSocket")
+       Socket.expects(:===).with(socket).at_least_once.returns(true)
+     end
+ 
+-    TCPSocket.expects(:open).with(options[:host], options[:port]).returns(socket).at_least_once
++    if RUBY_VERSION >= "2.0.0"
++      TCPSocket.expects(:open).with(options[:host], options[:port], nil, nil).returns(socket).at_least_once
++    else
++      TCPSocket.expects(:open).with(options[:host], options[:port]).returns(socket).at_least_once
++    end
++
+     socket.stubs(:closed?).returns(false)
+     socket.stubs(:close).returns(true)
+ 
diff --git a/debian/patches/remove-rubygems.patch b/debian/patches/remove-rubygems.patch
deleted file mode 100644
index 6ae7cfc..0000000
--- a/debian/patches/remove-rubygems.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-Description: Removed rubygems
-Removed rubygems as deb is used for installation.
-Forwarded: No
-Author: Minto Joseph <mintojoseph at yahoo.com>
-Last-Update: 2013-06-02
-
---- a/test/test_helper.rb
-+++ b/test/test_helper.rb
-@@ -3,7 +3,7 @@
- require 'pathname'
- require 'fake_web'
- require 'rbconfig'
--require 'rubygems'
-+#require 'rubygems'
- require 'mocha'
- 
- 
diff --git a/debian/patches/series b/debian/patches/series
index 7458898..6523e8a 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1 @@
-remove-rubygems.patch
+fix_tests_ruby2.0.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/ruby-fakeweb.git



More information about the Pkg-ruby-extras-commits mailing list