!5 fix ruby 3.0 compatibility
From: @lyn1001 Reviewed-by: @shinwell_hu Signed-off-by: @shinwell_hu
This commit is contained in:
commit
b50047dcc6
@ -1,13 +1,15 @@
|
||||
%global gem_name typhoeus
|
||||
Name: rubygem-%{gem_name}
|
||||
Version: 1.0.2
|
||||
Release: 1
|
||||
Release: 2
|
||||
Summary: Parallel HTTP library on top of libcurl multi
|
||||
License: MIT
|
||||
URL: https://github.com/typhoeus/typhoeus
|
||||
Source0: https://rubygems.org/gems/typhoeus-%{version}.gem
|
||||
#https://github.com/typhoeus/typhoeus/pull/668
|
||||
Patch0: typhoeus-1.0.2-Fix-Ruby-3.0-compatibility.patch
|
||||
BuildRequires: ruby(release) rubygems-devel ruby rubygem(ethon) >= 0.7.0 rubygem(faraday)
|
||||
BuildRequires: rubygem(rack) rubygem(rspec) rubygem(sinatra)
|
||||
BuildRequires: rubygem(rack) rubygem(rspec) rubygem(sinatra) rubygem(webrick)
|
||||
BuildArch: noarch
|
||||
%description
|
||||
Like a modern code version of the mythical beast with 100 serpent heads,
|
||||
@ -26,6 +28,7 @@ Documentation for %{name}.
|
||||
%prep
|
||||
%setup -q -c -T
|
||||
%gem_install -n %{SOURCE0}
|
||||
%patch0 -p1
|
||||
|
||||
%build
|
||||
|
||||
@ -68,5 +71,8 @@ popd
|
||||
%doc %{gem_docdir}
|
||||
|
||||
%changelog
|
||||
* Thu Feb 24 2022 liyanan <liyanan32@huawei.com> - 1.0.2-2
|
||||
- Fix Ruby 3.0 compatibility
|
||||
|
||||
* Mon Aug 24 2020 liyanan <liyanan32@huawei.com> - 1.0.2-1
|
||||
- package init
|
||||
|
||||
25
typhoeus-1.0.2-Fix-Ruby-3.0-compatibility.patch
Normal file
25
typhoeus-1.0.2-Fix-Ruby-3.0-compatibility.patch
Normal file
@ -0,0 +1,25 @@
|
||||
diff -Nur a/usr/share/gems/gems/typhoeus-1.0.2/Gemfile b/usr/share/gems/gems/typhoeus-1.0.2/Gemfile
|
||||
--- a/usr/share/gems/gems/typhoeus-1.0.2/Gemfile 2022-02-22 17:24:27.241061703 +0800
|
||||
+++ b/usr/share/gems/gems/typhoeus-1.0.2/Gemfile 2022-02-22 17:24:04.860685270 +0800
|
||||
@@ -11,6 +11,9 @@
|
||||
gem "rspec", "~> 3.0"
|
||||
|
||||
gem "sinatra", "~> 1.3"
|
||||
+
|
||||
+ gem "webrick"
|
||||
+
|
||||
gem "json"
|
||||
gem "faraday", ">= 0.9"
|
||||
|
||||
diff -Nur a/usr/share/gems/gems/typhoeus-1.0.2/spec/support/localhost_server.rb b/usr/share/gems/gems/typhoeus-1.0.2/spec/support/localhost_server.rb
|
||||
--- a/usr/share/gems/gems/typhoeus-1.0.2/spec/support/localhost_server.rb 2022-02-22 17:24:27.269062174 +0800
|
||||
+++ b/usr/share/gems/gems/typhoeus-1.0.2/spec/support/localhost_server.rb 2022-02-22 17:22:37.167210286 +0800
|
||||
@@ -43,7 +43,7 @@
|
||||
# Use WEBrick since it's part of the ruby standard library and is available on all ruby interpreters.
|
||||
options = { :Port => port }
|
||||
options.merge!(:AccessLog => [], :Logger => WEBrick::BasicLog.new(StringIO.new)) unless ENV['VERBOSE_SERVER']
|
||||
- Rack::Handler::WEBrick.run(Identify.new(@rack_app), options)
|
||||
+ Rack::Handler::WEBrick.run(Identify.new(@rack_app), **options)
|
||||
end
|
||||
|
||||
def booted?
|
||||
Loading…
x
Reference in New Issue
Block a user