Skip to content

Commit

Permalink
Upgrade: rubygem-rouge version to 4.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
akhila-guruju committed Dec 27, 2024
1 parent 81fb40a commit 20d8042
Show file tree
Hide file tree
Showing 6 changed files with 183 additions and 24 deletions.
6 changes: 6 additions & 0 deletions SPECS-EXTENDED/rubygem-rouge/bundler.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module Bundler
class << self
def require
end
end
end
33 changes: 33 additions & 0 deletions SPECS-EXTENDED/rubygem-rouge/rouge-create-missing-test-files.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/bin/bash

usage() {
echo "$0 <VERSION>"
}

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

8 changes: 6 additions & 2 deletions SPECS-EXTENDED/rubygem-rouge/rubygem-rouge.signatures.json
Original file line number Diff line number Diff line change
@@ -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"
}
}
}
132 changes: 112 additions & 20 deletions SPECS-EXTENDED/rubygem-rouge/rubygem-rouge.spec
Original file line number Diff line number Diff line change
@@ -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}
Expand All @@ -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
Expand All @@ -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 <[email protected]> - 3.26.0-3
* Tue Dec 24 2024 Akhila Guruju <[email protected]> - 4.4.0-2
- Initial Azure Linux import from Fedora 41 (license: MIT).
- License verified.
- Build from .tar.gz source.

* Fri Oct 15 2021 Pawel Winogrodzki <[email protected]> - 3.26.0-2
- Initial CBL-Mariner import from Fedora 32 (license: MIT).
* Fri Sep 20 2024 Mamoru TASAKA <[email protected]> - 4.4.0-1
- 4.4.0

* Fri Jul 19 2024 Fedora Release Engineering <[email protected]> - 4.3.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild

* Tue Jun 18 2024 Mamoru TASAKA <[email protected]> - 4.3.0-1
- 4.3.0

* Mon Mar 18 2024 Mamoru TASAKA <[email protected]> - 4.2.1-1
- 4.2.1

* Fri Jan 26 2024 Fedora Release Engineering <[email protected]> - 4.2.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild

* Wed Oct 25 2023 Mamoru TASAKA <[email protected]> - 4.2.0-1
- 4.2.0

* Fri Aug 18 2023 Mamoru TASAKA <[email protected]> - 4.1.3-1
- 4.1.3

* Fri Jul 21 2023 Fedora Release Engineering <[email protected]> - 4.1.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild

* Fri Feb 17 2023 Mamoru TASAKA <[email protected]> - 4.1.0-1
- 4.1.0

* Sun Feb 12 2023 Mamoru TASAKA <[email protected]> - 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 <[email protected]> - 4.0.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild

* Wed Dec 21 2022 Mamoru TASAKA <[email protected]> - 4.0.1-1
- 4.0.1

* Sun Oct 9 2022 Mamoru TASAKA <[email protected]> - 4.0.0-2
- 4.0.0

* Sat Jul 23 2022 Fedora Release Engineering <[email protected]> - 3.26.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild

* Fri Jan 21 2022 Fedora Release Engineering <[email protected]> - 3.26.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild

* Sun Sep 19 2021 Mamoru TASAKA <[email protected]> - 3.26.1-1
- 3.26.1

* Fri Jul 23 2021 Fedora Release Engineering <[email protected]> - 3.26.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild

* Wed Jan 27 2021 Fedora Release Engineering <[email protected]> - 3.26.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild

* Fri Dec 11 2020 Fabio Valentini <[email protected]> - 3.26.0-1
- Update to version 3.26.0.
Expand All @@ -88,6 +177,9 @@ help2man -N -s1 -o %{buildroot}%{_mandir}/man1/rougify.1 \
* Wed Aug 12 2020 Fabio Valentini <[email protected]> - 3.22.0-1
- Update to version 3.22.0.

* Wed Jul 29 2020 Fedora Release Engineering <[email protected]> - 3.21.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild

* Wed Jul 15 2020 Fabio Valentini <[email protected]> - 3.21.0-1
- Update to version 3.21.0.

Expand Down
24 changes: 24 additions & 0 deletions SPECS-EXTENDED/rubygem-rouge/spec_helper_assert.rb
Original file line number Diff line number Diff line change
@@ -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
4 changes: 2 additions & 2 deletions cgmanifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
},
Expand Down

0 comments on commit 20d8042

Please sign in to comment.