From 0f83528074bb6b398fa4c9e96d50e3924e3f6ed1 Mon Sep 17 00:00:00 2001 From: chen-jan Date: Fri, 21 Jan 2022 22:55:23 +0800 Subject: [PATCH] remove deprecated warning for fix build error (cherry picked from commit 4fc32a5af74be10934fb724c83be9756eebffa71) --- remove-deprecated-warning.patch | 30 ++++++++++++++++++++++++++++++ rubygem-addressable.spec | 7 ++++++- 2 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 remove-deprecated-warning.patch diff --git a/remove-deprecated-warning.patch b/remove-deprecated-warning.patch new file mode 100644 index 0000000..6eec65b --- /dev/null +++ b/remove-deprecated-warning.patch @@ -0,0 +1,30 @@ +From a9432d389954611956ea389de2f819986985ba35 Mon Sep 17 00:00:00 2001 +From: takkanm +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 + diff --git a/rubygem-addressable.spec b/rubygem-addressable.spec index 1b8260d..7ef740a 100644 --- a/rubygem-addressable.spec +++ b/rubygem-addressable.spec @@ -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 - 2.5.2-3 +- remove deprecated warning for fix build error + * Wed Jul 14 2021 liwu - 2.5.2-2 - fix CVE-2021-32740 -- Gitee