diff --git a/.gitignore b/.gitignore index 418faa2..fc64679 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,4 @@ -/rouge-*gem -/rouge-*-test-missing-files.tar.gz +*~ +*.gem +*.rpm +results_*/ diff --git a/bundler.rb b/bundler.rb deleted file mode 100644 index 6ad8460..0000000 --- a/bundler.rb +++ /dev/null @@ -1,6 +0,0 @@ -module Bundler - class << self - def require - end - end -end diff --git a/rouge-create-missing-test-files.sh b/rouge-create-missing-test-files.sh deleted file mode 100644 index eb18660..0000000 --- a/rouge-create-missing-test-files.sh +++ /dev/null @@ -1,33 +0,0 @@ -#!/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/rubygem-rouge.spec b/rubygem-rouge.spec index 8538cbf..c5bc9db 100644 --- a/rubygem-rouge.spec +++ b/rubygem-rouge.spec @@ -1,284 +1,80 @@ %global gem_name rouge -Name: rubygem-%{gem_name} -Version: 4.7.0 -Release: 1%{?dist} -Summary: Pure-ruby colorizer based on pygments -# From LICENSE file -# SPDX confirmed -License: MIT AND BSD-2-Clause +Name: rubygem-%{gem_name} +Version: 1.11.1 +Release: 1%{?dist} +Summary: Simple, easy-to-extend drop-in replacement for pygments -URL: http://rouge.jneen.net/ -Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem -Source1: %{gem_name}-%{version}-test-missing-files.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: help2man -BuildRequires: rubygem(minitest) -BuildRequires: rubygem(rake) +License: MIT and BSD +URL: http://%{gem_name}.jneen.net +Source0: https://rubygems.org/downloads/%{gem_name}-%{version}.gem -BuildArch: noarch +BuildArch: noarch +BuildRequires: help2man +BuildRequires: rubygems-devel %description -Rouge aims to a be a simple, easy-to-extend drop-in replacement for pygments. +Rouge is a pure-ruby syntax highlighter. It can highlight 100 +different languages, and output HTML or ANSI 256-color text. +Its HTML output is compatible with style-sheets designed for pygments. -%package doc -Summary: Documentation for %{name} -Requires: %{name} = %{version}-%{release} -BuildArch: noarch +%package doc +Summary: Documentation files for %{name} -%description doc -Documentation for %{name}. +%description doc +This package contains the documentation files for %{name}. %prep -%setup -q -n %{gem_name}-%{version} -a 1 -mv ../%{gem_name}-%{version}.gemspec . +%{__rm} -rf %{gem_name}-%{version} +%{_bindir}/gem unpack %{SOURCE0} +%setup -DTqn %{gem_name}-%{version} +%{_bindir}/gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec +f="bin/rougify" +%{__sed} -e '1s:^#![ \t]*%{_bindir}/env ruby:#!%{_bindir}/ruby:' \ + < ${f} > ${f}.new && \ +/bin/touch -r ${f} ${f}.new && %{__mv} -f ${f}.new ${f} +f="lib/rouge/demos/perl" +%{__sed} -e '1s:^#![ \t]*%{_bindir}/env perl:#!%{__perl}:' \ + < ${f} > ${f}.new && \ +/bin/touch -r ${f} ${f}.new && %{__mv} -f ${f}.new ${f} && \ +%{__chmod} -c 0755 ${f} +/bin/find lib/rouge/lexers/ -name '*.rb' -type f -print0 | \ + %{_bindir}/xargs -0 %{__chmod} -c 0644 -cp -a %{gem_name}-%{version}/spec . -mkdir FAKE -cp -a %{SOURCE11} FAKE/ -cp -pa %{SOURCE10} spec/ %build -gem build %{gem_name}-%{version}.gemspec +%{_bindir}/gem build %{gem_name}.gemspec %gem_install + %install -mkdir -p %{buildroot}%{gem_dir} -cp -a .%{gem_dir}/* %{buildroot}%{gem_dir}/ - -mkdir -p %{buildroot}%{_bindir} -cp -pa .%{_bindir}/* %{buildroot}%{_bindir}/ - -find %{buildroot}%{gem_instdir}/bin -type f | xargs chmod a+x - -# Generate man page from "rougify --help" output +%{__mkdir} -p %{buildroot}%{_bindir} %{buildroot}%{gem_dir} \ + %{buildroot}%{_mandir}/man1 +%{__cp} -a ./%{_bindir}/* %{buildroot}%{_bindir} +%{__cp} -a ./%{gem_dir}/* %{buildroot}%{gem_dir} +%{__rm} -f %{buildroot}%{gem_instdir}/{*.gemspec,LICENSE} export GEM_PATH="%{buildroot}%{gem_dir}:%{gem_dir}" +%{_bindir}/help2man -N -s1 -o %{buildroot}%{_mandir}/man1/rougify.1 \ + %{buildroot}%{_bindir}/rougify -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 - +%exclude %{gem_cache} +%license LICENSE %{_bindir}/rougify -%{gem_instdir}/bin %{_mandir}/man1/rougify.1* - +%{gem_instdir} %{gem_spec} %files doc %doc %{gem_docdir} -%{gem_libdir}/%{gem_name}/demos + %changelog -* Fri Jan 02 2026 Mamoru TASAKA - 4.7.0-1 -- 4.7.0 - -* Thu Sep 25 2025 Mamoru TASAKA - 4.6.1-1 -- 4.6.1 - -* Wed Jul 23 2025 Mamoru TASAKA - 4.6.0-1 -- 4.6.0 - -* Tue Apr 29 2025 Mamoru TASAKA - 4.5.2-1 -- 4.5.2 - -* Sat Jan 18 2025 Fedora Release Engineering - 4.5.1-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild - -* Thu Dec 05 2024 Mamoru TASAKA - 4.5.1-1 -- 4.5.1 - -* 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 - -* 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. - -* Wed Nov 18 2020 Fabio Valentini - 3.25.0-1 -- Update to version 3.25.0. - -* Fri Oct 16 2020 Fabio Valentini - 3.24.0-1 -- Update to version 3.24.0. - -* Wed Sep 09 2020 Fabio Valentini - 3.23.0-1 -- Update to version 3.23.0. - -* 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. - -* Fri Jun 12 2020 Fabio Valentini - 3.20.0-1 -- Update to version 3.20.0. - -* Fri May 15 2020 Fabio Valentini - 3.19.0-1 -- Update to version 3.19.0. - -* Sat Apr 18 2020 Fabio Valentini - 3.18.0-1 -- Update to version 3.18.0. - -* Wed Mar 11 2020 Fabio Valentini - 3.17.0-1 -- Update to version 3.17.0. - -* Sat Feb 15 2020 Fabio Valentini - 3.16.0-1 -- Update to version 3.16.0. - -* Thu Jan 30 2020 Fedora Release Engineering - 3.15.0-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild - -* Fri Jan 17 2020 Fabio Valentini - 3.15.0-1 -- Update to version 3.15.0. - -* Thu Dec 19 2019 Fabio Valentini - 3.14.0-1 -- Update to version 3.14.0. - -* Sat Nov 16 2019 Fabio Valentini - 3.13.0-1 -- Update to version 3.13.0. - -* Wed Oct 30 2019 Fabio Valentini - 3.12.0-1 -- Update to version 3.12.0. - -* Mon Oct 07 2019 Fabio Valentini - 3.11.1-1 -- Update to version 3.11.1. - -* Sat Sep 28 2019 Fabio Valentini - 3.11.0-1 -- Update to version 3.11.0. - -* Wed Sep 04 2019 Fabio Valentini - 3.10.0-1 -- Update to version 3.10.0. - -* Thu Aug 15 2019 Fabio Valentini - 3.8.0-1 -- Update to version 3.8.0. - -* Tue Jul 30 2019 Fabio Valentini - 3.7.0-1 -- Update to version 3.7.0. - -* Fri Jul 26 2019 Fedora Release Engineering - 3.6.0-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild - -* Wed Jul 10 2019 Fabio Valentini - 3.6.0-1 -- Update to version 3.6.0. - -* Tue Jul 02 2019 Fabio Valentini - 3.5.1-1 -- Update to version 3.5.1. - -* Sat Feb 02 2019 Fedora Release Engineering - 3.3.0-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild - -* Tue Oct 02 2018 Fabio Valentini - 3.3.0-1 -- Update to version 3.3.0. - -* Fri Aug 17 2018 Fabio Valentini - 3.2.1-1 -- Update to version 3.2.1. - -* Thu Aug 02 2018 Fabio Valentini - 3.2.0-1 -- Update to version 3.2.0. - -* Sat Jul 14 2018 Fedora Release Engineering - 3.1.1-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild - -* Mon Jun 04 2018 Fabio Valentini - 3.1.1-1 -- Update to version 3.1.1. - -* Fri Feb 09 2018 Fedora Release Engineering - 1.11.1-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild - -* Thu Jul 27 2017 Fedora Release Engineering - 1.11.1-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild - -* Sat Feb 11 2017 Fedora Release Engineering - 1.11.1-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild - * Tue Aug 23 2016 Björn Esser - 1.11.1-1 - initial import (#1368850) * Sun Aug 21 2016 Björn Esser - 1.11.1-0.1 - initial rpm-release (#1368850) - diff --git a/sources b/sources index 11a6480..aefab97 100644 --- a/sources +++ b/sources @@ -1,2 +1 @@ -SHA512 (rouge-4.7.0.gem) = d14fb367af2df19d59c80b7d68448647db27058192b49963173b74ccac5d08c2e9e39709a3dd12bac59d7d96308243b0dbe66f343fed9cfa25bdf7c6f124787a -SHA512 (rouge-4.7.0-test-missing-files.tar.gz) = f265113dd9c130fe9de12978ae659d7a392cc1c7b5908c5fc2d801680bddc2552c01fa3510ad2173c50e3b5ee03e10d931d7f1924f301205ad4c430554a30166 +406ebca2ea18e0222a7740ebffa15a91 rouge-1.11.1.gem diff --git a/spec_helper_assert.rb b/spec_helper_assert.rb deleted file mode 100644 index a063576..0000000 --- a/spec_helper_assert.rb +++ /dev/null @@ -1,24 +0,0 @@ -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