diff --git a/.gitignore b/.gitignore index efea01f..31bd090 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ webmock-1.9.0.gem/webmock-1.17.1.gem /webmock-1.21.0.gem +/webmock-2.3.2.gem diff --git a/rubygem-webmock.spec b/rubygem-webmock.spec index 9cba984..99d73f7 100644 --- a/rubygem-webmock.spec +++ b/rubygem-webmock.spec @@ -2,13 +2,16 @@ %global gem_name webmock Name: rubygem-%{gem_name} -Version: 1.21.0 -Release: 2%{?dist} +Version: 2.3.2 +Release: 1%{?dist} Summary: Library for stubbing HTTP requests in Ruby Group: Development/Languages License: MIT URL: http://github.com/bblimke/webmock Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem +# Disable some tests requiring network connection. +# https://github.com/bblimke/webmock/pull/682 +Patch0: webmock-2.3.2-Some-tests-require-network-connectivity.patch BuildRequires: ruby(release) BuildRequires: rubygems-devel BuildRequires: ruby @@ -16,6 +19,7 @@ BuildRequires: rubygem(addressable) BuildRequires: rubygem(crack) BuildRequires: rubygem(curb) BuildRequires: rubygem(excon) +BuildRequires: rubygem(hashdiff) BuildRequires: rubygem(httpclient) BuildRequires: rubygem(minitest) BuildRequires: rubygem(rack) @@ -42,6 +46,10 @@ Documentation for %{name}. %setup -q -c -T %gem_install -n %{SOURCE0} +pushd .%{gem_instdir} +%patch0 -p1 +popd + %build %install @@ -49,10 +57,7 @@ mkdir -p %{buildroot}%{gem_dir} cp -a .%{gem_dir}/* \ %{buildroot}%{gem_dir}/ -pushd %{buildroot}%{gem_instdir} -sed -i s-/usr/bin/env\ rake-/usr/bin/rake- Rakefile -rm .travis.yml .rspec-tm .gitignore .gemtest -popd +sed -i s-/usr/bin/env\ rake-/usr/bin/rake- %{buildroot}%{gem_instdir}/Rakefile @@ -91,6 +96,9 @@ popd %{gem_instdir}/webmock.gemspec %changelog +* Tue Feb 07 2017 Vít Ondruch - 2.3.2-1 +- Updated to webmock 2.3.2. + * Thu Feb 04 2016 Fedora Release Engineering - 1.21.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild diff --git a/sources b/sources index 0cc7b61..66cbd93 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -f04bf88419bf2b12efa0c1e93bc9f958 webmock-1.21.0.gem +SHA512 (webmock-2.3.2.gem) = bb61b645b287d15690aa81db4d4c937d3456e1911d394ef1fb31e8ff3530d47b865aa039c8aaa4d4b6a72132dfcdd06be66adf1b53793384dc27ac1c9f9c01e6 diff --git a/webmock-2.3.2-Some-tests-require-network-connectivity.patch b/webmock-2.3.2-Some-tests-require-network-connectivity.patch new file mode 100644 index 0000000..f22ef48 --- /dev/null +++ b/webmock-2.3.2-Some-tests-require-network-connectivity.patch @@ -0,0 +1,34 @@ +From dba98127443791ae02f2caee19f84f1c41dea654 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?V=C3=ADt=20Ondruch?= +Date: Tue, 7 Feb 2017 10:02:11 +0100 +Subject: [PATCH] Some tests require network connectivity. + +--- + spec/acceptance/httpclient/httpclient_spec.rb | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/spec/acceptance/httpclient/httpclient_spec.rb b/spec/acceptance/httpclient/httpclient_spec.rb +index 5a367e9..dc1b128 100644 +--- a/spec/acceptance/httpclient/httpclient_spec.rb ++++ b/spec/acceptance/httpclient/httpclient_spec.rb +@@ -182,7 +182,7 @@ describe "HTTPClient" do + end + end + +- context 'httpclient streams response' do ++ context 'httpclient streams response', net_connect: true do + before do + WebMock.allow_net_connect! + WebMock.after_request(except: [:other_lib]) do |_, response| +@@ -199,7 +199,7 @@ describe "HTTPClient" do + end + end + +- context 'credentials' do ++ context 'credentials', net_connect: true do + it 'are detected when manually specifying Authorization header' do + stub_request(:get, 'username:password@www.example.com').to_return(status: 200) + headers = {'Authorization' => 'Basic dXNlcm5hbWU6cGFzc3dvcmQ='} +-- +2.11.0 +