Support ruby3.4 backtrace / Hash inspect formatting change
This commit is contained in:
parent
a0abbd7e41
commit
ec69c58547
3 changed files with 47 additions and 1 deletions
|
|
@ -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('#<Faraday::ClientError response={:status=>400}>') }
|
||||
+ it { expect(subject.inspect).to eq('#<Faraday::ClientError response=' + { :status => 400 }.to_s + '>') }
|
||||
end
|
||||
|
||||
context 'with string' do
|
||||
24
faraday-pr1560-ruby34-backtrace-change.patch
Normal file
24
faraday-pr1560-ruby34-backtrace-change.patch
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
From 8cdc483218d4612d53239f48785567b6b6d056cd Mon Sep 17 00:00:00 2001
|
||||
From: m-nakamura145 <masato.nakamura145@gmail.com>
|
||||
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"
|
||||
|
|
@ -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 <mtasaka@fedoraproject.org> - 1.0.1-14
|
||||
- Support ruby3.4 backtrace / Hash inspect formatting change
|
||||
|
||||
* Fri Jul 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.1-13
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue