!10 Package upgrade
From: @lyn1001 Reviewed-by: @small_leek Signed-off-by: @small_leek
This commit is contained in:
commit
1c5aa5cedd
@ -1,11 +0,0 @@
|
|||||||
--- rspec-support-3.8.2/spec/rspec/support/spec/stderr_splitter_spec.rb 2022-02-16 21:22:44.095853100 +0800
|
|
||||||
+++ rspec-support-3.8.2_bak/spec/rspec/support/spec/stderr_splitter_spec.rb 2022-02-16 21:21:29.934595730 +0800
|
|
||||||
@@ -88,7 +88,7 @@
|
|
||||||
|
|
||||||
unless defined?(RUBY_ENGINE) && RUBY_ENGINE == 'rbx'
|
|
||||||
it 'will fail an example which generates a warning' do
|
|
||||||
- true unless @undefined
|
|
||||||
+ true unless $undefined
|
|
||||||
expect { splitter.verify_no_warnings! }.to raise_error(/Warnings were generated:/)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
@ -1,57 +0,0 @@
|
|||||||
From b2f4a683f163cfbb663595464caed99a09f16bd1 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Jon Rowe <hello@jonrowe.co.uk>
|
|
||||||
Date: Thu, 26 Dec 2019 19:58:59 +0000
|
|
||||||
Subject: [PATCH] Make usage of keyword arguments for String#encode explicit to
|
|
||||||
avoid warning on 2.7.0
|
|
||||||
|
|
||||||
---
|
|
||||||
lib/rspec/support/encoded_string.rb | 33 +++++++++++++++++++++++++++--
|
|
||||||
1 file changed, 31 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/lib/rspec/support/encoded_string.rb b/lib/rspec/support/encoded_string.rb
|
|
||||||
index a6ca0cb6..66f75ca1 100644
|
|
||||||
--- a/lib/rspec/support/encoded_string.rb
|
|
||||||
+++ b/lib/rspec/support/encoded_string.rb
|
|
||||||
@@ -112,11 +112,40 @@ def matching_encoding(string)
|
|
||||||
string = remove_invalid_bytes(string)
|
|
||||||
string.encode(@encoding)
|
|
||||||
rescue Encoding::UndefinedConversionError, Encoding::InvalidByteSequenceError
|
|
||||||
- string.encode(@encoding, ENCODE_UNCONVERTABLE_BYTES)
|
|
||||||
+ encode_unconvertable_bytes(string)
|
|
||||||
rescue Encoding::ConverterNotFoundError
|
|
||||||
- string.dup.force_encoding(@encoding).encode(ENCODE_NO_CONVERTER)
|
|
||||||
+ encode_no_converter(string.dup.force_encoding(@encoding))
|
|
||||||
end
|
|
||||||
|
|
||||||
+ private
|
|
||||||
+
|
|
||||||
+ # On Ruby 2.7.0 keyword arguments mixed with conventional cause a warning to
|
|
||||||
+ # be issued requiring us to be explicit by using a ** to pass the hash as
|
|
||||||
+ # keyword arguments. Any keyword argument supporting Ruby supports this.
|
|
||||||
+ if RubyFeatures.kw_args_supported?
|
|
||||||
+ # Note on non keyword supporting Ruby ** causes a syntax error hence
|
|
||||||
+ # we must use eval. To be removed in RSpec 4.
|
|
||||||
+ binding.eval(<<-CODE, __FILE__, __LINE__)
|
|
||||||
+ def encode_unconvertable_bytes(string)
|
|
||||||
+ string.encode(@encoding, **ENCODE_UNCONVERTABLE_BYTES)
|
|
||||||
+ end
|
|
||||||
+
|
|
||||||
+ def encode_no_converter(string)
|
|
||||||
+ string.encode(**ENCODE_NO_CONVERTER)
|
|
||||||
+ end
|
|
||||||
+ CODE
|
|
||||||
+ else
|
|
||||||
+ def encode_unconvertable_bytes(string)
|
|
||||||
+ string.encode(@encoding, ENCODE_UNCONVERTABLE_BYTES)
|
|
||||||
+ end
|
|
||||||
+
|
|
||||||
+ def encode_no_converter(string)
|
|
||||||
+ string.encode(ENCODE_NO_CONVERTER)
|
|
||||||
+ end
|
|
||||||
+ end
|
|
||||||
+
|
|
||||||
+ public
|
|
||||||
+
|
|
||||||
# Prevents raising ArgumentError
|
|
||||||
if String.method_defined?(:scrub)
|
|
||||||
# https://github.com/ruby/ruby/blob/eeb05e8c11/doc/NEWS-2.1.0#L120-L123
|
|
||||||
BIN
rspec-support-3.10.3.gem
Normal file
BIN
rspec-support-3.10.3.gem
Normal file
Binary file not shown.
Binary file not shown.
@ -1,5 +1,5 @@
|
|||||||
%global gem_name rspec-support
|
%global gem_name rspec-support
|
||||||
%global mainver 3.8.2
|
%global mainver 3.10.3
|
||||||
%undefine prever
|
%undefine prever
|
||||||
%global mainrel 1
|
%global mainrel 1
|
||||||
%global prerpmver %(echo "%{?prever}" | sed -e 's|\\.||g')
|
%global prerpmver %(echo "%{?prever}" | sed -e 's|\\.||g')
|
||||||
@ -7,7 +7,7 @@
|
|||||||
%undefine __brp_mangle_shebangs
|
%undefine __brp_mangle_shebangs
|
||||||
Name: rubygem-%{gem_name}
|
Name: rubygem-%{gem_name}
|
||||||
Version: %{mainver}
|
Version: %{mainver}
|
||||||
Release: 2
|
Release: 1
|
||||||
Summary: Common functionality to Rspec series
|
Summary: Common functionality to Rspec series
|
||||||
License: MIT
|
License: MIT
|
||||||
URL: https://github.com/rspec/rspec-support
|
URL: https://github.com/rspec/rspec-support
|
||||||
@ -15,10 +15,6 @@ Source0: https://rubygems.org/gems/%{gem_name}-%{mainver}%{?prever}.gem
|
|||||||
Source1: https://github.com/rspec/%{gem_name}/archive/v%{mainver}.tar.gz
|
Source1: https://github.com/rspec/%{gem_name}/archive/v%{mainver}.tar.gz
|
||||||
# tweak regex for search path
|
# tweak regex for search path
|
||||||
Patch100: rubygem-rspec-support-3.2.1-callerfilter-searchpath-regex.patch
|
Patch100: rubygem-rspec-support-3.2.1-callerfilter-searchpath-regex.patch
|
||||||
#https://github.com/rspec/rspec-support/commit/b2f4a683f163cfbb663595464caed99a09f16bd1
|
|
||||||
Patch101: Make-usage-of-keyword-arguments-for-string.patch
|
|
||||||
#https://github.com/rspec/rspec-support/commit/ed32a443ffab54d3aa3b4b599e1530dfabba8be7
|
|
||||||
Patch102: Instance-vars-no-longer-emit-warnings-in-Ruby-3.patch
|
|
||||||
BuildRequires: rubygems-devel rubygem-simplecov rubygem(did_you_mean)
|
BuildRequires: rubygems-devel rubygem-simplecov rubygem(did_you_mean)
|
||||||
%if 0%{?need_bootstrap_set} < 1
|
%if 0%{?need_bootstrap_set} < 1
|
||||||
BuildRequires: rubygem(rspec) rubygem(thread_order) rubygem(bigdecimal) git
|
BuildRequires: rubygem(rspec) rubygem(thread_order) rubygem(bigdecimal) git
|
||||||
@ -40,8 +36,7 @@ Documentation for %{name}
|
|||||||
%setup -q -T -n %{gem_name}-%{version} -b 1
|
%setup -q -T -n %{gem_name}-%{version} -b 1
|
||||||
gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec
|
gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec
|
||||||
%patch100 -p1
|
%patch100 -p1
|
||||||
%patch101 -p1
|
|
||||||
%patch102 -p1
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
gem build %{gem_name}.gemspec
|
gem build %{gem_name}.gemspec
|
||||||
@ -83,6 +78,9 @@ ruby -rrubygems -Ilib/ -S rspec spec/ || \
|
|||||||
%doc %{gem_docdir}
|
%doc %{gem_docdir}
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Jun 29 2022 liyanan <liyanan32@h-partners.com> - 3.10.3-1
|
||||||
|
- Upgrade to version 3.10.3
|
||||||
|
|
||||||
* Tue Mar 1 2022 liyanan <liyanan32@huawei.com> - 3.8.2-2
|
* Tue Mar 1 2022 liyanan <liyanan32@huawei.com> - 3.8.2-2
|
||||||
- Fix build error
|
- Fix build error
|
||||||
|
|
||||||
|
|||||||
BIN
v3.10.3.tar.gz
Normal file
BIN
v3.10.3.tar.gz
Normal file
Binary file not shown.
BIN
v3.8.2.tar.gz
BIN
v3.8.2.tar.gz
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user