diff -Nru ruby-json-schema-2.8.1/debian/changelog ruby-json-schema-2.8.1.new/debian/changelog --- ruby-json-schema-2.8.1/debian/changelog 2019-01-03 11:27:05.000000000 -0200 +++ ruby-json-schema-2.8.1.new/debian/changelog 2020-03-06 08:55:38.263332245 -0300 @@ -1,3 +1,10 @@ +ruby-json-schema (2.8.1-1ubuntu1) focal; urgency=medium + + * d/p/ruby27_support.patch: add patch to rescue IPAddr::InvalidAddressError, + adding support for ruby 2.7+ (LP: #1866334). + + -- Lucas Kanashiro Fri, 06 Mar 2020 08:34:09 -0300 + ruby-json-schema (2.8.1-1) unstable; urgency=medium * Team upload diff -Nru ruby-json-schema-2.8.1/debian/control ruby-json-schema-2.8.1.new/debian/control --- ruby-json-schema-2.8.1/debian/control 2019-01-03 11:27:05.000000000 -0200 +++ ruby-json-schema-2.8.1.new/debian/control 2020-03-06 08:35:59.857776018 -0300 @@ -1,7 +1,8 @@ Source: ruby-json-schema Section: ruby Priority: optional -Maintainer: Debian Ruby Extras Maintainers +Maintainer: Ubuntu Developers +XSBC-Original-Maintainer: Debian Ruby Extras Maintainers Uploaders: Balasankar C Build-Depends: debhelper-compat (= 11), gem2deb, diff -Nru ruby-json-schema-2.8.1/debian/patches/ruby27_support.patch ruby-json-schema-2.8.1.new/debian/patches/ruby27_support.patch --- ruby-json-schema-2.8.1/debian/patches/ruby27_support.patch 1969-12-31 21:00:00.000000000 -0300 +++ ruby-json-schema-2.8.1.new/debian/patches/ruby27_support.patch 2020-03-06 08:34:03.149623009 -0300 @@ -0,0 +1,26 @@ +Origin: https://github.com/ruby-json-schema/json-schema/commit/4ed4025e418ced4c207580b855d173ee3c99509c.patch +Forwarded: https://github.com/ruby-json-schema/json-schema/pull/437 +Bug: https://github.com/ruby-json-schema/json-schema/issues/430 +Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=952019 +From: Luke Rodgers +Date: Sun, 26 May 2019 21:45:45 -0400 +Subject: [PATCH] Rescue IPAddr::InvalidAddressError + +As of ruby 2.6 the error raise here includes a string with the offending +IP in it, which causes the matching to fail. We could just ditch string +matching altogether except for 1.9.3 support, which raises a generic +ArugmentError. +--- + lib/json-schema/attributes/formats/ip.rb | 1 + + 1 file changed, 1 insertion(+) + +--- a/lib/json-schema/attributes/formats/ip.rb ++++ b/lib/json-schema/attributes/formats/ip.rb +@@ -10,6 +10,7 @@ + + begin + ip = IPAddr.new(data) ++ rescue IPAddr::InvalidAddressError + rescue ArgumentError => e + raise e unless e.message == 'invalid address' + end diff -Nru ruby-json-schema-2.8.1/debian/patches/series ruby-json-schema-2.8.1.new/debian/patches/series --- ruby-json-schema-2.8.1/debian/patches/series 2019-01-03 11:27:05.000000000 -0200 +++ ruby-json-schema-2.8.1.new/debian/patches/series 2020-03-06 08:34:03.161623024 -0300 @@ -0,0 +1 @@ +ruby27_support.patch