| |
@@ -2,20 +2,25 @@
|
| |
%global gem_name mimemagic
|
| |
|
| |
Name: rubygem-%{gem_name}
|
| |
- Version: 0.3.2
|
| |
- Release: 8%{?dist}
|
| |
+ Version: 0.4.3
|
| |
+ Release: 1%{?dist}
|
| |
Summary: Fast mime detection by extension or content
|
| |
License: MIT
|
| |
URL: https://github.com/minad/mimemagic
|
| |
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
|
| |
- # Change testing framework from bacon to minitest.
|
| |
- # https://github.com/minad/mimemagic/commit/872e813
|
| |
- Patch0: rubygem-mimemagic-0.3.2-use-minitest.patch
|
| |
- Patch1: rubygem-mimemagic-0.3.2-use-minitest-test.patch
|
| |
+ # The mimemagic gem doesn't ship with the test suite.
|
| |
+ # You may check it out like so
|
| |
+ # git clone --no-checkout https://github.com/minad/mimemagic.git
|
| |
+ # git -C mimemagic archive -v -o mimemagic-0.4.3-tests.txz v0.4.3 test/
|
| |
+ Source1: %{gem_name}-%{version}%{?prerelease}-tests.txz
|
| |
+
|
| |
BuildRequires: ruby(release)
|
| |
BuildRequires: rubygems-devel
|
| |
BuildRequires: ruby
|
| |
BuildRequires: rubygem(minitest)
|
| |
+ BuildRequires: rubygem(nokogiri)
|
| |
+ BuildRequires: %{_bindir}/rake
|
| |
+ BuildRequires: shared-mime-info
|
| |
BuildArch: noarch
|
| |
|
| |
%description
|
| |
@@ -32,16 +37,10 @@
|
| |
Documentation for %{name}.
|
| |
|
| |
%prep
|
| |
- %setup -q -n %{gem_name}-%{version}
|
| |
-
|
| |
- %patch0 -p1
|
| |
+ %setup -q -n %{gem_name}-%{version} -b1
|
| |
|
| |
%build
|
| |
- # Create the gem as gem install only works on a gem file
|
| |
gem build ../%{gem_name}-%{version}.gemspec
|
| |
-
|
| |
- # %%gem_install compiles any C extensions and installs the gem into ./%%gem_dir
|
| |
- # by default, so that we can move it into the buildroot in %%install
|
| |
%gem_install
|
| |
|
| |
%install
|
| |
@@ -51,7 +50,9 @@
|
| |
|
| |
%check
|
| |
pushd .%{gem_instdir}
|
| |
- cat "%{PATCH1}" | patch -p1
|
| |
+ # Copy tests
|
| |
+ cp -r %{_builddir}/test .
|
| |
+
|
| |
ruby -Ilib -e 'Dir.glob "./test/**/*_test.rb", &method(:require)'
|
| |
popd
|
| |
|
| |
@@ -60,19 +61,22 @@
|
| |
%exclude %{gem_instdir}/.*
|
| |
%license %{gem_instdir}/LICENSE
|
| |
%{gem_libdir}
|
| |
- %{gem_instdir}/script
|
| |
%exclude %{gem_cache}
|
| |
%{gem_spec}
|
| |
|
| |
%files doc
|
| |
%doc %{gem_docdir}
|
| |
%{gem_instdir}/Gemfile
|
| |
+ %doc %{gem_instdir}/CHANGELOG.md
|
| |
%doc %{gem_instdir}/README.md
|
| |
%{gem_instdir}/Rakefile
|
| |
+ %{gem_instdir}/ext/%{gem_name}/Rakefile
|
| |
%{gem_instdir}/mimemagic.gemspec
|
| |
- %{gem_instdir}/test
|
| |
|
| |
%changelog
|
| |
+ * Mon Sep 13 2021 Pavel Valena <pvalena@redhat.com> - 0.4.3-1
|
| |
+ - Update to mimemagic 0.4.3.
|
| |
+
|
| |
* Tue Jul 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.2-8
|
| |
- Second attempt - Rebuilt for
|
| |
https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
| |
To have latest mimemagic gem in Fedora.
Koji scratch-build:
https://koji.fedoraproject.org/koji/taskinfo?taskID=66474679
Copr build:
https://copr.fedorainfracloud.org/coprs/build/2144878
Checks:
Update log: https://git.io/JOihf
Test log: https://git.io/JOihJ