remove deprecated warning for fix build error

(cherry picked from commit 4fc32a5af74be10934fb724c83be9756eebffa71)
This commit is contained in:
chen-jan 2022-01-21 22:55:23 +08:00 committed by openeuler-sync-bot
parent 1fdc5b88e9
commit 0f83528074
2 changed files with 36 additions and 1 deletions

View File

@ -0,0 +1,30 @@
From a9432d389954611956ea389de2f819986985ba35 Mon Sep 17 00:00:00 2001
From: takkanm <takkanm@gmail.com>
Date: Tue, 26 Dec 2017 20:44:52 +0900
Subject: [PATCH] remove deprecated warning
BigDecimal.new is deprecated in Ruby2.5
```
spec/addressable/template_spec.rb:85: warning: BigDecimal.new is deprecated; use Kernel.BigDecimal method instead.
```
---
spec/addressable/template_spec.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/spec/addressable/template_spec.rb b/spec/addressable/template_spec.rb
index bd8ab12..cff4a87 100644
--- a/spec/addressable/template_spec.rb
+++ b/spec/addressable/template_spec.rb
@@ -82,7 +82,7 @@ describe "Type conversion" do
:hello => 1234,
:nothing => nil,
:sym => :symbolic,
- :decimal => BigDecimal.new('1')
+ :decimal => BigDecimal('1')
}
}
--
2.30.0

View File

@ -1,7 +1,7 @@
%global gem_name addressable
Name: rubygem-%{gem_name}
Version: 2.5.2
Release: 2
Release: 3
Summary: URI Implementation
License: ASL 2.0
URL: https://github.com/sporkmonger/addressable
@ -14,6 +14,7 @@ Patch0: no-rack-mount.patch
# Comment out failing tests
Patch1: fix_addressable_tests.patch
Patch2: CVE-2021-32740.patch
Patch3: remove-deprecated-warning.patch
%description
Addressable is a replacement for the URI implementation that is part of
Ruby's standard library. It more closely conforms to the relevant RFCs and
@ -33,6 +34,7 @@ gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec
%patch0
%patch1
%patch2 -p1
%patch3 -p1
%build
gem build %{gem_name}.gemspec
@ -70,6 +72,9 @@ popd
%{gem_instdir}/spec
%changelog
* Fri Jan 21 2022 chenchen <chen_aka_jan@163.com> - 2.5.2-3
- remove deprecated warning for fix build error
* Wed Jul 14 2021 liwu <liwu13@huawei.com> - 2.5.2-2
- fix CVE-2021-32740