public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/rubygem-loofah] rawhide: Apply upstream patch to support json 3
@ 2026-09-20  6:35 Mamoru TASAKA
  0 siblings, 0 replies; only message in thread
From: Mamoru TASAKA @ 2026-09-20  6:35 UTC (permalink / raw)
  To: git-commits

A new commit has been pushed.

Repo   : rpms/rubygem-loofah
Branch : rawhide
Commit : 494794a809f14466f00bbd839438fa09ff49e24d
Author : Mamoru TASAKA <mtasaka@fedoraproject.org>
Date   : 2026-09-20T15:21:46+09:00
Stats  : +31/-1 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/rubygem-loofah/c/494794a809f14466f00bbd839438fa09ff49e24d?branch=rawhide

Log:
Apply upstream patch to support json 3

---
diff --git a/loofah-pr307-support-json3-allow-comments.patch b/loofah-pr307-support-json3-allow-comments.patch
new file mode 100644
index 0000000..dd7b0c3
--- /dev/null
+++ b/loofah-pr307-support-json3-allow-comments.patch
@@ -0,0 +1,23 @@
+From 2dfede9b40e0d1f9f06e3743b6ebbe0ff49808c4 Mon Sep 17 00:00:00 2001
+From: Mike Dalessio <mike.dalessio@gmail.com>
+Date: Wed, 15 Jul 2026 14:59:57 -0400
+Subject: [PATCH] test: opt into JSON comment parsing for sanitizer testdata
+
+json 2.20.0 deprecated parsing comments without `allow_comments: true`, and the testdata file has them.
+---
+ test/html5/test_sanitizer.rb | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/test/html5/test_sanitizer.rb b/test/html5/test_sanitizer.rb
+index 096ea7d..e0d46f7 100755
+--- a/test/html5/test_sanitizer.rb
++++ b/test/html5/test_sanitizer.rb
+@@ -376,7 +376,7 @@ def test_figure_element_is_valid
+   ##
+   require "json"
+   Dir[File.join(File.dirname(__FILE__), "..", "assets", "testdata_sanitizer_tests1.dat")].each do |filename|
+-    JSON.parse(File.read(filename)).each do |test|
++    JSON.parse(File.read(filename), allow_comments: true).each do |test|
+       it "testdata sanitizer #{test["name"]}" do
+         test.delete("name")
+         input = test.delete("input")

diff --git a/rubygem-loofah.spec b/rubygem-loofah.spec
index c934cd0..72de5f5 100644
--- a/rubygem-loofah.spec
+++ b/rubygem-loofah.spec
@@ -2,7 +2,7 @@
 
 Name: rubygem-%{gem_name}
 Version: 2.22.0
-Release: 9%{?dist}
+Release: 10%{?dist}
 Summary: Manipulate and transform HTML/XML documents and fragments
 License: MIT
 URL: https://github.com/flavorjones/loofah
@@ -12,6 +12,9 @@ Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
 Source1: %{gem_name}-%{version}-test.tar.gz
 # Fix minitest6 compatibility
 Patch0:  %{gem_name}-2.22.0-minitest6.patch
+# https://github.com/flavorjones/loofah/pull/307
+# Fix json 3 compatibility
+Patch1: %{gem_name}-pr307-support-json3-allow-comments.patch
 BuildRequires: ruby(release)
 BuildRequires: rubygems-devel
 BuildRequires: ruby
@@ -41,6 +44,7 @@ Documentation for %{name}.
 (
 cd %{_builddir}
 %patch -P0 -p1
+%patch -P1 -p1
 )
 
 %build
@@ -75,6 +79,9 @@ popd
 %doc %{gem_instdir}/SECURITY.md
 
 %changelog
+* Sun Sep 13 2026 Mamoru TASAKA <mtasaka@fedoraproject.org> - 2.22.0-10
+- Apply upstream patch to support json 3
+
 * Fri Jul 17 2026 Fedora Release Engineering <releng@fedoraproject.org> - 2.22.0-9
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild
 

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-09-20  6:35 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-20  6:35 [rpms/rubygem-loofah] rawhide: Apply upstream patch to support json 3 Mamoru TASAKA

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox