From 1a32100d6641c987a1cec59e40bb8eb143835aa9 Mon Sep 17 00:00:00 2001 From: akhila-guruju Date: Tue, 24 Dec 2024 06:06:40 +0000 Subject: [PATCH] Upgrade: rubygem-rouge version to 4.4.0 --- SPECS-EXTENDED/rubygem-rouge/bundler.rb | 6 + .../rouge-create-missing-test-files.sh | 33 +++++ .../rubygem-rouge.signatures.json | 8 +- .../rubygem-rouge/rubygem-rouge.spec | 134 +++++++++++++++--- .../rubygem-rouge/spec_helper_assert.rb | 24 ++++ cgmanifest.json | 4 +- 6 files changed, 184 insertions(+), 25 deletions(-) create mode 100644 SPECS-EXTENDED/rubygem-rouge/bundler.rb create mode 100644 SPECS-EXTENDED/rubygem-rouge/rouge-create-missing-test-files.sh create mode 100644 SPECS-EXTENDED/rubygem-rouge/spec_helper_assert.rb diff --git a/SPECS-EXTENDED/rubygem-rouge/bundler.rb b/SPECS-EXTENDED/rubygem-rouge/bundler.rb new file mode 100644 index 00000000000..6ad846060c3 --- /dev/null +++ b/SPECS-EXTENDED/rubygem-rouge/bundler.rb @@ -0,0 +1,6 @@ +module Bundler + class << self + def require + end + end +end diff --git a/SPECS-EXTENDED/rubygem-rouge/rouge-create-missing-test-files.sh b/SPECS-EXTENDED/rubygem-rouge/rouge-create-missing-test-files.sh new file mode 100644 index 00000000000..eb186600878 --- /dev/null +++ b/SPECS-EXTENDED/rubygem-rouge/rouge-create-missing-test-files.sh @@ -0,0 +1,33 @@ +#!/bin/bash + +usage() { + echo "$0 " +} + +set -e +set -x + +if [ $# -lt 1 ] ; then + usage + exit 1 +fi + +VERSION=$1 +REPONAME=rouge + +TMPDIR=$(mktemp -d /tmp/rouge-XXXXXX) +CURDIR=$(pwd) + +pushd $TMPDIR + +git clone https://github.com/rouge-ruby/${REPONAME}.git +cd rouge/ + +git reset --hard v$VERSION +cd .. +ln -sf ${REPONAME} ${REPONAME}-${VERSION} +tar czf $CURDIR/rouge-${VERSION}-test-missing-files.tar.gz ${REPONAME}-${VERSION}/spec/ + +popd +rm -rf $TMPDIR + diff --git a/SPECS-EXTENDED/rubygem-rouge/rubygem-rouge.signatures.json b/SPECS-EXTENDED/rubygem-rouge/rubygem-rouge.signatures.json index 7e0cddad2c7..15a66fb9291 100644 --- a/SPECS-EXTENDED/rubygem-rouge/rubygem-rouge.signatures.json +++ b/SPECS-EXTENDED/rubygem-rouge/rubygem-rouge.signatures.json @@ -1,5 +1,9 @@ { "Signatures": { - "rouge-3.26.0.tar.gz": "d856bf074925dff523f0e1232d5ff0be81cdf7428bf9b4425d0055bce61ad43d" + "bundler.rb": "5568b03c72652879f7d07b9bdd27a41fc8d3fc3e2f60ae8b40ff71a2b0f2023f", + "rouge-4.4.0.gem": "7a6d6d951e3202e4ce3926838625fa6edeb35680e6d1e3817f53c14212220b64", + "rouge-create-missing-test-files.sh": "13bf81dccdf5a36c7d1159004e3aeecbae54520faf24a151667e8871e2a21c3c", + "rubygem-rouge-4.4.0.tar.gz": "812398e04d6518dd90a50befb3e4efedd24dac31921e0189ff464f2668685df2", + "spec_helper_assert.rb": "4a510a7d0ba8cd0df97b19854a8fcba3659ea8b5f3de7c8abd5879b7e5bc137c" } -} +} \ No newline at end of file diff --git a/SPECS-EXTENDED/rubygem-rouge/rubygem-rouge.spec b/SPECS-EXTENDED/rubygem-rouge/rubygem-rouge.spec index 3d45090386e..b1fa3411298 100644 --- a/SPECS-EXTENDED/rubygem-rouge/rubygem-rouge.spec +++ b/SPECS-EXTENDED/rubygem-rouge/rubygem-rouge.spec @@ -1,23 +1,34 @@ -Vendor: Microsoft Corporation -Distribution: Azure Linux %global gem_name rouge Name: rubygem-%{gem_name} -Version: 3.26.0 -Release: 3%{?dist} +Version: 4.4.0 +Release: 2%{?dist} Summary: Pure-ruby colorizer based on pygments -License: MIT and BSD +# From LICENSE file +# SPDX confirmed +License: MIT AND BSD-2-Clause +Vendor: Microsoft Corporation +Distribution: Azure Linux + URL: http://rouge.jneen.net/ -Source0: https://github.com/rouge-ruby/rouge/archive/refs/tags/v%{version}.tar.gz#/%{gem_name}-%{version}.tar.gz +Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem +Source1: %{gem_name}-%{version}-test-missing-files.tar.gz#/%{name}-%{version}.tar.gz +# SOURCE1 is created by $ bash %%SOURCE2 %%version +Source2: rouge-create-missing-test-files.sh +Source10: spec_helper_assert.rb +Source11: bundler.rb BuildRequires: ruby(release) BuildRequires: rubygems-devel -BuildRequires: ruby >= 2.0 BuildRequires: help2man +BuildRequires: rubygem(minitest) +BuildRequires: rubygem(rake) + BuildArch: noarch %description Rouge aims to a be a simple, easy-to-extend drop-in replacement for pygments. + %package doc Summary: Documentation for %{name} Requires: %{name} = %{version}-%{release} @@ -26,11 +37,18 @@ BuildArch: noarch %description doc Documentation for %{name}. + %prep -%setup -q -n %{gem_name}-%{version} +%setup -q -n %{gem_name}-%{version} -a 1 +mv ../%{gem_name}-%{version}.gemspec . + +cp -a %{gem_name}-%{version}/spec . +mkdir FAKE +cp -a %{SOURCE11} FAKE/ +cp -pa %{SOURCE10} spec/ %build -gem build %{gem_name} +gem build %{gem_name}-%{version}.gemspec %gem_install %install @@ -46,32 +64,103 @@ find %{buildroot}%{gem_instdir}/bin -type f | xargs chmod a+x export GEM_PATH="%{buildroot}%{gem_dir}:%{gem_dir}" mkdir -p %{buildroot}%{_mandir}/man1 - help2man -N -s1 -o %{buildroot}%{_mandir}/man1/rougify.1 \ %{buildroot}%{_bindir}/rougify +rm -f %{buildroot}%{gem_cache} +pushd %{buildroot}%{gem_instdir} +rm -rf \ + Gemfile \ + %{gem_name}.gemspec \ + %{nil} +popd + +%check +find spec -name \*_spec.rb -print0 | \ + sort --zero-terminated | \ + xargs --null ruby -Ilib:FAKE \ + -r./spec/spec_helper \ + -r./spec/spec_helper_assert \ + -r rake/rake_test_loader \ + %{nil} + %files +%dir %{gem_instdir} + %license %{gem_instdir}/LICENSE + +%{gem_libdir} +%exclude %{gem_libdir}/%{gem_name}/demos + %{_bindir}/rougify -%{_mandir}/man1/rougify.1* -%dir %{gem_instdir} %{gem_instdir}/bin -%exclude %{gem_instdir}/rouge.gemspec -%{gem_libdir} -%exclude %{gem_cache} +%{_mandir}/man1/rougify.1* + %{gem_spec} %files doc %doc %{gem_docdir} -%{gem_instdir}/Gemfile +%{gem_libdir}/%{gem_name}/demos %changelog -* Tue Mar 22 2022 Neha Agarwal - 3.26.0-3 -- License verified. -- Build from .tar.gz source. +* Tue Dec 24 2024 Akhila Guruju - 4.4.0-2 +- Azure Linux import from Fedora 41 (license: MIT). +- License verified + +* Fri Sep 20 2024 Mamoru TASAKA - 4.4.0-1 +- 4.4.0 + +* Fri Jul 19 2024 Fedora Release Engineering - 4.3.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + +* Tue Jun 18 2024 Mamoru TASAKA - 4.3.0-1 +- 4.3.0 + +* Mon Mar 18 2024 Mamoru TASAKA - 4.2.1-1 +- 4.2.1 + +* Fri Jan 26 2024 Fedora Release Engineering - 4.2.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Wed Oct 25 2023 Mamoru TASAKA - 4.2.0-1 +- 4.2.0 + +* Fri Aug 18 2023 Mamoru TASAKA - 4.1.3-1 +- 4.1.3 + +* Fri Jul 21 2023 Fedora Release Engineering - 4.1.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Fri Feb 17 2023 Mamoru TASAKA - 4.1.0-1 +- 4.1.0 -* Fri Oct 15 2021 Pawel Winogrodzki - 3.26.0-2 -- Initial CBL-Mariner import from Fedora 32 (license: MIT). +* Sun Feb 12 2023 Mamoru TASAKA - 4.0.1-3 +- Execute spec test provided by the upstream +- Backport upstream patch for ruby32 regex issue with hash character + +* Fri Jan 20 2023 Fedora Release Engineering - 4.0.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Wed Dec 21 2022 Mamoru TASAKA - 4.0.1-1 +- 4.0.1 + +* Sun Oct 9 2022 Mamoru TASAKA - 4.0.0-2 +- 4.0.0 + +* Sat Jul 23 2022 Fedora Release Engineering - 3.26.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Fri Jan 21 2022 Fedora Release Engineering - 3.26.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Sun Sep 19 2021 Mamoru TASAKA - 3.26.1-1 +- 3.26.1 + +* Fri Jul 23 2021 Fedora Release Engineering - 3.26.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Wed Jan 27 2021 Fedora Release Engineering - 3.26.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild * Fri Dec 11 2020 Fabio Valentini - 3.26.0-1 - Update to version 3.26.0. @@ -88,6 +177,9 @@ help2man -N -s1 -o %{buildroot}%{_mandir}/man1/rougify.1 \ * Wed Aug 12 2020 Fabio Valentini - 3.22.0-1 - Update to version 3.22.0. +* Wed Jul 29 2020 Fedora Release Engineering - 3.21.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + * Wed Jul 15 2020 Fabio Valentini - 3.21.0-1 - Update to version 3.21.0. diff --git a/SPECS-EXTENDED/rubygem-rouge/spec_helper_assert.rb b/SPECS-EXTENDED/rubygem-rouge/spec_helper_assert.rb new file mode 100644 index 00000000000..a063576088a --- /dev/null +++ b/SPECS-EXTENDED/rubygem-rouge/spec_helper_assert.rb @@ -0,0 +1,24 @@ +module Minitest + module Assertions + + alias_method :assert_orig, :assert + alias_method :refute_orig, :refute + + def assert(test = nil, msg = nil, &block) + if block_given? + assert_orig yield + else + assert_orig test, msg + end + end + + def refute(test = nil, msg = nil, &block) + if block_given? + refute_orig yield + else + refute_orig test, msg + end + end + + end +end diff --git a/cgmanifest.json b/cgmanifest.json index e724680b882..029ffc793b5 100644 --- a/cgmanifest.json +++ b/cgmanifest.json @@ -26834,8 +26834,8 @@ "type": "other", "other": { "name": "rubygem-rouge", - "version": "3.26.0", - "downloadUrl": "https://github.com/rouge-ruby/rouge/archive/refs/tags/v3.26.0.tar.gz" + "version": "4.4.0", + "downloadUrl": "https://rubygems.org/downloads/rouge-4.4.0.gem" } } },