!3 fix build error caused by upgrading to ruby3
From: @chen-jan Reviewed-by: @shinwell_hu Signed-off-by: @shinwell_hu
This commit is contained in:
commit
3028123113
32
kwargs.patch
Normal file
32
kwargs.patch
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
From 6e6d6a70848cf006fabf48088cb4140c6d1858e7 Mon Sep 17 00:00:00 2001
|
||||||
|
From: pavel <pavel.rosicky@easy.cz>
|
||||||
|
Date: Tue, 1 Oct 2019 12:29:13 +0200
|
||||||
|
Subject: [PATCH] kwargs
|
||||||
|
|
||||||
|
Patch from: https://github.com/rails/sprockets/commit/6e6d6a70848cf006fabf48088cb4140c6d1858e7
|
||||||
|
---
|
||||||
|
test/test_performance.rb | 4 ++--
|
||||||
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/test/test_performance.rb b/test/test_performance.rb
|
||||||
|
index c9e76c00..f2ffde60 100644
|
||||||
|
--- a/test/test_performance.rb
|
||||||
|
+++ b/test/test_performance.rb
|
||||||
|
@@ -16,12 +16,12 @@ end
|
||||||
|
$dir_entires_calls = nil
|
||||||
|
class << Dir
|
||||||
|
alias_method :original_entries, :entries
|
||||||
|
- def entries(dirname, *args)
|
||||||
|
+ def entries(dirname, **args)
|
||||||
|
if $dir_entires_calls
|
||||||
|
$dir_entires_calls[dirname.to_s] ||= []
|
||||||
|
$dir_entires_calls[dirname.to_s] << caller
|
||||||
|
end
|
||||||
|
- original_entries(dirname, *args)
|
||||||
|
+ original_entries(dirname, **args)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
--
|
||||||
|
2.33.0
|
||||||
|
|
||||||
@ -1,16 +1,17 @@
|
|||||||
%global gem_name sprockets
|
%global gem_name sprockets
|
||||||
Name: rubygem-%{gem_name}
|
Name: rubygem-%{gem_name}
|
||||||
Version: 3.7.2
|
Version: 3.7.2
|
||||||
Release: 1
|
Release: 2
|
||||||
Summary: Rack-based asset packaging system
|
Summary: Rack-based asset packaging system
|
||||||
License: MIT
|
License: MIT
|
||||||
URL: https://github.com/rails/sprockets
|
URL: https://github.com/rails/sprockets
|
||||||
Source0: https://rubygems.org/gems/sprockets-%{version}.gem
|
Source0: https://rubygems.org/gems/sprockets-%{version}.gem
|
||||||
Source1: https://github.com/rails/sprockets/archive/v%{version}.tar.gz
|
Source1: https://github.com/rails/sprockets/archive/v%{version}.tar.gz
|
||||||
|
Patch1: kwargs.patch
|
||||||
BuildRequires: ruby(release) rubygems-devel ruby >= 1.9.3 rubygem(concurrent-ruby)
|
BuildRequires: ruby(release) rubygems-devel ruby >= 1.9.3 rubygem(concurrent-ruby)
|
||||||
BuildRequires: rubygem(coffee-script) rubygem(ejs) rubygem(execjs) rubygem(minitest)
|
BuildRequires: rubygem(coffee-script) rubygem(ejs) rubygem(execjs) rubygem(minitest)
|
||||||
BuildRequires: rubygem(nokogiri) rubygem(rack-test) rubygem(rake) rubygem(sass)
|
BuildRequires: rubygem(nokogiri) rubygem(rack-test) rubygem(rake) rubygem(sass)
|
||||||
BuildRequires: rubygem(uglifier) help2man nodejs
|
BuildRequires: rubygem(uglifier) help2man nodejs rubygem(did_you_mean)
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
%description
|
%description
|
||||||
Sprockets is a Rack-based asset packaging system that concatenates and serves
|
Sprockets is a Rack-based asset packaging system that concatenates and serves
|
||||||
@ -26,10 +27,14 @@ Obsoletes: %{name}-doc < %{version}-%{release}
|
|||||||
Documentation for %{name}.
|
Documentation for %{name}.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -c -T
|
%setup -q -n %{gem_name}-%{version} -b 1
|
||||||
%gem_install -n %{SOURCE0}
|
|
||||||
|
%patch1 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
gem build ../%{gem_name}-%{version}.gemspec
|
||||||
|
|
||||||
|
%gem_install
|
||||||
|
|
||||||
%install
|
%install
|
||||||
mkdir -p %{buildroot}%{gem_dir}
|
mkdir -p %{buildroot}%{gem_dir}
|
||||||
@ -46,8 +51,7 @@ help2man --no-discard-stderr -N -s1 -o %{buildroot}%{_mandir}/man1/%{gem_name}.1
|
|||||||
|
|
||||||
%check
|
%check
|
||||||
pushd .%{gem_instdir}
|
pushd .%{gem_instdir}
|
||||||
tar xzf %{SOURCE1}
|
ln -s %{_builddir}/%{gem_name}-%{version}/test .
|
||||||
cd %{gem_name}-%{version}
|
|
||||||
mv test/test_closure_compressor.rb{,.disabled}
|
mv test/test_closure_compressor.rb{,.disabled}
|
||||||
mv lib/sprockets/autoload/closure.rb{,.disabled}
|
mv lib/sprockets/autoload/closure.rb{,.disabled}
|
||||||
sed -i '/:Closure/ s/^/#/' lib/sprockets/autoload.rb
|
sed -i '/:Closure/ s/^/#/' lib/sprockets/autoload.rb
|
||||||
@ -78,5 +82,8 @@ popd
|
|||||||
%doc %{gem_instdir}/README.md
|
%doc %{gem_instdir}/README.md
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Feb 23 2022 chenchen <chen_aka_jan@163.com> - 3.7.2-2
|
||||||
|
- fix build error caused by upgrading to ruby3
|
||||||
|
|
||||||
* Mon Aug 24 2020 liyanan <liyanan32@huawei.com> - 3.7.2-1
|
* Mon Aug 24 2020 liyanan <liyanan32@huawei.com> - 3.7.2-1
|
||||||
- package init
|
- package init
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user