Compare commits

...

No commits in common. "c8" and "e659b9f34df61e5f680fb847bbb3ffb0d9ff36f0" have entirely different histories.

5 changed files with 129 additions and 12 deletions

13
.gitignore vendored
View File

@ -1,2 +1,11 @@
SOURCES/coderay-1.1.2-tests.tgz
SOURCES/coderay-1.1.2.gem
coderay-0.8.312.gem
/coderay-0.9.7.gem
/coderay-0.9.8.gem
/coderay-1.0.0.gem
/coderay-1.0.4.gem
/coderay-1.0.6.gem
/coderay-1.1.0.gem
/coderay-1.1.2-tests.tgz
/coderay-1.1.2.gem
/coderay-1.1.3-tests.txz
/coderay-1.1.3.gem

View File

@ -1,2 +1,2 @@
6ee1b6f0ad525507e140da2bfe6f6ba35f2adbc6 SOURCES/coderay-1.1.2-tests.tgz
4a174a26a9fbb78ea68e5a7b02e1bbc6be001f5d SOURCES/coderay-1.1.2.gem
d7cc15cba65aab79c9dcb5d862da8fb205e37fa9 coderay-1.1.3-tests.txz
daa6ef4f015b2e98f5d09f40988b4e842fe15e5c coderay-1.1.3.gem

View File

@ -0,0 +1,38 @@
diff --git a/test/unit/debug.rb b/test/unit/debug.rb
index 88baf56..b694f21 100644
--- a/test/unit/debug.rb
+++ b/test/unit/debug.rb
@@ -24,7 +24,8 @@ class DebugEncoderTest < Test::Unit::TestCase
[" \n", :space],
["[]", :method],
[:end_line, :head],
- ].flatten
+ ]
+ TEST_INPUT.flatten!
TEST_OUTPUT = <<-'DEBUG'.chomp
integer(10)operator((\\\))string<content(test)>head[
diff --git a/test/unit/statistic.rb b/test/unit/statistic.rb
index 1326dca..776774d 100644
--- a/test/unit/statistic.rb
+++ b/test/unit/statistic.rb
@@ -24,7 +24,8 @@ class StatisticEncoderTest < Test::Unit::TestCase
[" \n", :space],
["[]", :method],
[:end_line, :test],
- ].flatten
+ ]
+ TEST_INPUT.flatten!
TEST_OUTPUT = <<-'DEBUG'
Code Statistics
@@ -56,4 +57,4 @@ Token Types (7):
assert_equal TEST_OUTPUT, TEST_INPUT.statistic
end
-end
\ No newline at end of file
+end
--
2.29.2

View File

@ -1,19 +1,28 @@
%global gem_name coderay
%bcond_with shoulda
Name: rubygem-%{gem_name}
Version: 1.1.2
Release: 2%{?dist}
Version: 1.1.3
Release: 3%{?dist}
Summary: Fast syntax highlighting for selected languages
License: MIT
URL: http://coderay.rubychan.de
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
# git clone https://github.com/rubychan/coderay.git && cd coderay
# git checkout v1.1.2 && tar czvf coderay-1.1.2-tests.tgz test/
Source1: %{gem_name}-%{version}-tests.tgz
# git clone https://github.com/rubychan/coderay --no-checkout
# cd coderay && git archive -v -o coderay-1.1.3-tests.txz v1.1.3 test spec
Source1: %{gem_name}-%{version}-tests.txz
# Fix test suite for ruby 3.0 change for methods on subclass of Array
# https://github.com/rubychan/coderay/pull/255
Patch0: rubygem-coderay-1.1.3-fix-tests-Array-on-ruby-3.0.patch
BuildRequires: ruby(release)
BuildRequires: rubygems-devel
BuildRequires: ruby >= 1.8.6
BuildRequires: rubygem(test-unit)
BuildRequires: rubygem(rspec)
%if %{with shoulda}
BuildRequires: rubygem(shoulda-context)
%endif
BuildArch: noarch
%description
@ -30,7 +39,11 @@ BuildArch: noarch
Documentation for %{name}.
%prep
%setup -q -n %{gem_name}-%{version}
%setup -q -n %{gem_name}-%{version} -b 1
pushd ..
%patch0 -p1
popd
%build
gem build ../%{gem_name}-%{version}.gemspec
@ -51,12 +64,29 @@ find %{buildroot}%{gem_instdir}/bin -type f | xargs chmod a+x
%check
pushd .%{gem_instdir}
tar xzvf %{SOURCE1}
cp -r %{_builddir}/spec .
cp -r %{_builddir}/test .
# Comment out simplecov.
for file in \
spec/spec_helper.rb \
test/executable/suite.rb \
test/functional/for_redcloth.rb \
test/functional/suite.rb \
test/unit/suite.rb; do
sed -i "/^require 'simplecov'/ s/^/#/" "${file}"
done
# See https://github.com/rubychan/coderay/blob/master/rake_tasks/test.rake
LANG=en_US.UTF-8
LANG=C.UTF-8
ruby ./test/functional/suite.rb
ruby ./test/functional/for_redcloth.rb
ruby ./test/unit/suite.rb
# This test depends on rubygem-shoulda-context.
%if %{with shoulda}
ruby ./test/executable/suite.rb
%endif
rspec spec
popd
%files
@ -73,6 +103,44 @@ popd
%doc %{gem_instdir}/README_INDEX.rdoc
%changelog
* Tue Aug 10 2021 Mohan Boddu <mboddu@redhat.com> - 1.1.3-3
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
Related: rhbz#1991688
* Mon May 24 2021 Vít Ondruch <vondruch@redhat.com> - 1.1.3-2
- Conditionaly disable `BR: rubygem(shoulda-context)`.
Resolves: rhbz#1937981
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 1.1.3-2
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
* Mon Mar 01 2021 Jun Aruga <jaruga@redhat.com> - 1.1.3-1
- update to new version
Resolves: rhbz#1842013
Resolves: rhbz#1923366
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.2-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.2-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.2-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.2-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Thu Feb 14 2019 Jun Aruga <jaruga@redhat.com> - 1.1.2-5
- Remove extended Tokens#filter for Ruby 2.6 compatibility.
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.2-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Sun Nov 18 2018 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 1.1.2-3
- Use C.UTF-8 locale
See https://fedoraproject.org/wiki/Changes/Remove_glibc-langpacks-all_from_buildroot
* Thu Jul 26 2018 Jun Aruga <jaruga@redhat.com> - 1.1.2-2
- Change license and text, aligning with the output of gem2rpm.

2
sources Normal file
View File

@ -0,0 +1,2 @@
SHA512 (coderay-1.1.3-tests.txz) = f0fbbbc674312f6e5e358af98c9b72d9ed8ca7df0dbdea696480a07aaf9bb019fc4fdeacc8546cb8baf299370df0f35bce7d61832f988161c1f058a371ac414b
SHA512 (coderay-1.1.3.gem) = 8da82467be341bdb358869c3ac63130e5e3ed314d0c9918ed26cf8a067eae149b4eb3358451c0a136b8e716304296a7dc4eb4cb385dd106f5cab5a4d1a2fe92f