commit c20c1beb5fa196a9802bb6b55e35fdd1b5627555 Author: tigro Date: Thu Sep 21 12:58:07 2023 +0300 import rubygem-cookiejar-0.3.3-10.el9 diff --git a/.rubygem-cookiejar.metadata b/.rubygem-cookiejar.metadata new file mode 100644 index 0000000..e69de29 diff --git a/SOURCES/cookiejar-0.3.3.gem b/SOURCES/cookiejar-0.3.3.gem new file mode 100644 index 0000000..8812496 Binary files /dev/null and b/SOURCES/cookiejar-0.3.3.gem differ diff --git a/SOURCES/rubygem-cookiejar-0.3.3-Remove-rspec-collection_matchers-dependency.patch b/SOURCES/rubygem-cookiejar-0.3.3-Remove-rspec-collection_matchers-dependency.patch new file mode 100644 index 0000000..ca487de --- /dev/null +++ b/SOURCES/rubygem-cookiejar-0.3.3-Remove-rspec-collection_matchers-dependency.patch @@ -0,0 +1,197 @@ +From 0882f211acbcac073e61fce9161247b1fdb78e30 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?V=C3=ADt=20Ondruch?= +Date: Wed, 5 May 2021 18:58:47 +0200 +Subject: [PATCH] Remove rspec-collection_matchers dependency. + +This does not really really add to readability while one less dependency +is beneficial. +--- + spec/jar_spec.rb | 58 ++++++++++++++++++++++----------------------- + spec/spec_helper.rb | 1 - + 2 files changed, 29 insertions(+), 30 deletions(-) + +diff --git a/spec/jar_spec.rb b/spec/jar_spec.rb +index 0d31e86..fbc4c96 100644 +--- a/spec/jar_spec.rb ++++ b/spec/jar_spec.rb +@@ -27,7 +27,7 @@ + jar.set_cookie 'http://foo.com/', 'bar=baz' + jar.set_cookie 'http://auth.foo.com/', 'foo=bar' + jar.set_cookie 'http://auth.foo.com/', 'auth=135121...;domain=foo.com' +- expect(jar.get_cookies('http://foo.com/')).to have(3).items ++ expect(jar.get_cookies('http://foo.com/').size).to eql(3) + end + it 'should let me read back a multiple cookies from 1 header' do + jar = Jar.new +@@ -42,7 +42,7 @@ + jar.set_cookie uri, 'c=bar;path=/a/b' + jar.set_cookie uri, 'd=bar;path=/a/' + cookies = jar.get_cookies(uri) +- expect(cookies).to have(4).items ++ expect(cookies.size).to eql(4) + expect(cookies[0].name).to eq 'b' + expect(cookies[1].name).to eq 'a' + expect(cookies[2].name).to eq 'c' +@@ -53,7 +53,7 @@ + uri = 'http://localhost/' + jar.set_cookie uri, 'foo=bar;expires=Wednesday, 09-Nov-99 23:12:40 GMT' + cookies = jar.get_cookies(uri) +- expect(cookies).to have(0).items ++ expect(cookies.size).to eql(0) + end + end + describe '.get_cookie_headers' do +@@ -91,7 +91,7 @@ + jar.set_cookie uri, 'c=bar;path=/a/b' + jar.set_cookie uri, 'd=bar;path=/a/' + jar.set_cookie 'http://localhost/', 'foo=bar' +- expect(jar.to_a).to have(5).items ++ expect(jar.to_a.size).to eql(5) + end + end + describe '.expire_cookies' do +@@ -103,9 +103,9 @@ + jar.set_cookie uri, 'c=bar;path=/a/b' + jar.set_cookie uri, 'd=bar;path=/a/' + jar.set_cookie 'http://localhost/', 'foo=bar' +- expect(jar.to_a).to have(5).items ++ expect(jar.to_a.size).to eql(5) + jar.expire_cookies +- expect(jar.to_a).to have(4).items ++ expect(jar.to_a.size).to eql(4) + end + it 'should let me expire all session cookies' do + uri = 'http://foo.com/a/b/c/d' +@@ -115,9 +115,9 @@ + jar.set_cookie uri, 'c=bar;path=/a/b' + jar.set_cookie uri, 'd=bar;path=/a/' + jar.set_cookie 'http://localhost/', 'foo=bar' +- expect(jar.to_a).to have(5).items ++ expect(jar.to_a.size).to eql(5) + jar.expire_cookies true +- expect(jar.to_a).to have(1).items ++ expect(jar.to_a.size).to eql(1) + end + end + describe '#set_cookies_from_headers' do +@@ -125,59 +125,59 @@ + jar = Jar.new + cookies = jar.set_cookies_from_headers 'http://localhost/', + 'Set-Cookie' => 'foo=bar' +- expect(cookies).to have(1).items +- expect(jar.to_a).to have(1).items ++ expect(cookies.size).to eql(1) ++ expect(jar.to_a.size).to eql(1) + end + it 'should handle a set-cookie header' do + jar = Jar.new + cookies = jar.set_cookies_from_headers 'http://localhost/', + 'set-cookie' => 'foo=bar' +- expect(cookies).to have(1).items +- expect(jar.to_a).to have(1).items ++ expect(cookies.size).to eql(1) ++ expect(jar.to_a.size).to eql(1) + end + it 'should handle multiple Set-Cookie headers' do + jar = Jar.new + cookies = jar.set_cookies_from_headers 'http://localhost/', + 'Set-Cookie' => ['foo=bar', 'bar=baz'] +- expect(cookies).to have(2).items +- expect(jar.to_a).to have(2).items ++ expect(cookies.size).to eql(2) ++ expect(jar.to_a.size).to eql(2) + end + it 'should handle a Set-Cookie2 header' do + jar = Jar.new + cookies = jar.set_cookies_from_headers 'http://localhost/', + 'Set-Cookie2' => 'foo=bar;Version=1' +- expect(cookies).to have(1).items +- expect(jar.to_a).to have(1).items ++ expect(cookies.size).to eql(1) ++ expect(jar.to_a.size).to eql(1) + end + it 'should handle a set-cookie2 header' do + jar = Jar.new + cookies = jar.set_cookies_from_headers 'http://localhost/', + 'set-cookie2' => 'foo=bar;Version=1' +- expect(cookies).to have(1).items +- expect(jar.to_a).to have(1).items ++ expect(cookies.size).to eql(1) ++ expect(jar.to_a.size).to eql(1) + end + it 'should handle multiple Set-Cookie2 headers' do + jar = Jar.new + cookies = jar.set_cookies_from_headers 'http://localhost/', + 'Set-Cookie2' => ['foo=bar;Version=1', 'bar=baz;Version=1'] +- expect(cookies).to have(2).items +- expect(jar.to_a).to have(2).items ++ expect(cookies.size).to eql(2) ++ expect(jar.to_a.size).to eql(2) + end + it 'should handle mixed distinct Set-Cookie and Set-Cookie2 headers' do + jar = Jar.new + cookies = jar.set_cookies_from_headers 'http://localhost/', + 'Set-Cookie' => 'foo=bar', + 'Set-Cookie2' => 'bar=baz;Version=1' +- expect(cookies).to have(2).items +- expect(jar.to_a).to have(2).items ++ expect(cookies.size).to eql(2) ++ expect(jar.to_a.size).to eql(2) + end + it 'should handle overlapping Set-Cookie and Set-Cookie2 headers' do + jar = Jar.new + cookies = jar.set_cookies_from_headers 'http://localhost/', + 'Set-Cookie' => ['foo=bar', 'bar=baz'], + 'Set-Cookie2' => 'foo=bar;Version=1' +- expect(cookies).to have(2).items +- expect(jar.to_a).to have(2).items ++ expect(cookies.size).to eql(2) ++ expect(jar.to_a.size).to eql(2) + # and has the version 1 cookie + expect(cookies.find do |cookie| + cookie.name == 'foo' +@@ -187,8 +187,8 @@ + jar = Jar.new + cookies = jar.set_cookies_from_headers 'http://localhost/', + 'Set-Cookie' => ['foo=bar', 'bar=baz;domain=.foo.com'] +- expect(cookies).to have(1).items +- expect(jar.to_a).to have(1).items ++ expect(cookies.size).to eql(1) ++ expect(jar.to_a.size).to eql(1) + end + end + begin +@@ -208,20 +208,20 @@ + array = JSON.parse json + + jar = Jar.json_create array +- expect(jar.get_cookies('https://localhost/')).to have(1).items ++ expect(jar.get_cookies('https://localhost/').size).to eql(1) + end + it 'should deserialize a JSON hash to a jar' do + json = '{"cookies":[{"name":"foo","value":"bar","domain":"localhost.local","path":"\\/","created_at":"2009-09-11 12:51:03 -0600","expiry":"2028-11-01 12:00:00 GMT","secure":true}]}' + hash = JSON.parse json + + jar = Jar.json_create hash +- expect(jar.get_cookies('https://localhost/')).to have(1).items ++ expect(jar.get_cookies('https://localhost/').size).to eql(1) + end + + it 'should automatically deserialize to a jar' do + json = '{"json_class":"CookieJar::Jar","cookies":[{"name":"foo","value":"bar","domain":"localhost.local","path":"\\/","created_at":"2009-09-11 12:51:03 -0600","expiry":"2028-11-01 12:00:00 GMT","secure":true}]}' + jar = JSON.parse json, create_additions: true +- expect(jar.get_cookies('https://localhost/')).to have(1).items ++ expect(jar.get_cookies('https://localhost/').size).to eql(1) + end + end + rescue LoadError +diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb +index ed6be3c..e2dd872 100644 +--- a/spec/spec_helper.rb ++++ b/spec/spec_helper.rb +@@ -1,5 +1,4 @@ + require 'cookiejar' + require 'rubygems' + require 'rspec' +-require 'rspec/collection_matchers' + require 'yaml' diff --git a/SPECS/rubygem-cookiejar.spec b/SPECS/rubygem-cookiejar.spec new file mode 100644 index 0000000..53758f4 --- /dev/null +++ b/SPECS/rubygem-cookiejar.spec @@ -0,0 +1,143 @@ +%global gem_name cookiejar + +Name: rubygem-%{gem_name} +Version: 0.3.3 +Release: 10%{?dist} +Summary: Parsing and returning cookies in Ruby +License: BSD +URL: https://github.com/dwaite/cookiejar +Source0: https://rubygems.org/gems/cookiejar-%{version}.gem +# Remove rspec-collection_matchers dependency. +# https://github.com/dwaite/cookiejar/pull/36 +Patch0: rubygem-cookiejar-0.3.3-Remove-rspec-collection_matchers-dependency.patch +BuildRequires: rubygem(rspec) +BuildRequires: ruby(release) +BuildRequires: rubygems-devel +BuildArch: noarch + +%description +The Ruby CookieJar is a library to help manage client-side cookies in pure +Ruby. It enables parsing and setting of cookie headers, alternating between +multiple 'jars' of cookies at one time (such as having a set of cookies for +each browser or thread), and supports persistence of the cookies in a JSON +string. + +%package doc +Summary: Documentation for %{name} +Requires: %{name} = %{version}-%{release} +BuildArch: noarch + +%description doc +Documentation for %{name} + +%prep +%setup -q -n %{gem_name}-%{version} + +%patch0 -p1 + +%build +gem build ../%{gem_name}-%{version}.gemspec +%gem_install + + +%check +pushd ./%{gem_instdir} +rspec -Ilib spec +popd + +%install + +mkdir -p %{buildroot}%{gem_dir} +cp -a .%{gem_dir}/* \ + %{buildroot}%{gem_dir}/ + +%files +%dir %{gem_instdir} +%{gem_libdir} +%exclude %{gem_cache} +%exclude %{gem_instdir}/contributors.json +%{gem_spec} +%license %{gem_instdir}/LICENSE +%exclude %{gem_instdir}/.* +%exclude %{gem_instdir}/%{gem_name}.gemspec +%exclude %{gem_instdir}/spec + +%files doc +%{gem_docdir} +%doc %{gem_instdir}/README.markdown +%{gem_instdir}/Rakefile +%{gem_instdir}/Gemfile + +%changelog +* Thu Sep 21 2023 Arkady L. Shane - 0.3.3-10 +- Rebuilt for MSVSphere 9.2 + +* Fri Jan 20 2023 Fedora Release Engineering - 0.3.3-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Sat Jul 23 2022 Fedora Release Engineering - 0.3.3-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Wed Jan 26 2022 Pavel Valena - 0.3.3-8 +- Rebuilt for https://fedoraproject.org/wiki/Changes/Ruby_3.1 + +* Fri Jan 21 2022 Fedora Release Engineering - 0.3.3-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Fri Jul 23 2021 Fedora Release Engineering - 0.3.3-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Wed May 05 2021 Vít Ondruch - 0.3.3-5 +- Remove rspec-collection_matchers dependency. + +* Wed Jan 27 2021 Fedora Release Engineering - 0.3.3-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Wed Jul 29 2020 Fedora Release Engineering - 0.3.3-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Thu Jan 30 2020 Fedora Release Engineering - 0.3.3-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Wed Oct 16 2019 Pavel Valena - 0.3.3-1 +- Update to cookiejar 0.3.3. + +* Fri Jul 26 2019 Fedora Release Engineering - 0.3.2-13 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Sat Feb 02 2019 Fedora Release Engineering - 0.3.2-12 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Sat Jul 14 2018 Fedora Release Engineering - 0.3.2-11 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Fri Feb 09 2018 Fedora Release Engineering - 0.3.2-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Thu Jul 27 2017 Fedora Release Engineering - 0.3.2-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Sat Feb 11 2017 Fedora Release Engineering - 0.3.2-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Thu Feb 04 2016 Fedora Release Engineering - 0.3.2-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Thu Jun 18 2015 Fedora Release Engineering - 0.3.2-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + + +* Tue Jun 24 2014 Nitesh Narayan Lal - 0.3.2-5 +- Updated to latest upstream release + +* Wed May 28 2014 Nitesh Narayan Lal - 0.3.2-4 +- Added conditional for F19/F20 + +* Sat Mar 15 2014 Nitesh Narayan Lal - 0.3.2-3 +- Updated to comply with Fedora guidelines + +* Thu Mar 6 2014 Nitesh Narayan Lal - 0.3.2-2 +- Updated as per the Fedora guidelines + +* Sat Jan 11 2014 Nitesh Narayan Lal - 0.3.2-1 +- Initial package