commit 9dadff2aa86919d7fc1c2470f34f1581c9c4d8ae Author: tigro Date: Thu Sep 21 11:36:08 2023 +0300 import rubygem-webmock-3.14.0-3.el9 diff --git a/.rubygem-webmock.metadata b/.rubygem-webmock.metadata new file mode 100644 index 0000000..e69de29 diff --git a/SOURCES/rubygem-webmock-3.14.0-Fixup-failures-with-latest-RSpec.patch b/SOURCES/rubygem-webmock-3.14.0-Fixup-failures-with-latest-RSpec.patch new file mode 100644 index 0000000..28cd701 --- /dev/null +++ b/SOURCES/rubygem-webmock-3.14.0-Fixup-failures-with-latest-RSpec.patch @@ -0,0 +1,36 @@ +From fb8bf400e5a1e56f66318b6ea5a8b64894b05596 Mon Sep 17 00:00:00 2001 +From: ojab +Date: Thu, 10 Feb 2022 14:32:49 +0000 +Subject: [PATCH] Fixup failures with latest RSpec + +--- + spec/unit/request_signature_spec.rb | 2 +- + spec/unit/response_spec.rb | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/spec/unit/request_signature_spec.rb b/spec/unit/request_signature_spec.rb +index 8b9e1990..02a5ec17 100644 +--- a/spec/unit/request_signature_spec.rb ++++ b/spec/unit/request_signature_spec.rb +@@ -18,7 +18,7 @@ + end + + it "assigns normalized headers" do +- expect(WebMock::Util::Headers).to receive(:normalize_headers).with('A' => 'a').and_return('B' => 'b') ++ allow(WebMock::Util::Headers).to receive(:normalize_headers).with({'A' => 'a'}.freeze).and_return('B' => 'b') + expect( + WebMock::RequestSignature.new(:get, "www.example.com", headers: {'A' => 'a'}).headers + ).to eq({'B' => 'b'}) +diff --git a/spec/unit/response_spec.rb b/spec/unit/response_spec.rb +index f02cb7c1..4c3ae38d 100644 +--- a/spec/unit/response_spec.rb ++++ b/spec/unit/response_spec.rb +@@ -31,7 +31,7 @@ + end + + it "should report normalized headers" do +- expect(WebMock::Util::Headers).to receive(:normalize_headers).with('A' => 'a').and_return('B' => 'b') ++ allow(WebMock::Util::Headers).to receive(:normalize_headers).with({'A' => 'a'}.freeze).and_return('B' => 'b') + @response = WebMock::Response.new(headers: {'A' => 'a'}) + expect(@response.headers).to eq({'B' => 'b'}) + end diff --git a/SOURCES/webmock-3.14.0.gem b/SOURCES/webmock-3.14.0.gem new file mode 100644 index 0000000..2db2e04 Binary files /dev/null and b/SOURCES/webmock-3.14.0.gem differ diff --git a/SPECS/rubygem-webmock.spec b/SPECS/rubygem-webmock.spec new file mode 100644 index 0000000..de68bb9 --- /dev/null +++ b/SPECS/rubygem-webmock.spec @@ -0,0 +1,247 @@ +# Generated from webmock-1.7.6.gem by gem2rpm -*- rpm-spec -*- +%global gem_name webmock + +# Disable HTTP clients integration tests we don't have in Fedora. +%bcond_with async_http_client +%bcond_without curb +%bcond_without em_http_request +%bcond_without excon +%bcond_with http_rb +%bcond_without httpclient +%bcond_with manticore +%bcond_without net_http +%bcond_with patron +%bcond_without typhoeus + +Name: rubygem-%{gem_name} +Version: 3.14.0 +Release: 3%{?dist} +Summary: Library for stubbing HTTP requests in Ruby +License: MIT +URL: http://github.com/bblimke/webmock +Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem +# Latest RSpec distinguish between hash and kwargs. +# https://github.com/rspec/rspec-mocks/issues/1460 +# https://github.com/bblimke/webmock/pull/965/commits/fb8bf400e5a1e56f66318b6ea5a8b64894b05596 +Patch0: rubygem-webmock-3.14.0-Fixup-failures-with-latest-RSpec.patch +BuildRequires: ruby(release) +BuildRequires: rubygems-devel +BuildRequires: ruby +BuildRequires: rubygem(addressable) +BuildRequires: rubygem(crack) +BuildRequires: rubygem(hashdiff) +BuildRequires: rubygem(minitest) +BuildRequires: rubygem(rack) +BuildRequires: rubygem(rspec) +BuildRequires: rubygem(test-unit) +BuildRequires: rubygem(webrick) + +%{?with_async_http_client:BuildRequires: rubygem(async_http_client)} +%{?with_curb:BuildRequires: rubygem(curb)} +%{?with_em_http_request:BuildRequires: rubygem(em-http-request)} +%{?with_excon:BuildRequires: rubygem(excon)} +%{?with_http_rb:BuildRequires: rubygem(http_rb)} +%{?with_httpclient:BuildRequires: rubygem(httpclient)} +%{?with_manticore:BuildRequires: rubygem(manticore)} +%{?with_patron:BuildRequires: rubygem(patron)} +%{?with_typhoeus:BuildRequires: rubygem(typhoeus)} +BuildArch: noarch + +%description +WebMock allows stubbing HTTP requests and setting expectations on HTTP +requests. + + +%package doc +Summary: Documentation for %{name} +Requires: %{name} = %{version}-%{release} +BuildArch: noarch + +%description doc +Documentation for %{name}. + +%prep +%setup -q -n %{gem_name}-%{version} + +# JSON is required by lib/webmock/request_body_diff.rb +%gemspec_add_dep -g json + +%patch0 -p1 + +%build +gem build ../%{gem_name}-%{version}.gemspec +%gem_install + +%install +mkdir -p %{buildroot}%{gem_dir} +cp -a .%{gem_dir}/* \ + %{buildroot}%{gem_dir}/ + +# Run the test suite +%check +pushd .%{gem_instdir} +ruby -e 'Dir.glob "./minitest/**/*.rb", &method(:require)' +ruby -e 'Dir.glob "./test/**/test_*.rb", &method(:require)' + +# Create list of dependencies to ignore based on bcond flags. +ignore_list=( +%{with_async_http_client} +%{with_curb} +%{with_em_http_request} +%{with_excon} +%{with_http_rb} +%{with_httpclient} +%{with_manticore} +%{with_net_http} +%{with_patron} +%{with_typhoeus} +) +ignore_list=($(echo ${ignore_list[*]} | \ + sed 's/1//g' | \ + sed -r 's/%\{with_([^{]*)\}/\1/g' +)) + +# Remove unavailable dependencies based on ignore_list. +for i in ${ignore_list[*]}; do + sed -i "/$i/ s/^/#/" spec/spec_helper.rb +done + +# and we don't care about code quality, that's upstream business. +rspec spec --exclude-pattern 'spec/{quality_spec.rb,acceptance/**/*}' + +# Run acceptance test for each http client independently. +for t in spec/acceptance/*/; do + acceptance_test=$(basename ${t}) + if [[ " ${ignore_list[*]} " =~ " ${acceptance_test} " ]]; then + echo "* ${acceptance_test} acceptance test ignored due to missing dependency" + continue + fi + rspec ${t} +done + +popd + +%files +%dir %{gem_instdir} +%exclude %{gem_instdir}/.* +%license %{gem_instdir}/LICENSE +%{gem_libdir} +%exclude %{gem_cache} +%{gem_spec} + +%files doc +%doc %{gem_docdir} +%doc %{gem_instdir}/CHANGELOG.md +%{gem_instdir}/Gemfile +%doc %{gem_instdir}/README.md +%{gem_instdir}/Rakefile +%{gem_instdir}/minitest +%{gem_instdir}/spec +%{gem_instdir}/test +%{gem_instdir}/webmock.gemspec + +%changelog +* Thu Sep 21 2023 Arkady L. Shane - 3.14.0-3 +- Rebuilt for MSVSphere 9.2 + +* Fri Jan 20 2023 Fedora Release Engineering - 3.14.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Sat Jul 23 2022 Fedora Release Engineering - 3.14.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Wed Mar 02 2022 Vít Ondruch - 3.14.0-1 +- Fix FTBFS caused by latest RSpec. +- Selectively disable acceptance tests. +- Update to WebMock 3.14.0. + Resolves: rhbz#1922849 + +* Fri Jan 21 2022 Fedora Release Engineering - 3.11.1-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Fri Jul 23 2021 Fedora Release Engineering - 3.11.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Wed Jan 27 2021 Fedora Release Engineering - 3.11.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Wed Jan 13 2021 Vít Ondruch - 3.11.1-1 +- Update to WebMock 3.11.1. + Resolves: rhbz#1878462 + +* Wed Aug 26 2020 Vít Ondruch - 3.8.3-1 +- Update to WebMock 3.8.3. + Resolves: rhbz#1717226 + +* Wed Jul 29 2020 Fedora Release Engineering - 3.5.1-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Thu Jan 30 2020 Fedora Release Engineering - 3.5.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Fri Jul 26 2019 Fedora Release Engineering - 3.5.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Mon Mar 04 2019 Pavel Valena - 3.5.1-1 +- Update to WebMock 3.5.1. + +* Sat Feb 02 2019 Fedora Release Engineering - 2.3.2-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Sat Jul 14 2018 Fedora Release Engineering - 2.3.2-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Fri Feb 09 2018 Fedora Release Engineering - 2.3.2-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Thu Jul 27 2017 Fedora Release Engineering - 2.3.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* 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 + +* Tue Sep 01 2015 Vít Ondruch - 1.21.0-1 +- Updated to webmock 1.21.0. + +* Fri Jun 19 2015 Fedora Release Engineering - 1.17.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Sun Jun 08 2014 Fedora Release Engineering - 1.17.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Tue Jan 21 2014 Mo Morsi - 1.17.1-1 +- Update to version 1.17.1 + +* Sun Aug 04 2013 Fedora Release Engineering - 1.9.0-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Mon Mar 11 2013 Vít Ondruch - 1.9.0-3 +- Rebuild for https://fedoraproject.org/wiki/Features/Ruby_2.0.0 + +* Thu Feb 14 2013 Fedora Release Engineering - 1.9.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Tue Nov 13 2012 Mo Morsi - 1.9.0-1 +- Updated to webmock 1.9.0 + +* Sat Jul 21 2012 Fedora Release Engineering - 1.8.7-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Mon Jul 02 2012 Vít Ondruch - 1.8.7-1 +- Updated to webmock 1.8.7. + +* Mon Feb 13 2012 Mo Morsi - 1.7.10-1 +- Update to latest upstream release +- Build against ruby 1.9 + +* Sat Jan 14 2012 Fedora Release Engineering - 1.7.6-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Mon Oct 03 2011 Mo Morsi - 1.7.6-2 +- Update to conform to guidelines + +* Wed Sep 28 2011 Mo Morsi - 1.7.6-1 +- Initial package