!4 [sync] PR-2: Fix keyword parameters for Ruby 2.7

From: @openeuler-sync-bot 
Reviewed-by: @shinwell_hu 
Signed-off-by: @shinwell_hu
This commit is contained in:
openeuler-ci-bot 2022-03-30 08:36:17 +00:00 committed by Gitee
commit 1056d35e1d
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 20 additions and 2 deletions

View File

@ -0,0 +1,12 @@
diff -Nur a/usr/share/gems/gems/ethon-0.9.0/spec/support/localhost_server.rb b/usr/share/gems/gems/ethon-0.9.0/spec/support/localhost_server.rb
--- a/usr/share/gems/gems/ethon-0.9.0/spec/support/localhost_server.rb 2022-02-22 18:28:21.009558853 +0800
+++ b/usr/share/gems/gems/ethon-0.9.0/spec/support/localhost_server.rb 2022-02-22 18:27:59.245191570 +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?

View File

@ -1,13 +1,15 @@
%global gem_name ethon
Name: rubygem-%{gem_name}
Version: 0.9.0
Release: 1
Release: 2
Summary: Libcurl wrapper
License: MIT
URL: https://github.com/typhoeus/ethon
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
#https://github.com/typhoeus/ethon/pull/174
Patch0: rubygem-ethon-0.9.0-Fix-keyword-parameters-for-Ruby-2.7.patch
BuildRequires: ruby(release) rubygems-devel >= 1.3.6 ruby rubygem(rspec) rubygem(ffi) => 1.3.0
BuildRequires: rubygem(mime-types) => 1.18 rubygem(rack) rubygem(sinatra)
BuildRequires: rubygem(mime-types) => 1.18 rubygem(rack) rubygem(sinatra) rubygem(webrick)
BuildArch: noarch
%description
Very lightweight libcurl wrapper.
@ -22,6 +24,7 @@ Documentation for %{name}.
%prep
%setup -q -c -T
%gem_install -n %{SOURCE0}
%patch0 -p1
%build
@ -59,5 +62,8 @@ popd
%{gem_instdir}/spec
%changelog
* Thu Feb 24 2022 liyanan <liyanan32@huawei.com> - 0.9.0-2
- Fix keyword parameters for Ruby 2.7
* Thu Aug 20 2020 xiezheng <xiezheng4@huawei.com> - 0.9.0-1
- package init