From 78cacd0174fb32980283aa685e74339e4c1f9dbf Mon Sep 17 00:00:00 2001 From: Josef Stribny Date: Mar 19 2015 10:11:02 +0000 Subject: Fix FTBFS sue to Ruby 2.2 --- diff --git a/rubygem-fakeweb-1.3.0-Ruby-2.2-tests-fix.patch b/rubygem-fakeweb-1.3.0-Ruby-2.2-tests-fix.patch new file mode 100644 index 0000000..ee2086d --- /dev/null +++ b/rubygem-fakeweb-1.3.0-Ruby-2.2-tests-fix.patch @@ -0,0 +1,25 @@ +From 1647ca210691429a75eb159814f42e68c3c1ce4c Mon Sep 17 00:00:00 2001 +From: Josef Stribny +Date: Thu, 19 Mar 2015 09:32:50 +0100 +Subject: [PATCH] Fix tests by expecting TypeError for Ruby 2.2 + +--- + test/test_fake_web.rb | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/test/test_fake_web.rb b/test/test_fake_web.rb +index f344612..682c43d 100644 +--- a/test/test_fake_web.rb ++++ b/test/test_fake_web.rb +@@ -35,7 +35,9 @@ def test_response_for_with_wrong_number_of_arguments + end + + def test_register_uri_without_domain_name +- assert_raises URI::InvalidURIError do ++ # Ruby 2.1 and lower raises URI::InvalidURIError ++ # Ruby 2.2 and higher raises TypeError ++ assert_raises URI::InvalidURIError, TypeError do + FakeWeb.register_uri(:get, 'test_example2.txt', fixture_path("test_example.txt")) + end + end + diff --git a/rubygem-fakeweb.spec b/rubygem-fakeweb.spec index 9f3ec8d..d43d570 100644 --- a/rubygem-fakeweb.spec +++ b/rubygem-fakeweb.spec @@ -4,7 +4,7 @@ Summary: A tool for faking responses to HTTP requests Name: rubygem-%{gem_name} Version: 1.3.0 -Release: 13%{?dist} +Release: 14%{?dist} Group: Development/Languages License: MIT URL: http://github.com/chrisk/fakeweb @@ -17,6 +17,9 @@ Patch1: ruby2-tests-fix.patch # Use Minitest 5 # https://github.com/chrisk/fakeweb/pull/48 Patch2: rubygem-fakeweb-1.3.0-Minitest-5.patch +# Ruby 2.2 tests compatibility +# https://github.com/chrisk/fakeweb/pull/53 +Patch3: rubygem-fakeweb-1.3.0-Ruby-2.2-tests-fix.patch # Keeping so this spec can be used in EPEL5 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: rubygems-devel @@ -48,6 +51,7 @@ pushd ./%{gem_instdir}/test %patch0 -p0 %patch1 -p2 %patch2 -p2 +%patch3 -p2 %build @@ -98,6 +102,9 @@ popd %{gem_instdir}/Rakefile %changelog +* Thu Mar 19 2015 Josef Stribny - 1.3.0-14 +- Fix FTBFS sue to Ruby 2.2 + * Tue Aug 19 2014 Josef Stribny - 1.3.0-13 - Fix FTBFS: change mocha requirement