[rubygem-fakeweb] Rebuild for https://fedoraproject.org/wiki/Features/Ruby_2.0.0

Vít Ondruch vondruch at fedoraproject.org
Thu Feb 28 13:35:11 UTC 2013


commit d270d6a5c6076ba98ce7d1d28e80a0621bb56d7e
Author: Vít Ondruch <vondruch at redhat.com>
Date:   Thu Feb 28 14:35:03 2013 +0100

    Rebuild for https://fedoraproject.org/wiki/Features/Ruby_2.0.0

 ruby2-tests-fix.patch |   36 ++++++++++++++++++++++++++++++++++++
 rubygem-fakeweb.spec  |   24 ++++++++++++------------
 2 files changed, 48 insertions(+), 12 deletions(-)
---
diff --git a/ruby2-tests-fix.patch b/ruby2-tests-fix.patch
new file mode 100644
index 0000000..2012327
--- /dev/null
+++ b/ruby2-tests-fix.patch
@@ -0,0 +1,36 @@
+From ac856c369445631118f4a51f73793af1ea5c5e1a Mon Sep 17 00:00:00 2001
+From: Josef Stribny <jstribny at redhat.com>
+Date: Thu, 28 Feb 2013 13:10:58 +0100
+Subject: [PATCH] Update test suite for Ruby 2
+
+---
+ test/test_helper.rb |    8 +++++++-
+ 1 file changed, 7 insertions(+), 1 deletion(-)
+
+diff --git a/test/test_helper.rb b/test/test_helper.rb
+index ca91827..f434fee 100644
+--- a/test/test_helper.rb
++++ b/test/test_helper.rb
+@@ -57,12 +57,18 @@ def setup_expectations_for_real_request(options = {})
+       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)
+ 
+-- 
+1.7.10
+
diff --git a/rubygem-fakeweb.spec b/rubygem-fakeweb.spec
index 50a89d2..6a2ce09 100644
--- a/rubygem-fakeweb.spec
+++ b/rubygem-fakeweb.spec
@@ -4,21 +4,24 @@
 Summary: A tool for faking responses to HTTP requests
 Name: rubygem-%{gem_name}
 Version: 1.3.0
-Release: 8%{?dist}
+Release: 9%{?dist}
 Group: Development/Languages
 License: MIT
 URL: http://github.com/chrisk/fakeweb
 Source0: http://rubygems.org/gems/%{gem_name}-%{version}.gem
 Patch0: patch_out_samuel.patch
+# Needed for Ruby 2.0
+# https://github.com/chrisk/fakeweb/pull/37
+Patch1: ruby2-tests-fix.patch
 # Keeping so this spec can be used in EPEL5
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-Requires: ruby(abi) = 1.9.1
+Requires: ruby(release)
 Requires: ruby(rubygems)
 BuildRequires: rubygems-devel
 # The following BR are there for %%check
 BuildRequires: rubygem(mocha)
 BuildRequires: rubygem(minitest)
-BuildRequires: rubygem(right_http_connection)
+BuildRequires: rubygem(http_connection)
 BuildArch: noarch
 Provides: rubygem(%{gem_name}) = %{version}
 
@@ -37,18 +40,11 @@ This package contains documentation for %{name}.
 
 
 %prep
-mkdir -p ./%{gem_dir}
-gem install \
-        --local \
-        --install-dir .%{gem_dir} \
-        --force \
-        --rdoc \
-        -V \
-%{SOURCE0}
+%gem_install -n %{SOURCE0}
 
 pushd ./%{gem_instdir}/test
 %patch0 -p0
-
+%patch1 -p2
 
 %build
 
@@ -95,6 +91,10 @@ popd
 %{gem_instdir}/Rakefile
 
 %changelog
+* Thu Feb 28 2013 Josef Stribny <jstribny at redhat.com> - 1.3.0-9
+- Rebuild for https://fedoraproject.org/wiki/Features/Ruby_2.0.0
+- Change rubygem(right_http_connection) is now packed as rubygem(http_connection)
+
 * Thu Feb 14 2013 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.3.0-8
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
 


More information about the scm-commits mailing list