From a0abbd7e4131e3a23acc8a033b862ad545f1f077 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 19 Jul 2024 19:17:03 +0000 Subject: [PATCH 1/6] Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild --- rubygem-faraday.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rubygem-faraday.spec b/rubygem-faraday.spec index bc54f03..074cfc4 100644 --- a/rubygem-faraday.spec +++ b/rubygem-faraday.spec @@ -3,7 +3,7 @@ Name: rubygem-%{gem_name} Version: 1.0.1 -Release: 12%{?dist} +Release: 13%{?dist} Summary: HTTP/REST API client library License: MIT URL: https://lostisland.github.io/faraday @@ -110,6 +110,9 @@ popd %{gem_instdir}/spec %changelog +* Fri Jul 19 2024 Fedora Release Engineering - 1.0.1-13 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + * Fri Jan 26 2024 Fedora Release Engineering - 1.0.1-12 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From ec69c58547e506e2394e6f70d2ee488709fb4d49 Mon Sep 17 00:00:00 2001 From: Mamoru TASAKA Date: Sun, 1 Dec 2024 22:50:39 +0900 Subject: [PATCH 2/6] Support ruby3.4 backtrace / Hash inspect formatting change --- ...uby34-hash-inspect-formatting-change.patch | 13 ++++++++++ faraday-pr1560-ruby34-backtrace-change.patch | 24 +++++++++++++++++++ rubygem-faraday.spec | 11 ++++++++- 3 files changed, 47 insertions(+), 1 deletion(-) create mode 100644 faraday-issue1602-ruby34-hash-inspect-formatting-change.patch create mode 100644 faraday-pr1560-ruby34-backtrace-change.patch diff --git a/faraday-issue1602-ruby34-hash-inspect-formatting-change.patch b/faraday-issue1602-ruby34-hash-inspect-formatting-change.patch new file mode 100644 index 0000000..68a9f14 --- /dev/null +++ b/faraday-issue1602-ruby34-hash-inspect-formatting-change.patch @@ -0,0 +1,13 @@ +diff --git a/spec/faraday/error_spec.rb b/spec/faraday/error_spec.rb +index fd30e2d..59c118f 100644 +--- a/spec/faraday/error_spec.rb ++++ b/spec/faraday/error_spec.rb +@@ -21,7 +21,7 @@ + it { expect(subject.wrapped_exception).to be_nil } + it { expect(subject.response).to eq(exception) } + it { expect(subject.message).to eq('the server responded with status 400') } +- it { expect(subject.inspect).to eq('#400}>') } ++ it { expect(subject.inspect).to eq('#') } + end + + context 'with string' do diff --git a/faraday-pr1560-ruby34-backtrace-change.patch b/faraday-pr1560-ruby34-backtrace-change.patch new file mode 100644 index 0000000..076c534 --- /dev/null +++ b/faraday-pr1560-ruby34-backtrace-change.patch @@ -0,0 +1,24 @@ +From 8cdc483218d4612d53239f48785567b6b6d056cd Mon Sep 17 00:00:00 2001 +From: m-nakamura145 +Date: Fri, 24 May 2024 23:23:24 +0900 +Subject: [PATCH] Fix compatibility with Ruby 3.4.0-preview1 + +--- + spec/faraday_spec.rb | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/spec/faraday_spec.rb b/spec/faraday_spec.rb +index 30be29cf8..c3583f184 100644 +--- a/spec/faraday_spec.rb ++++ b/spec/faraday_spec.rb +@@ -18,7 +18,9 @@ + end + + it 'uses method_missing on Faraday if there is no proxyable method' do +- expected_message = if RUBY_VERSION >= '3.3' ++ expected_message = if RUBY_VERSION >= '3.4' ++ "undefined method 'this_method_does_not_exist' for module Faraday" ++ elsif RUBY_VERSION >= '3.3' + "undefined method `this_method_does_not_exist' for module Faraday" + else + "undefined method `this_method_does_not_exist' for Faraday:Module" diff --git a/rubygem-faraday.spec b/rubygem-faraday.spec index 074cfc4..3bc9f1f 100644 --- a/rubygem-faraday.spec +++ b/rubygem-faraday.spec @@ -3,7 +3,7 @@ Name: rubygem-%{gem_name} Version: 1.0.1 -Release: 13%{?dist} +Release: 14%{?dist} Summary: HTTP/REST API client library License: MIT URL: https://lostisland.github.io/faraday @@ -24,6 +24,12 @@ Patch1: faraday-1.0.1-net-http-persistent-3-error-kind.patch # https://github.com/lostisland/faraday/pull/1523 # https://github.com/ruby/ruby/pull/6950 Patch2: faraday-pr1523-testsuite-undefined-method-change.patch +# ruby3.4 backtrace quoting change +# https://github.com/lostisland/faraday/pull/1560 +Patch3: faraday-pr1560-ruby34-backtrace-change.patch +# ruby3.4 Hash#inspect formatting change +# https://github.com/lostisland/faraday/issues/1602 +Patch4: faraday-issue1602-ruby34-hash-inspect-formatting-change.patch BuildRequires: ruby(release) BuildRequires: rubygems-devel BuildRequires: ruby >= 2.3 @@ -110,6 +116,9 @@ popd %{gem_instdir}/spec %changelog +* Sun Dec 01 2024 Mamoru TASAKA - 1.0.1-14 +- Support ruby3.4 backtrace / Hash inspect formatting change + * Fri Jul 19 2024 Fedora Release Engineering - 1.0.1-13 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild From 3d0ae00653e44e7985996dca1661e70d9a94a319 Mon Sep 17 00:00:00 2001 From: Mamoru TASAKA Date: Wed, 4 Dec 2024 16:41:34 +0900 Subject: [PATCH 3/6] Use upstreamed patch for ruby34 formatting change --- ...uby34-hash-inspect-formatting-change.patch | 13 -------- ...uby34-hash-inspect-formatting-change.patch | 30 +++++++++++++++++++ rubygem-faraday.spec | 9 ++++-- 3 files changed, 36 insertions(+), 16 deletions(-) delete mode 100644 faraday-issue1602-ruby34-hash-inspect-formatting-change.patch create mode 100644 faraday-pr1604-ruby34-hash-inspect-formatting-change.patch diff --git a/faraday-issue1602-ruby34-hash-inspect-formatting-change.patch b/faraday-issue1602-ruby34-hash-inspect-formatting-change.patch deleted file mode 100644 index 68a9f14..0000000 --- a/faraday-issue1602-ruby34-hash-inspect-formatting-change.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/spec/faraday/error_spec.rb b/spec/faraday/error_spec.rb -index fd30e2d..59c118f 100644 ---- a/spec/faraday/error_spec.rb -+++ b/spec/faraday/error_spec.rb -@@ -21,7 +21,7 @@ - it { expect(subject.wrapped_exception).to be_nil } - it { expect(subject.response).to eq(exception) } - it { expect(subject.message).to eq('the server responded with status 400') } -- it { expect(subject.inspect).to eq('#400}>') } -+ it { expect(subject.inspect).to eq('#') } - end - - context 'with string' do diff --git a/faraday-pr1604-ruby34-hash-inspect-formatting-change.patch b/faraday-pr1604-ruby34-hash-inspect-formatting-change.patch new file mode 100644 index 0000000..b972f1b --- /dev/null +++ b/faraday-pr1604-ruby34-hash-inspect-formatting-change.patch @@ -0,0 +1,30 @@ +From 74962b2d77af4a1ca6bc557031e6c24759dbafa7 Mon Sep 17 00:00:00 2001 +From: Mamoru TASAKA +Date: Tue, 3 Dec 2024 15:48:12 +0900 +Subject: [PATCH] [TEST] fix compatibility with ruby 3.4.0dev + +ruby 3.4 changes Hash#inspect formatting as: +https://bugs.ruby-lang.org/issues/20433 + +Closes #1602 +--- + spec/faraday/error_spec.rb | 12 ++++++++++-- + 1 file changed, 10 insertions(+), 2 deletions(-) + +diff --git a/spec/faraday/error_spec.rb b/spec/faraday/error_spec.rb +index fd30e2d34..170f32672 100644 +--- a/spec/faraday/error_spec.rb ++++ b/spec/faraday/error_spec.rb +@@ -21,7 +21,11 @@ + it { expect(subject.wrapped_exception).to be_nil } + it { expect(subject.response).to eq(exception) } + it { expect(subject.message).to eq('the server responded with status 400') } +- it { expect(subject.inspect).to eq('#400}>') } ++ if RUBY_VERSION >= '3.4' ++ it { expect(subject.inspect).to eq('#') } ++ else ++ it { expect(subject.inspect).to eq('#400}>') } ++ end + end + + context 'with string' do diff --git a/rubygem-faraday.spec b/rubygem-faraday.spec index 3bc9f1f..642521c 100644 --- a/rubygem-faraday.spec +++ b/rubygem-faraday.spec @@ -3,7 +3,7 @@ Name: rubygem-%{gem_name} Version: 1.0.1 -Release: 14%{?dist} +Release: 15%{?dist} Summary: HTTP/REST API client library License: MIT URL: https://lostisland.github.io/faraday @@ -28,8 +28,8 @@ Patch2: faraday-pr1523-testsuite-undefined-method-change.patch # https://github.com/lostisland/faraday/pull/1560 Patch3: faraday-pr1560-ruby34-backtrace-change.patch # ruby3.4 Hash#inspect formatting change -# https://github.com/lostisland/faraday/issues/1602 -Patch4: faraday-issue1602-ruby34-hash-inspect-formatting-change.patch +# https://github.com/lostisland/faraday/pull/1604 +Patch4: faraday-pr1604-ruby34-hash-inspect-formatting-change.patch BuildRequires: ruby(release) BuildRequires: rubygems-devel BuildRequires: ruby >= 2.3 @@ -116,6 +116,9 @@ popd %{gem_instdir}/spec %changelog +* Wed Dec 04 2024 Mamoru TASAKA - 1.0.1-15 +- Use upstreamed patch for ruby34 formatting change + * Sun Dec 01 2024 Mamoru TASAKA - 1.0.1-14 - Support ruby3.4 backtrace / Hash inspect formatting change From b27c6d55c282426f35fcc56bf5a8f67ca1ca381f Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 18 Jan 2025 23:15:02 +0000 Subject: [PATCH 4/6] Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild --- rubygem-faraday.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rubygem-faraday.spec b/rubygem-faraday.spec index 642521c..13a74a2 100644 --- a/rubygem-faraday.spec +++ b/rubygem-faraday.spec @@ -3,7 +3,7 @@ Name: rubygem-%{gem_name} Version: 1.0.1 -Release: 15%{?dist} +Release: 16%{?dist} Summary: HTTP/REST API client library License: MIT URL: https://lostisland.github.io/faraday @@ -116,6 +116,9 @@ popd %{gem_instdir}/spec %changelog +* Sat Jan 18 2025 Fedora Release Engineering - 1.0.1-16 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + * Wed Dec 04 2024 Mamoru TASAKA - 1.0.1-15 - Use upstreamed patch for ruby34 formatting change From 1260b6a10111e7feb5dcd7cc7a12699b0f9b6a11 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 25 Jul 2025 12:24:24 +0000 Subject: [PATCH 5/6] Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild --- rubygem-faraday.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rubygem-faraday.spec b/rubygem-faraday.spec index 13a74a2..715e072 100644 --- a/rubygem-faraday.spec +++ b/rubygem-faraday.spec @@ -3,7 +3,7 @@ Name: rubygem-%{gem_name} Version: 1.0.1 -Release: 16%{?dist} +Release: 17%{?dist} Summary: HTTP/REST API client library License: MIT URL: https://lostisland.github.io/faraday @@ -116,6 +116,9 @@ popd %{gem_instdir}/spec %changelog +* Fri Jul 25 2025 Fedora Release Engineering - 1.0.1-17 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild + * Sat Jan 18 2025 Fedora Release Engineering - 1.0.1-16 - Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild From 196267c11d58c2a566698be407522789d7c4750c Mon Sep 17 00:00:00 2001 From: Mamoru TASAKA Date: Mon, 1 Dec 2025 22:44:59 +0900 Subject: [PATCH 6/6] Backport upstream patch for rack3.1 change --- ...549-unespace-rack-utils-query-result.patch | 23 ++++++++++++++ faraday-rack-pr13-rack31-rack_input.patch | 30 +++++++++++++++++++ rubygem-faraday.spec | 13 +++++++- 3 files changed, 65 insertions(+), 1 deletion(-) create mode 100644 faraday-pr1549-unespace-rack-utils-query-result.patch create mode 100644 faraday-rack-pr13-rack31-rack_input.patch diff --git a/faraday-pr1549-unespace-rack-utils-query-result.patch b/faraday-pr1549-unespace-rack-utils-query-result.patch new file mode 100644 index 0000000..e727376 --- /dev/null +++ b/faraday-pr1549-unespace-rack-utils-query-result.patch @@ -0,0 +1,23 @@ +From 66551ecc79f5d3d5bca1a2523bd8736db8c2220c Mon Sep 17 00:00:00 2001 +From: Mattia Giuffrida +Date: Sat, 20 Jan 2024 16:48:26 +0000 +Subject: [PATCH] Unescape the result of `Rack::Utils.build_nested_query` + +--- + spec/faraday/params_encoders/nested_spec.rb | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/spec/faraday/params_encoders/nested_spec.rb b/spec/faraday/params_encoders/nested_spec.rb +index 46312047f..83da22dc4 100644 +--- a/spec/faraday/params_encoders/nested_spec.rb ++++ b/spec/faraday/params_encoders/nested_spec.rb +@@ -62,7 +62,8 @@ + it 'encodes rack compat' do + params = { a: [{ one: '1', two: '2' }, '3', ''] } + result = Faraday::Utils.unescape(Faraday::NestedParamsEncoder.encode(params)).split('&') +- expected = Rack::Utils.build_nested_query(params).split('&') ++ escaped = Rack::Utils.build_nested_query(params) ++ expected = Rack::Utils.unescape(escaped).split('&') + expect(result).to match_array(expected) + end + diff --git a/faraday-rack-pr13-rack31-rack_input.patch b/faraday-rack-pr13-rack31-rack_input.patch new file mode 100644 index 0000000..f08c969 --- /dev/null +++ b/faraday-rack-pr13-rack31-rack_input.patch @@ -0,0 +1,30 @@ +From a590bc34e40b62484440dcd4ab5147c0c02bb425 Mon Sep 17 00:00:00 2001 +From: Andreas Schleifer +Date: Wed, 9 Apr 2025 09:21:05 +0200 +Subject: [PATCH] Fix tests for rack 3.1: env['rack.input'] is optional (#13) + +* fix(spec): fix tests for rack 3.1 + +* feat(ci): add ruby 3.4 to CI test matrix + +--------- + +Co-authored-by: Olle Jonsson +--- + .github/workflows/ci.yml | 1 + + spec/support/webmock_rack_app.rb | 2 +- + 2 files changed, 2 insertions(+), 1 deletion(-) + +diff --git a/spec/support/webmock_rack_app.rb b/spec/support/webmock_rack_app.rb +index a3212c7..894c411 100644 +--- a/spec/support/webmock_rack_app.rb ++++ b/spec/support/webmock_rack_app.rb +@@ -49,7 +49,7 @@ def req_headers(env) + end + + def req_body(env) +- env['rack.input'].read ++ env['rack.input']&.read + end + + def process_response(req_signature) diff --git a/rubygem-faraday.spec b/rubygem-faraday.spec index 715e072..6d9542c 100644 --- a/rubygem-faraday.spec +++ b/rubygem-faraday.spec @@ -3,7 +3,7 @@ Name: rubygem-%{gem_name} Version: 1.0.1 -Release: 17%{?dist} +Release: 18%{?dist} Summary: HTTP/REST API client library License: MIT URL: https://lostisland.github.io/faraday @@ -30,6 +30,14 @@ Patch3: faraday-pr1560-ruby34-backtrace-change.patch # ruby3.4 Hash#inspect formatting change # https://github.com/lostisland/faraday/pull/1604 Patch4: faraday-pr1604-ruby34-hash-inspect-formatting-change.patch +# https://github.com/lostisland/faraday-rack/pull/13 +# https://github.com/lostisland/faraday-rack/commit/a590bc34e40b62484440dcd4ab5147c0c02bb425 +# Patch for rack 3.1 wrt env['rack.input'] is optional +Patch5: faraday-rack-pr13-rack31-rack_input.patch +# https://github.com/lostisland/faraday/pull/1549 +# https://github.com/lostisland/faraday/commit/66551ecc79f5d3d5bca1a2523bd8736db8c2220c.patch +# Unescape the result of Rack::Utils.build_nested_query for rack 3.1 +Patch6: faraday-pr1549-unespace-rack-utils-query-result.patch BuildRequires: ruby(release) BuildRequires: rubygems-devel BuildRequires: ruby >= 2.3 @@ -116,6 +124,9 @@ popd %{gem_instdir}/spec %changelog +* Mon Dec 01 2025 Mamoru TASAKA - 1.0.1-18 +- Backport upstream patch for rack3.1 change + * Fri Jul 25 2025 Fedora Release Engineering - 1.0.1-17 - Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild